[En-Nut-Discussion] UFLASH Write Appends Trash Data
bobwirka at yahoo.com
Sat Mar 21 15:21:20 CET 2015
Running Ethernut 4.10.3 on an AT91SAM7X512 with UFLASH and an AT45DB161E data flash.
After each reboot, we refresh a small (8K) xml file by recreating it and writing it to the flash file system.
Normally this works perfectly. However if we modify another file so that the IP address will change and then reboot, the xml file we create has about 1400 "FF" characters and some "random" bytes appended to the good xml data.
Here's the weird part: If, after creating the (bad) xml file, we open a dummy file for writing, close it, then erase it, the xml file is good. The name of the dummy file doesn't matter.
The file we modify to cause this issue is a configuration file. The issue happens we change the IP address that the unit is to use on the next boot-up. Changing other data in the configuration file doesn't **seem** to cause this issue, though we haven't tested all possible changes.
After a "bad" xml file has been created, we can FTP the file out from the unit, complete with all the extra bad data.
Files are closed before rebooting.
Any of this sound famiiar?
More information about the En-Nut-Discussion