發新話題
打印

Flash lock byte 使用疑問

hi!
1. 寫入flash lock byte之後要在下一次reset之後lock byte才有作用.所以也要檢查lock byte是否寫對要lock page的位置.

2.
在spec中有對flash lock byte的使用限制說明
Accessing FLASH from user firmware executing on a locked page:
1. Any unlocked page except the page containing the Lock Byte may be read, written, or erased.
2. Any locked page except the page containing the Lock Byte may be read, written, or erased.
3. The page containing the Lock Byte cannot be erased. It may only be read or written.
4. Reading the contents of the Lock Byte is always permitted.
5. Locking additional pages (changing 1s to 0s in the Lock Byte) is not permitted.
6. Unlocking FLASH pages (changing 0s to 1s in the Lock Byte) is not permitted.
7. The Reserved Area cannot be read, written, or erased. Any attempt to access the reserved area, or any other locked page, will result in a FLASH Error device reset.

TOP

發新話題