cancel
Showing results for 
Search instead for 
Did you mean: 

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

migmel
Senior

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

3 REPLIES 3
migmel
Senior

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

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.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
migmel
Senior

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.