Using external flash (MX66UW1G45G) via XSPI as FileX backend on STM32U5G9J-DK2
Hi all,
I’m trying to use the external NOR flash (MX66UW1G45G) on the STM32U5G9J-DK2 board as the storage backend for a FAT filesystem using FileX.
I came across the example “Fx_NoR_Write_Read_File” from STM32CubeIDE (STM32U5G9J-DK2 package), which appears to be doing exactly this — creating a FAT filesystem using FileX and LevelX on the external NOR via XSPI. However, it’s .ioc file is missing, so I can’t see how the XSPI interface and pins are configured.
I built and flashed the example as-is, but the fx_media_format() call returns FX_IO_ERROR (0x90 in Hex and 144 in decimal).

Could someone please guide me on the correct steps to:
- How to properly configure XSPI for the MX66UW1G45G in CubeIDE.
- The correct steps to use FileX and LevelX with external NOR flash as the filesystem backend.
Thanks in advance!
