SD-Card file corruption on iMX7D WEC7 1.3

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.

What can we do get SD-Card working?


I followed your steps but wasn’t able to reproduce your issue neither on 1.2 nor on 1.3 version of WEC7 BSP. Have you tried another SD card?

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.

Thank you so much for helping out here.

TEST - Copy.BMP (1.1 MB)

Yes I’ve copied file from USB stick to SD card using Win CE

  • Double click on “My device”
  • Go to “USB HD”
  • Right click on “test.bmp”
  • Select “Copy”
  • Go to to “SD Card”
  • Right click and select “Paste”
  • Then double click on test.bmp
  • Result : Image as expected
    Then I’ve compared both test.bmp files and they are identical

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 :frowning:
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.

Сolibri iMX7D v1.1B
Colibri Evaluation Board v3.1A
Samsung PRO 32GB SD card

Hi Alex,

I have found a difference:

  • SD Card works fine on WEC7 1.3B2.
  • Corruption issues show on WEC7 1.3 (2021-11-25)

When I install (bootloader and OS image). SD-Card is working fine.

When I install, which is the official stable version, SD-Card writes have corruption issues.

We reproduced the mistake on:

  • Boards: Aster, Iris and Colibri Dev Board V3.1a
  • CoM: Multiple iMX7 1.1D 512 GB
  • SD-Cards: Kingston SDHC 4GB, Sandsik Ultra 16 GB, and others

I’m really very sure, that this is neither a boards issue, nor a card issue but in the OS image.

I’m hesitant to go back from using the official 1.3 image to 1.3b2 as we intend to use SPI in the near future, and 1.3 lists fixes for SPI.

Thanks for your help here!

Yes I can confirm reported issue with 1.3 image. We will investigate it and post an update ASAP.

1 Like

As a workaround you can disable DMA

“DisableDMA” = dword:1


Yes, this does solve the issue. I haven’t checked the impact on performance, yet.
Thanks for the workaround and for looking into the issue right away!

Greetings from Bavaria,

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.

Thanks, very good to know!
Are you planning to release a new OS image that will have DMA reenabled for SD-Card?

Yes, this issue will be fixed in the next release.

1 Like