Skip to main content
Visitor II
July 7, 2021
Question

How to transfer files from USB flash drive into SD card inserted in STM32469I Discovery board

  • July 7, 2021
  • 2 replies
  • 2969 views

Hello everybody,

I have set an STM32469I Discovery as USB HOST MSC which has a SD card slot available. My idea is transfer all files contained in any USB flash drive connected to the USB port into the SD card ( supposing there is enough space capacity) and include some process to measure transfer speed.

Can anyone point me in the right direction regarding the process I should follow and the libraries I should use to pull this task off ?

Thank you guys for your help. I am starting in this STM32 world and very excited about it

    This topic has been closed for replies.

    2 replies

    migmelAuthor
    Visitor II
    July 8, 2021

    I am not sure if I should do it file by file or copying by blocks( This concept I am not sure how to convert these blocks of data back into files). Conversion from blocks to files is automatic or should I do additional process to achieve it ? or is not doable in this way ? Help please

    Graduate II
    July 8, 2021

    Depends on how involved you want to get with file system structures.

    Most straight forward would be to use FatFs, enumerate through files, do a block/cluster sized copies. Duplicating timestamps and attributes

    Perhaps skipping files that already exist. ​

    Presume you want to replicate directory trees and content.​

    migmelAuthor
    Visitor II
    July 8, 2021

    Thank you Mr, DeLorean,

    My goal is to replicate directory trees and content at the higher speed possible. Considering I am just learning, have to start with the easiest way (FatFS is easier for me to understand) and fine tune step by step. All clear but doing "a block/cluster sized copies...", well guess I have to make my own research on this.