8.5.9 CONFIG9

Configuration Byte 9
Note:
  1. When SAFLOCK = 0, once a SAFSZ bit is programmed to 0 through ICSP or a self-write, it can never be erased to a ‘1’, not even through a Bulk Erase.
  2. When SAFLOCK = 1, once a SAFSZ bit is programmed to 0 through ICSP or a self-write, it can only be reset though a Bulk Erase.
Name: CONFIG9
Address: 30 0019h

Bit 76543210 
 SAFSZ[7:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 11111111 

Bits 7:0 – SAFSZ[7:0]  SAF Block Size Selection(1, 2)

Table 8-2. SAF Block Size
WRTSAF SAFLOCK SAFSZ[7:0] SAF Block Size SAF Bulk Erase SAF Self-write
PIC18Fx4Q20 PIC18Fx5Q20 PIC18Fx6Q20
1 1 1111 1111 Storage Area Flash disabled Yes Yes
1 1 1111 1110 Last 128 words of PFM Yes Yes
1 1 1111 110x Last 256 words of PFM Yes Yes
1 1 1111 10xx Last 384 words of PFM Yes Yes
1 1 1111 0xxx Last 512 words of PFM Yes Yes
1 1 1110 xxxx Last 640 words of PFM Yes Yes
1 1 110x xxxx Last 768 words of PFM Yes Yes
1 1 10xx xxxx Last 896 words of PFM Yes Yes
1 1 0xxx xxxx Last 1024 words of PFM Yes Yes
0 1 1111 1111 Storage Area Flash disabled Yes No
0 1 1111 1110 Last 128 words of PFM Yes No
0 1 1111 110x Last 256 words of PFM Yes No
0 1 1111 10xx Last 384 words of PFM Yes No
0 1 1111 0xxx Last 512 words of PFM Yes No
0 1 1110 xxxx Last 640 words of PFM Yes No
0 1 110x xxxx Last 768 words of PFM Yes No
0 1 10xx xxxx Last 896 words of PFM Yes No
0 1 0xxx xxxx Last 1024 words of PFM Yes No
x 0 1111 1111 Storage Area Flash disabled No No
x 0 1111 1110 Last 128 words of PFM No No
x 0 1111 110x Last 256 words of PFM No No
x 0 1111 10xx Last 384 words of PFM No No
x 0 1111 0xxx Last 512 words of PFM No No
x 0 1110 xxxx Last 640 words of PFM No No
x 0 110x xxxx Last 768 words of PFM No No
x 0 10xx xxxx Last 896 words of PFM No No
x 0 0xxx xxxx Last 1024 words of PFM No No
When SAFLOCK = 0, once a SAFSZ bit is programmed to 0 through ICSP or a self-write, it can never be erased to a ‘1’, not even through a Bulk Erase. When SAFLOCK = 1, once a SAFSZ bit is programmed to 0 through ICSP or a self-write, it can only be reset though a Bulk Erase.