cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeF7 QSPI Flash example issue on STM32F769I_EVAL

CHou.1
Associate II

Hello,

I'm currently playing around with the QSPI_ReadWrite_DMA example on an STM32F769I_EVAL board.

Link to example:

https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32F769I_EVAL/Examples/QSPI/QSPI_ReadWrite_DMA.

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.

3 REPLIES 3
TDK
Guru

Could it be a cache issue? Try disabling the data cache and see if that fixes it.

If you feel a post has answered your question, please click "Accept as Solution".

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);

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
CHou.1
Associate II

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.