cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 SDCard Access from QSPI Image

MCakm
Associate

Hi All,

We are using STM32F746 MCU with external Memory.

We use internal flash for bootloader image and our main image is on QSPI memory.

We read something about STM32F7 HW issues for example to access QSPI using DMA, Cache's need to be disabled.

On the other hand, if we disable Cache, execution speed on QSPI memory is not enough for SDCard/SDIO interfaces.

If we enable the D and I Cache's, SDCard reads are not stable. Sometimes opens (fopen() ) a file sometimes does not. We are using FatFS.

If it is about caching, I am trying to open a file in a loop until it success like below

while (fopen(FILE) != SUCCESS && retryCount-- > 0);

I assume it will cache required instructions but still I could have a stable system.

Is it risky to read SDCard from Image on QSPI Memory or are we missing something?

Thank you.

1 REPLY 1
Amel NASRI
ST Employee

Hi @Community member​ ,

When using QSPI with STM32F7 devices, the main recommendation is to properly configure MPU in order to avoid some known issues when using Cortex-M7. This is related to speculative read accesses that cause high latency or system errors when performed on external memories like SDRAM or Quad-SPI.

You find more "Special recommendations for Cortex®-M7 (STM32F7 Series)" in a dedicated section with this title in AN4861 (https://www.st.com/resource/en/application_note/dm00287603.pdf).

You have also a dedicated application note for QSPI (AN4760) entitled "Quad-SPI (QSPI) interface on STM32 microcontrollers". It is available from https://www.st.com/resource/en/application_note/dm00227538.pdf.

-Amel

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.