Skip to main content
Visitor II
May 30, 2024
Question

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

  • May 30, 2024
  • 2 replies
  • 1546 views

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

 

    This topic has been closed for replies.

    2 replies

    ST Employee
    June 4, 2024

    Hi @VT_Jim 

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

    regards
    Haithem.

    VT_JimAuthor
    Visitor II
    June 4, 2024

    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?

     

    ST Employee
    June 26, 2024