We recently updated from WEC7 standard Image V1.5 to V1.6. On the new OS we sometimes experience corrupted files after copying them from a USB memory stick to FlashDisk (see corrupted files). The same problem might also occur when copying files directly from Windows Explorer onto the device via Windows Mobile Device Center.
Is there a known issue?
Thank you for contacting the Toradex community!
Could you set below the registry and do the test again and let us know the result.
;"DisableDMA"=dword:1 ; Use this reg setting to disable both internal and external DMA
Disable l2Cache and try the test again.
Please enable debug messages and log it and then share with us when issue is occuring.
Did you do power cut immeditely after copy or did you wait for some time?
We’ve tried to disable DMA in the registry and disabling l2Cache, but the problem still persists. We don’t perform a reboot immediately after copying. Here is the debug log. Actually when the issue is occurring there is no additional log entry created.
It’s also interesting, that when using our installation script which is based on a batch file running on an attached USB memory stick, always the same files get corrupted (see first attachment).
This is an eMMC feature, we enabled this feature for write performance and improved wear-leveling. At the moment, we are not sure why it creates this issue. Could you wait for some days? Let me discuss it with our developer and get back to you soon.
We found that disabling the trim function solves our copy issue (https://developer.toradex.com/software/windows-embedded-compact/imx6-wec-software/release-details?view=all&key=53645). Is there a reason why the enabled trim function (default setting) corrupts some of our copied files?
Could you write to me with exact steps by step details, also with files you used for a copy for reproducing the issue on our side.
I tried few times from USB memory stick and WMDC but couldn’t reproduce the issue with TRIM enabled. Maybe something wrong with my setup. If you write to me with detailed setup details, it would help me to reproduce the issue quickly and look into it.
Thank you for posting your solution!
I noticed that files could disappear from FlashDisk if they were written not long before coldboot (iMX6 WEC7 BSP1.6). I spent a week fighting with disappearing, trying different delays, sending IOCTL_DISK_FLUSH_CACHE, executing preparefs etc. Like in your case, when batch copying was performed, the same file disappeared, it was totally reproducible.
With disabling the TRIM function, the problem has gone.