On 10/02/12 21:52, Salvatore Galfano wrote: > I'm wondering about injecting some errors (i.e., flipping or forcing to > a value a certain group of bits of a specific page) in a simulated nand > flash device. Is it possible? How could it be done? The eCos synthetic NAND device has just such a compile-time option. Refer to: http://hg-pub.ecoscentric.com/nand-ecoscentric/file/a9d12f1a0c5b/packages/devs/nand/synth/current/src/nand_synth.c - particularly the sections mediated by #ifdef CYGSEM_NAND_SYNTH_RANDOMLY_LOSE. Obviously that synthetic device ties in to the eCos NAND driver architecture, but hopefully the concept is clear enough to illustrate what you might do in (for example) mtd to inject random bit errors. Obviously, you'd tune the error injection frequency to suit your intended real device. Note that in an application-level test (e.g. running a filesystem) it is particularly important to make sure that you occasionally inject faults into the out-of-band area as well as the page data, to ensure that the ECC implementation is complete. Ross