Is it possible to implement DISKCOPY to copy block by block from eMMC volume to USB volume

190 Views Asked by At

I am using STM32, FATFS, SDMMC, eMMC and have created the FATFS on the eMMC. I have also created a FATFS volume on the USBH (host mode). This also works fine.

The eMMC FATFS work fine then I need to copy all files from the eMMC to the USB drive. The copy file by file from eMMC via FATFS is taking too long.

I think it would be faster if I just blindly copy memory block by block (512 bytes) from eMMC to USBH. So I implemented enough routine to do so. The problem is the copy failed after about few hundred block copied. The failure is seemed to be due to the USBH does not respond.

My question is: 1- "Is is possible to copy block by block raw data from eMMC to USBH like I try to do?" 2- have anyone successfully doing so?

1

There are 1 best solutions below

3
On

Yes it is perfectly normal to blindly copy all the blocks of one storage device to another and to expect it to work.

The only catch is that the devices have to either have the same block size, or else you have to at least pretend they do (eg: treat each 4kB physical block as eight 512-byte blocks). This is because many filesystem drivers always assume the block size is 512 bytes.

One other problem I have encountered in doing this is that devices can overheat (but this isn't a software problem).