2025-10-22 12:03 AM
Hi,
On the STM32N6570-DK board, I’m running an application that uses TouchGFX and FileX.
Both the TouchGFX frame buffer and FileX temporary buffers are located in external memory (XSPI1).
I’m observing intermittent write failures when SDMMC IDMA is used for direct transfers from external memory to the SD card. The issue appears as incorrect data being written — typically affecting the entire transfer block (a few kilobytes), as shown in the image below.
External memory is attributed as non-cacheable all the time. Selecting various shareability options for the ext memory introduces very strange behavior, so it's been disabled finally.
However, when the write operation is performed from internal SRAM (either via an intermediate buffer in SRAM or the FileX driver’s scratch buffer), the transfers are always successful.
I’ve also found a very similar case involving the TouchGFX frame buffer and SD card buffer in external memory on the STM32F7 platform.
2025-10-22 12:29 AM
Hi,
>intermittent write failures when SDMMC IDMA is used
And if set SDMMC without DMA , then working fine ?
2025-10-22 12:43 AM
Hi @AScha.3
I bet it works, but I did not try, beacuse it is the less acceptable approach for my multi-threaded application.
Regards.
2025-10-22 6:07 AM - edited 2025-10-22 6:15 AM
Hello @ERROR
Is your external memory configured in memory-mapped mode?
Before launching the DMA transfer, you should insert a DSB() (Data Synchronization Barrier) instruction in your code to ensure that all memory accesses are completed and the memory is up to date.