AnsweredAssumed Answered

sdcard read/write data corruption

Question asked by keno on Nov 26, 2014
Latest reply on Mar 10, 2016 by keno

My environment: Vybrid custom board based on twrvf65gs10_a5, MQX 4.1.1, IAR toolchain


I see others have experienced similar problems when reading from / writing to the sdcard.  In my particular case we are compiling for a ddr target and then transferring the binary to the target sdcard using the MQX FTP server.  Occasionally (about 1 in 10-15 times) the file will be corrupted and is isolated to a contiguous block of 32 bytes occurring at various address locations within the file.  I've attached diff snapshots which show the 32 byte blocks that are corrupted during 3 different occurrences.  A corruption also sometimes occurs when the bootloader copies the binary from the sdcard into ddr which is caught by the md5 checking in the bootloader.  I have not yet evaluated what gets corrupted during a copy from sdcard to ddr.


My suspicion was that it may be cache related since the corruption occurs within a 32 byte block.  I noticed the MQX 4.1.1 release notes mentioned a couple resolved issues (MQX-1445, MQX-4216) that could be related however the problem still occurs after transitioning from 4.1 to 4.1.1.


Is anyone else using the sdcard and getting consistently reliable operation?


Any other info or testing that would help further diagnose the issue?


2nd occurrence.png

3rd occurrence.png

4th occurrence.png