2018-05-12 04:47 AM
Posted on May 12, 2018 at 13:47
Hello there,
I am writing in regard to those 2 topics:
https://community.st.com/thread/49792-sm32l4-interface-with-an-emmc
I am using an STM32L452 chip and trying to fully utilize the SanDisk 8GB eMMC memory (
SDINBDG4-8G
). I have found out that the is no eMMC HAL written for the L4 family. Because of that, I tried STM32F412, as it uses SDIO not SDMMC peripheral (the same thing but other name?), and it has HAL written. I have found out however, that as pointed out here
it doesnt work. There are no examples of eMMC usage in STM32Cube_FW_F4_V1.0. From the code it also seems that it only supports memories up to 2 GB. Trying to use the code I was unable to write anything to the momory, like the mentioned topic, even though over a year passed since it was posted.
At the moment I have a serious design dilemma. I cannot afford the time to write the driver from scratch or try to fix the existing one. Could I please ask for an explanation what is the state of the eMMC driver for each STM32F4 and STM32L4 devices, do they indeed not work? Is there a way to make them work? Also, what is the real difference between SDIO which F4 utilize and SDMMC peripherals which L4 utilize? I would appreciate all help.
https://community.st.com/people/DAHMEN.IMEN
?
Note: this post was migrated and contained many threaded conversations, some content may be missing.
2018-05-17 06:49 AM
Can you provide working examples?
2018-05-17 09:55 PM
Posted on May 18, 2018 at 06:55
I have attached a project which i did on a stm32f405 chip. I used the HAL MMC functions and FATFS for read write operations. I linked them by functions in /src/eMMC_drivers and /src/user_diskio. Feel free to ask if any doubt.
________________
Attachments :
heees.rar :
2018-05-17 11:59 PM
Thank you,
I will check it out monday morning. Have a nice weekend.
2018-05-18 12:15 AM
Sure.
2018-05-19 12:27 AM
Turvey.Clive
I am looking ataltamash.ar96
project and it seems like all using the standard functions. If he says it work, why only on this target? Of corse apart from things like 2 GB capacity max i believe? #define CAPACITY 0x400000U /*!< Log Block Nuumber for 2 G bytes Cards */altamash.ar96
which eMMC did you use exactly?2018-05-19 12:41 AM
I used Kingston eMMC 16 GB M525
https://www.kingston.com/us/embedded/emmc
Are you able to initialize the eMMC using the HAL MMC functions?
2018-05-19 12:44 AM
Yes I was able to do that on F412 but I wasnt able to write.
2018-05-19 12:48 AM
Are you using any file system or using HAL MMC functions to read write?
2018-05-19 12:49 AM
Just the HAL_MMC HAL functions, in blocking mode.
2018-05-19 08:31 AM
printf('%d GB\n', hmmc.MmcCard.LogBlockNbr / (2048 * 1024)); // binary
printf('%6.3lf GB\n', (double)hmmc.MmcCard.LogBlockNbr / 2000000.0); // media retailI'm only dealing with this 16GB Samsung device, so not going to build an entire observation of CSD vs EXTCSD on that, but the ST code for the F4 is missing some code that is in the H7 libraries.
I have a 32GB eMMC at the office, will review that on Monday.
Also doing some serious sanity checking of the media integrity over the whole capacity.