/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Bug report (High Capacity cards)

Username:     
Password:     
             

Forum

# 1   2010-03-16 22:37:53 Bug report (High Capacity cards)

Snakehand
New member
Registered: 2010-03-12
Posts: 3

Bug report (High Capacity cards)

High capacity cards can have over 4GB of storage space, and the Capacity member & addr offsets will actually overflow a u32.

For instance this line is bound to overflow: (sdcard.c)
cardinfo->CardCapacity = (cardinfo->SD_csd.DeviceSize + 1) * 512 * 1024;
when DeviceSize is 0x3b36 as it is on my 8GB card.

I will rewrite the code to use "block index" rather than byte offsets into the block device. Possibly will CircleOS itself have similar issues.

(And thanks for the code, it is a good starting point at any rate)

Last edited by Snakehand (2010-03-16 22:38:41)

Offline

 

Board footer