cancel
Showing results for 
Search instead for 
Did you mean: 

FileX LevelX

dsmail1
Associate II

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!!!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @dsmail1 

You don't need Level X to write and read from EMMC. It works directly with FileX.

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar

View solution in original post

5 REPLIES 5
Pavel A.
Evangelist III

Does LevelX apply to eMMCs at all? MMCs have embedded controller which is responsible for leveling.

 

This application note / example mentions LevelX and so I just assumed that wear leveling was required for eMMC also.

https://community.st.com/t5/stm32-mcus/how-to-use-filex-with-emmc-for-file-system-management/ta-p/634300

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? 

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar
dsmail1
Associate II

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.

 

Hello @dsmail1 

You don't need Level X to write and read from EMMC. It works directly with FileX.

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar