This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28384D: The question of sd_fat32 example project.

Part Number: TMS320F28384D


Hi champs,

My customer is testing sd_fat32 example project, uses SPI-B and keep writing 3.2KB data into the 16GB SD Card. However, he finds that sometimes it takes longer time to execute f_write() and f_sync() functions, please refer to below scopeshot.

Below is the virtual code of my customer's software, he uses GPIOs to indicate the functions executing time.

GPIO1 = 1;     // this is the C1 waveform
    f_open(....);
GPIO1 = 0;

GPIO2 = 1;     // this is the C2 waveform
    f_write(....);
    f_sync(....);
GPIO2 = 0;

f_close(.....);

From the C2 waveform(BLUE color), we can see sometimes DSP takes longer time to complete f_write() and f_sync() functions. My customer is wondering what causes this time delay problem, is it due to the memory structure of SD card or something?

Please advise your comments, thanks for help. 

Regards,

Luke

  • Luke,

    That's a good question. The FATFS library is a standard 3rd party library adopted from elm-chan.org.

    Their forum may have more info on this. 

    From our side when we were doing the porting and testing the branches which the code takes changes based on which sector of the card it is writing/reading to/from. It also depended on what type of SDCARD was being used. SD cards with the same memory size (for example 2 32GB SDCARDs) had different structures and the path the code would take was different. 

    What you are seeing seems normal. Depending on where in the memory the code path would change. Again elm-chan forum may have more info on this.

    I will also add Sahil our SW owner to the thread for any further questions/comments

    Nima