Writing to flash problems
Hello again,
After figuring out how to unlock my flash partition, I've been experimenting with writing to it. Erasing the partition seems to work perfectly.
I have a file which contains 2 characters:
12
First I erase the partition with eraseall /dev/mtd3
Then I write data to the partition withmtd_debug write /dev/mtd3 0 2 data
I retrieve the data withmtd_debug read /dev/mtd3 0 2 data.new
The contents of data.new is 2 characters:
11
Now, if I repeat the process (without erasing) with the data 22, the new contents of data.new is 00.
So to me it looks like I have two problems: writing to the words themselves is not functioning, and the only way to set bits to 1 is by erasing ('0' == '1' & '2'). In fact, this is in the documentation for the flash: "If users attempt to program "1"s, the memory cell contents do not change and no error occurs."
So it looks like I need to erase before writing to fix my second problem. I've tried putting in an erase command in do_write_oneword, but I get timeout errors.
I'd really appreciate any pointers!
Thanks,
Chris