Thanks
that command worked.
the system has always been able to read the CFI table.
I have compared what is read from the table with what the
chip specification says is actually in the chip and they match.
here is my script:
nios2-flash-programmer --device=2 --instance=0 --debug --sidp=0x02821038
--id=0x71d36849 --base=0x00000000 --width=8 --program ./flash/dir.flash
The system had trouble erasing three 8KByte sectors - I had to invoke the script
three times before all sectors were erased.
Then the system appeared to 'test' the writtability of the flash and reported the following:
Program sequence:
Write address 0x00000000 <= 0xF0
Write address 0x0000AAAA <= 0xAA
Write address 0x00005555 <= 0x55
Write address 0x0000000F <= 0x25
Write address 0x0000000F <= 0x00
Write address 0x0000000F <= 0x30
Write address 0x00000000 <= 0x29
Read address 0x0000000F => 0xFF
Program failed at offset F
Leaving target processor paused
/****/
It appears as though location 0xFF is still in the erased state.
So the write to that location did not work.
additionally the addressing seems incorrect. the algorithm writes
0xAA to location 0x0000AAAA // then
0x55 to location 0x00005555 // then writes
0x25 to location 0x0000000F //
in the specification for this chip it indicates the algorithm should be:
write:
0xAA to location 0x00000AAA // then
0x55 to location 0x00000555 /then wirte
<the intended data> to location <the intended address>
you see - the Nios2 programmer is writting to the incorrect location.