One of the boards I am working on has a 16-bit STMicro NOR flash. According to the datasheet, four cycles are required to program the flash through software.
1) 0x555 = 0xAA 2) 0x2AA = 0x55 3) 0x555 = 0xA0 4) actual address = actual dataMy questions are:
a) In 1), 2) and 3) above, does the flash's internal mechanism actually write the given data bytes at the given locations, for example, 0xAA at the location 0x555 which happens to be in the first sector? If the board loses its power before 4) is done, then will 0xAA/
0x55/0xA0 be there in the flash if I read its contents using a hardware tool?b) What would happen, if, say, immediately after 1) or 2) or 3) above, the RTOS task that wanted to (raw) write to a sector is preempted (due to some bad coding) by another task that invokes some file I/O routines to access the flash file system layered on top of other sectors?
Any link that explains the flash internal workings would really be helpful. Thanks.