cancel
Showing results for 
Search instead for 
Did you mean: 

fx_media_open timing is too slow. How do I speed this up?

VT_Jim
Associate III

Folks,

 

I have a device that installs into another product and provides SRAM for code execution for the other device.  

The device my board plugs into has a fixed 500ms RESET generator that hold off the host device CPU for that much time.  During this time, I need to pull files from SD card (4-bit wide) and load to SRAM before the host comes out of reset.  I'm clocking the SD card at 50MHz. Running on STM32H563 at 200MHz. 

But I am getting dangerously close on my timing.  I found that the fx_media_open in Azure FileX is taking 345ms to execute.  Are there parameters that I can adjust somewhere to get this to be much faster?

I really need this media_open to take less than 100ms if possible.  

 

VT_Jim_0-1717075480190.png

 

3 REPLIES 3
Haithem Rahmani
ST Employee

Hi @VT_Jim 

are you using the SD DMA for read/write operations?

regards
Haithem.

VT_Jim
Associate III

Hi Haithem,

I have not been able to find the SDMMC DMA setup within the Cube config IOC generator.

I read in the reference manual that the SDMMC has its own dedicated DMA independent of the GPDMA1,2.

How do I enable the DMA for the SDMMC in Cube? 

 

Once my media open has completed, the file read is working at about 24MB/s from the tests I've done.

That's fairly quick which made me think it was already running the DMA.

 

I am interested in changing my design to try and use the SDR104 or DDR50 modes but have not found a H5 or H7 based reference demo board that shows the hardware required to do this.

It seems that an external level shifter is required between the MCU and SD Card.

Is there an STM32 eval / demo reference that has either of these faster SDMMC modes working?