English
Language : 

PIC16LF18854 Datasheet, PDF (182/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
10.4.9 WRERR BIT
The WRERR bit can be used to determine if a write
error occurred.
WRERR will be set if one of the following conditions
occurs:
• If WR is set while the NVMADRH:NMVADRL
points to a write-protected address
• A Reset occurs while a self-write operation was in
progress
• An unlock sequence was interrupted
The WRERR bit is normally set by hardware, but can
be set by the user for test purposes. Once set, WRERR
must be cleared in software.
TABLE 10-4: ACTIONS FOR PFM WHEN WR = 1
Free
LWLO
Actions for PFM when WR = 1
Comments
1
x
Erase the 32-word row of NVMADRH:NVMADRL • If WP is enabled, WR is cleared and
location. See Section 10.4.3 “NVMREG Write
WRERR is set
to EEPROM”
• All 32 words are erased
• NVMDATH:NVMDATL is ignored
0
1
Copy NVMDATH:NVMDATL to the write latch • Write protection is ignored
corresponding to NVMADR LSBs. See Section • No memory access occurs
10.4.4 “NVMREG Erase of PFM”
0
0
Write the write-latch data to PFM row. See Sec- • If WP is enabled, WR is cleared and
tion 10.4.4 “NVMREG Erase of PFM”
WRERR is set
• Write latches are reset to 3FFh
• NVMDATH:NVMDATL is ignored
DS40001824A-page 182
Preliminary
 2016 Microchip Technology Inc.