Electronic – Flash memory corruption due to electricals

flash

I'm a software developer working on an in-vehicle (WinCE) device that uses an SDIO card for its storage.

We are suffering from (seemingly) random corruptions of the data, seemingly from the FAT table getting corrupted. You may find inaccessible directories, files with "junk" half way through them, and so on. The card does NOT seem to suffer from physical damage (bad sectors) – a chkdsk fixes the FAT in most cases (the data of course is in trouble).

This sounds like a classic case of power loss in the middle of writes, so we've implemented a fair bit to combat that scenario.

We now have electronics to notify us that the master switch has been turned off, and give the application running on the device enough time to shut down cleanly.

Despite all that, we still have the problem. We seem to see corruption, even in the absence of a "dirty" shutdown.

Assuming for a second that the software side is all correct. Is it within the realms of possibility that momentary spikes, brown-outs,or other irregularlities in the power supply could cause what we're seeing? We have filters etc. in place to shut

Is it possible the ESD/electromagnetic interference could cause any of the above? Any other thoughts from an electrical/electronics side?

Much appreciated.

Best Answer

This is probably a software bug. However, you did say "vehicle", which implies unusually nasty power. If this is a normal car, then the "12V" power is about as bad as such things get electrically. You definitely can NOT just connect the 12V car power directly to your single board computer (or whatever your hardware is) unless it is specifically rated for "automotive power", even if it has a 12V or so power input.

Car power can be nearly 14V in normal operation, and can have 10s of volts of short term spikes. These can confuse or destroy electronics not specifically designed with them in mind.

You didn't say what voltage and current your computer needs, but the easiest solution is to get a "automotive rated" power supply that makes the right DC voltages. There must be such things available off the shelf somewhere.