Hi,
I need to write in pflash. Target is : possible to write single byte into pflash. I am first erase sector and try to write data like this(on this same address):
- 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
- 0xFF, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
- 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
somethimes it works, and i am read data correctrly:
(for this example i am read: 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF)
but somethimes i am read some incorrect data like:
0x02, 0x02, 0x04, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF
and somethimes memory is crash and when i am read memory at this adrress then HardFault occur and CFSR have set bits: PRECISERR and BFARVALID.
for each case FTFC->FSTAT is set to 0x81(without first write). In summary writing to Pflash using my method is very unstable.