cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747I-DISCO Question(s): Why D-Cache needs to be enabled when using f_open / SDMMC

JW
Associate III

Background:

I am using the STM32H747I-DISCO board and the BSP SDMMC example from the ST Repository as my starting point.  I can provide my code if necessary but wanted to keep post as short as possible.  I have looked at AN4838, AN4839 and AN5200 ST Micro Documents.  They are detailed but not getting me to my answer fast enough.

 

My Goal:
I am trying to understand the detailed reason(s) why I need to enable the D-Cache when using FatFS calls with the SDMMC peripheral on the STM32H747I-DISCO board to avoid a timeout and also why I-Cache does not necessarily need to be enabled.  

 

My Understanding to this point:

The CLIFF NOTES of what I think I understand (between the ST documentation, AI hallucinations and true answers):

Enabling the D-Cache reduces AXI bus contention since the IDMA in the SDMMC peripheral needs AXI bus to move data from the FIFO to SRAM on a very tight timeline, mandated by the SDMMC peripheral.  When you enable the D-Cache and call f_open, (supposedly) the CPU Core (Cortex M7) is making numerous requests over the AXI bus like parsing path, reading directory structure and FAT tables, checking flags etc.  The initial call to f_open populates D-Cache.  When the CPU core continues to request the data it needs, it retrieves the data from the D-Cache instead of requesting get data from SRAM.  Under this condition, the CPU core does not need the AXI bus, allowing the IDMA to move data from the SDMMC FIFO to SRAM (over AXI) and meet its timeline.

 

My question(s):

1) Is my understanding accurate?  If not can you correct me/point me to the documents that clear this up?

2) Why does enabling I-Cache not seem to matter?

3) Is there a section of the Application Notes of perhaps a ST Micro User Manual doc that explains this?

Any guidance / RTFM pointers are appreciated.

JW

0 REPLIES 0