Files that are larger than 32 kB get corrupted when written / read from SD-Card.
Steps to reproduce on WEC 7:
Copy attached test.bmp file to a USB drive
Open the test.bmp directly from the USB drive - the image shows fine
Copy the file onto a SD-Card
Open the file from the SD-Card → the image doesn’t open, or shows torn
Test Environment:
Colibri Development Board
iMX7D 512 GB
WEC 7 (latest stable image 1.3 from Toradex)
For our project this is a very serious issue. In the release roadmap issue WC-912 looks like the issue we are facing here, but it looks like it has only been resolved for WEC 2013.
We have tried slower clock frequencies as shown in the knowledge base, but it had no effect.
Hello Alex, thank you for looking into this right away! We double checked with different cards (Kingston, Sandisk - different sizes and ages) and different boards (Iris, Colibri Dev, and our own) - the corruption is the same.
But maybe I wasn’t precise enough in my instructions. You need to copy the file onto the SD-Card using Windows CE and the file needs to be larger than 32 kB. For me it happens every time and for every kind of file. It’s just in image files that you can visually spot the corruption right away - other files it’s harder to compare.
Could you try this instead:
On the PC, copy a large image file onto a FAT32 formatted SD-Card (like my attached test.bmp)
On WEC7 in the file explorer, use clipboard copy and paste to create a copy of the original file on the SD-Card
Open the original file using the WEC7 image viewer → it shows fine
Open the copy using the WEC7 image viewer → it either doesn’t show or shows corrupted
Take the SD-Card back to the PC and open the copied image → the corruption is the same
I’m attaching an example of the uncorrupted image and of a corrupted one.
For us the issue is not really copying, but when we create files in our application and write them directly to the SD-Card - as soon as they are large enough, they get corrupted. They don’t corrupt when written to internal Flash or USB-Drive.
Alex, thank you for being so fast in answering, that’s fantastic.
There must be a difference somewhere, even though I have no clue right now
On T20’s it works perfectly, but on iMX7 we have the issue. I’ll keep on digging.
Which board did you use?
We have used Iris and Colibri Dev Board.
It doesn’t affect read/write speed too much. Short transactions will be even faster. However big data transfer will definitely load CPU which can affect CPU hungry apps.