Filesystem problem in flashdisk on Colibri iMX6 & WEC7

We encountered a problem with the iMX6DL modules regarding the file system in the Flashdisk.

If our application writes data to a file, sometimes the contents of the file system disappear !!!
All the contents of the Flashdisk except the “\Flashdisk\Windows” folder.

Contents of the file system before the problem:

Contents of the file system after the problem:

Scan utility detects multiple problems in the flashdisk partition, as shown in the following image:

This happens randomly.

During the tests we didn’t write during the module shutdown, of course.
We also tried to format the FlashDisk with exFAT + TFAT option, without solving the problem.

Our application is written in C# and uses the .NET35, SQLCE and TdxAllLibrariesDll libraries.

As a test, we performed the same tests on Colibri T20 modules (same application .exe, WEC7, .NET35, SQLCE and TdxAllLibrariesDll).

On T20 modules the problem does not exist.

How can we solve?
Any ideas?

Can you create a minimal project without SQLCE which will demonstrate this issue?

We have disabled the eMMC Trim function, as indicated in the link: Windows Embedded Compact - iMX6 BSP Release

and the problem has been fixed.

1 Like

Hi @alex.tx,

I’ve been seeing similar symptoms to the ones described in this topic. I have existing code which works perfectly on a T20, but when I run that code on an iMX6 with image 1.6 then some of the files and folders which are created in flash by my application disappear spontaneously. Some files also seem to be truncated.

I tried the suggestion of setting [HKLM\Drivers\SDCARD\ClientDrivers\Class\MMC_Class\High_Capacity] EnableTrim=dword:0 and that solved the problem for me too!

Can you say a bit more about why this registry settings helps and what the negative side-effects of using it might be? Is there a bug in the latest iMX6 WinCE image which needs to be fixed? I’m a bit spooked by this as I was really hoping that the eMMC flash in the newer modules would be more reliable than the old flash in the T20.


Yes v1.6 BSP has a bug related to TRIM implementation. It’s fixed at BSP 1.7 release

Ah, I did look for newer images than 1.6 before I wrote my last comment but I looked here and the latest image on that page is 1.6:

But after your comment about image 1.7 I looked in this page and found images 1.7 and 1.8 there:

The latest image supported by TEZI seems to be 1.6 and I made the bad assumption that all images are supported by TEZI these days so I didn’t go looking for a newer image. I have now downloaded and installed image 1.8 and confirmed that it solves the problem described in this topic without needing to edit the registry to disable the eMMC trim feature.