2025-02-13 10:45 AM
I am having trouble integrating LevelX into FileX using the on board eMMC on the STM32H745I-DiSCO eval board. I am using standalone mode (no AzureRTOS). I have successfully implemented FileX to format, write and read the eMMC card in standalone. I am having trouble now integrating LevelX using the IOC file as a basis to generate code. When I try to format the eMMC card with the following call, it returns a status of 144.
status = fx_media_format(&mmc_disk, fx_stm32_levelx_nand_driver, /* Driver entry */
// (VOID *)CUSTOM_DRIVER_ID,
(VOID*) 0xEEEE, mmc_memory, /* Media buffer pointer */
sizeof(mmc_memory), /* Media buffer size */
"EMMC_DISK", /* Volume Name */
FX_EMMC_NUMBER_OF_FATS, /* Number of FATs */
FX_EMMC_DIRECTORY_ENTRIES, /* Directory Entries */
FX_EMMC_HIDDEN_SECTORS, /* Hidden sectors */
FX_EMMC_TOTAL_SECTORS, /* Total sectors */
FX_EMMC_SECTOR_SIZE, /* Sector size */
FX_EMMC_SECTORS_PER_CLUSTER, /* Sectors per cluster */
FX_EMMC_HEADS, /* Heads */
FX_EMMC_SECTORS_PER_TRACK); /* Sectors per track */
The only difference between FileX only code that works and FileX/LevelX code that doesn't is the argument "fx_stm32_levelx_nand_driver" which I believe is required based on another Eval board's example.
When using only FileX, the argument is fx_stm32_mmc_driver. I didn't notice any calls to LevelX low level drivers in fx_stm32_mmc_driver. Any help is appreciated !!!
THANKS!!!
Solved! Go to Solution.
2025-02-14 05:14 AM
Hello @dsmail1
You don't need Level X to write and read from EMMC. It works directly with FileX.
2025-02-13 11:26 AM
Does LevelX apply to eMMCs at all? MMCs have embedded controller which is responsible for leveling.
2025-02-13 11:36 AM
This application note / example mentions LevelX and so I just assumed that wear leveling was required for eMMC also.
2025-02-14 12:31 AM
Hello @dsmail1
According to the article mentioned above the argument for fx_media_format() is fx_stm32_mmc_driver and not fx_stm32_levelx_nand_driver.
>> I am having trouble now integrating LevelX using the IOC file as a basis to generate code.
What kind of trouble you are getting. Could you share more details please?
2025-02-14 04:46 AM
Thank you. Understood. I searched the fx_stm32_mmc_driver () function and there are no API calls to any LevelX function after including the LevelX features after updating my IOC file using Cube MX. I have read that most eMMC controllers provide wear leveling w/o the need for additional firmware (the eMMC controller provides logical blocks to the firmware that map to physical blocks). I just want to make sure that I'm not missing anything given what the above example shows.
2025-02-14 05:14 AM
Hello @dsmail1
You don't need Level X to write and read from EMMC. It works directly with FileX.