cancel
Showing results for 
Search instead for 
Did you mean: 

Filex writing performance

FCola.1
Associate III

Hello everyone, 

I am using a custom board with STM32H750 and I am trying to develop a file system with FILEX. 

The file system' s media is a uSD card with 10 MB/s baudrate which is communicating with the micro thanks to the SDMMC peripheral. 

The SDMMC peripheral's configuration is copied from one of the many examples that are available in STMCubeMX ( it has a 50 Mhz clock, 4 bit mode, no power mode save and no transceiver).

The uSDcard has been formatted through the api given by FILEX (fx_media_format) following the information available during uSD card initialization ( for example sector size is 512 bytes, number of sectors and so on...).

I am using the drivers given by ST for FILEX (in my case SD with IDMA) and I am trying different media size buffer (512, 1024 and 4096) which I allocate in AXI SRAM ( SDMMC1 IDMA can access only in AXI SRAM).

I am experiencing two different behaviour:  If I am doing a reading operation the SDMMC is very fast while writing operation is very slow( for transfer 512 bytes it could takes 4 ms).

 What I have I seen until now is that FILEX seems  tell  every time  SD card's driver to write only into 1 block and It never tries a multi blocks write ( so I don't understand if there are advantages from using a media buffer with size greater than 512 bytes) . I have also cache maintenace enable and all of my working buffers are 32 bytes aligned in order to avoid issues.

Since I would like to developing a recording audio application, so I cannot allow that writing operations take too much time for transfering data into uSD card, is there anything I can do? Maybe some define in fx_user.h file or I have to change my writing/reading HAL driver functions.( I am using HAL_SD_WriteBlocks_DMA/ HAL_SD_ReadBlocks_DMA). 

Could erasing uSD card sectors before writing into them speed up the procedure?

Please if anyone has an advice I would be very grateful.

 

 

0 REPLIES 0