2023-04-20 04:38 AM
Hi,
I am using the STM32H747I-DISCO and wanting to write to the QSPI using Filex.
I tried using the example FX_Dual_Instance, but could not get this working. Since then I have built a project step by step using the CubeMx initialization tool.
Both times my code stops (gets caught in a loop) at fx_media_format. When drilled down with the debugger I found it was waiting for a thread to execute?
Any ideas what I'm missing. I've attached my project below.
Couple of things to note:
Thanks,
Hannah
Solved! Go to Solution.
2023-05-03 08:53 AM
Hello @HMago.1 ,
For Fx_Dual_Instance example and when you using FileX/LevelX, some usage hints must be respected such as:
- FileX sd driver is using SDMMC1 and the DMA, thus only D1 AXI-SRAM memoru (@ 0x24000000) is accessible by the sd driver.
- When calling the fx_media_format() API, it is highly recommended to understand all the parameters used by the API to correctly generate a valid filesystem.
- When calling the fx_media_format() API, NOR sector size is always 512 bytes.
- FileX is ata buffusing ders, passed as arguments to fx_media_open(), fx_media_read() and fx_media_write() API it is recommended that these buffers are multiple of sector size and "32 bytes" aligned to avoid cache maintenance issues.
I hope this help you to solve the issue :) !
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-05-03 08:53 AM
Hello @HMago.1 ,
For Fx_Dual_Instance example and when you using FileX/LevelX, some usage hints must be respected such as:
- FileX sd driver is using SDMMC1 and the DMA, thus only D1 AXI-SRAM memoru (@ 0x24000000) is accessible by the sd driver.
- When calling the fx_media_format() API, it is highly recommended to understand all the parameters used by the API to correctly generate a valid filesystem.
- When calling the fx_media_format() API, NOR sector size is always 512 bytes.
- FileX is ata buffusing ders, passed as arguments to fx_media_open(), fx_media_read() and fx_media_write() API it is recommended that these buffers are multiple of sector size and "32 bytes" aligned to avoid cache maintenance issues.
I hope this help you to solve the issue :) !
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-05-03 09:33 AM
QSPI NOR Flash generally going to work more efficiently at 4KB as most devices this is the smallest erase size. The page writes are also usually 256-byte maximum at a time, but will decompose well with 4KB alignment.
Done this with FatFS on QSPI.
Trying to manage 512-byte sectors onto 4KB devices is just going to be a headache, as well as issues with speed and wear.