Hi,
How do you verify the reported capacity?
Giovanni
SD on STM32H7
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: SD on STM32H7
Giovanni wrote:Hi,
How do you verify the reported capacity?
Giovanni
At hal_sdc.c :
Code: Select all
else {
/* The card is an SDC, capacity from the normal CSD.*/
sdcp->capacity = _mmcsd_get_capacity(sdcp->csd);
}I'm illiterate at SD Card code, so may be it's not the way to check it
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: SD on STM32H7
Could you try another card? is the capacity still wrong? if so then there could be a bug there.
Giovanni
Giovanni
Re: SD on STM32H7
Giovanni wrote:Could you try another card? is the capacity still wrong? if so then there could be a bug there.
Giovanni
With a 8GB card, it reports 15.130.624, with a 64GB, it reports 122.138.624 and with a 256MB, 491.520
Re: SD on STM32H7
joaquin wrote:Giovanni wrote:Could you try another card? is the capacity still wrong? if so then there could be a bug there.
Giovanni
With a 8GB card, it reports 15.130.624, with a 64GB, it reports 122.138.624 and with a 256MB, 491.520
I have checked on a PC, and the reported capacity by Chibios is correct, although it's in number of sectors of 512 bytes; that's the reason I saw half the capacity
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times