Skip to main content
SNNV
Associate
Oct 30, 2019 12:31 PM UTC
Question

EMMC support for greater than 2 gb

We are using stm32f769 with 8 gb EMMC , from other forums we understood that there is no HAL support for emmc for more than 2 gb , we are hard coding the emmc block count to 0x773594 and emmc block size to 0x200 . These values are calcuated in accordance to 8 gb storage . But the emmc card is full after 12 mb . Does anyone have a solution for emmc greater than 2 gb .

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
Oct 30, 2019 12:57 PM UTC

Fullness is something the file system would be managing, not sure I recall there being a byte vs block offset issue with the eMMC command interface, definitely have much large devices working on L4/F4/F7/H7 platforms.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
SNNV
SNNVAuthor
Associate
Oct 31, 2019 7:36 AM UTC

When we tried reading EXTCSD register ,we are getting response timeout so we hardcoded the contents below.

The hard coded changes made are the following

    hmmc1.MmcCard.BlockNbr = 0x773594

   

    hmmc1.MmcCard.BlockSize = 0x200 

    hmmc1.MmcCard.LogBlockNbr = 0x773594

    hmmc1.MmcCard.LogBlockSize = 0x200 

capacity is changed to 0xFFFFFFF0U (4GB) from 0x80000000U(2 GB)

All the above parameters are calculated for the files to be stored till a limit of 4 GB , but the EMMC stores 12 MB of files. Beyond 12 MB when fopen call returns FR_DISK_ERROR .

Are we missing any other parameters that needs to be addressed ?

Tesla DeLorean
Guru
Oct 31, 2019 11:13 AM UTC

Sounds like it is scaling the block address.

Need to change the card type settings so it doesn't multiply.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..