2021-07-25 11:12 AM
Hello,
I'm currently playing around with the QSPI_ReadWrite_DMA example on an STM32F769I_EVAL board.
Link to example:
The demo seems to build and work fine without any changes. I made some changes because wanted to pass in the buffer as an input rather than have it write and read from global variables.
The issue I'm seeing is that it looks like the QSPI Write/Read is failing when I change the buffers that it's write to and reading from to be allocated on the stack rather than a global variable. The local variables are scoped within the main function so it should all be within the lifetime of the variable.
Any insight would be appreciated, thanks in advance.
2021-07-25 01:46 PM
Could it be a cache issue? Try disabling the data cache and see if that fixes it.
2021-07-25 04:27 PM
The DTCMRAM on the F7 shouldn't have cache issues. On the F769 should have 128KB to play with.
Otherwise you need to DCache Clean by Address. See the FATFS/DISKIO examples
STM32Cube_FW_F7_V1.15.0\Middlewares\Third_Party\FatFs\src\drivers\sd_diskio_dma_template.c
SCB_CleanDCache_by_Addr(Address (32-byte aligned), Size);
2021-07-26 10:50 AM
Thanks for the guidance all, based on the suggestions I just did a quick test by invalidating the D-cache and it seems to work.