2025-05-14 8:36 AM - edited 2025-05-14 8:52 AM
Hi,
I have 2GB emmc on SDMMC1 bus.
I wish to have first 1GB (0~1GB) as application code area and the rest 1GB(1GB~1GB) as FAT file system that access by user as USB MSC. Even more, the first 1GB i wish to have 2 partitions(like A-B bank) for fail safe firmware update mechanism.
So is that possible to do that?
if not,how to use flash on xspi1 to have fail safe firmware update? like if update fail, roll back to old firmware..
2025-05-17 8:01 AM
Hi AichiChen
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Regards
Joe
STMicro Support
2025-05-17 8:50 AM
Would suggest using whole eMMC as file system, and have application in a file.
Have enough of a loader in XSPI, and don't erase the loader. If you want to write deeper into XSPI, copy loader or secondary loader into RAM, run that, to erase / replace code deeper into the XSPI / NOR FLASH memory space.
Loader implements eMMC/FATFS. Load new app as a file, only rename to primary app firmware when complete/authenticated. Have recovery mechanics that allow you to push new image/file if FAT corrupt or missing.