HIGHLY TECHNICAL: How to force flush, or how does internal firmware work?

This is a highly technical question.  If you know details, please help.  If you know an engineer who may know, please forward.  Thanks.

I am developing a new handheld product with embedded microprocessor that uses a USB Flash Drive.  As extra detail, I’ll point out that I’m using an FTDI VNC2 chip to provide my microprocessor with a USB 2.0 host interface into which the USB Flash Drive plugs.

I’ve been running a test where I cycle power on to the VNC2 and USB Flash Drive, create/write/close a file, wait 5 seconds, and then cycle power back off.  If I run this test for a couple thousand times, I inevitably find some kind of corruption has occurred to the USB Flash Drive contents.

I’ve been trying to figure out how to prevent this corruption, but I’m having no luck.  That’s why the 5 second wait was in there, in case the USB Flash Drive was being slow flushing its internal cache (if any) to the actual flash cells.  But it didn’t help.  I’ve tried numerous other things, but just can’t fix the problem.

So, I’m at the point where I must learn more about the internal operation of the USB Flash Drive, so that I can yell at it (aka offer some commands or actions) to keep this from happening.  (FTDI support said some drives require you to write a sector twice in a row to cause a flush.)  Alternatively, I need an alternative high-capacity (>64GB) USB Flash Drive that is somehow more robust and won’t let this happen.  (Perhaps it always flushes immediately or something.)

Advice on how to stop corruption or a drive that won’t allow such corruption is greatly appreciated.

WAQ I believe it’s the system that does the reading and writing to the USB drive’s job to close and unmount the drive before the system shuts down.  If power is removed the ability to do that is lost.  Not the flash drive’s problem.