Forum Discussion
Altera_Forum
Honored Contributor
21 years agoMTD do_write_oneword fails
Hi I'm having some trouble with writing to a flash partition on our board running Microtronix 1.4 uclinux 2.6 We have 5 partitions on our flash: static struct mtd_partition microtr...
Altera_Forum
Honored Contributor
21 years agoYou are correct about the part where the sectors need to be erased - this is done by the MTD.
The MTD reads the sector involved (places this in a RAM buffer), erases the correct sector, places the new file values in the RAM buffer and then commits this to the erased sector. If it was a problem with the Flash not being erased before writing, then the failure would not be random, but rather it would fail at the same addresses each time, as they were not erased. I'll try to see if I can narrow down the problem by enabling the MTD debug.