8.5.7 CONFIG7

Configuration Byte 7
Note:
  1. Once protection is enabled through ICSP™ or a self-write, it can only be reset through a Bulk Erase.
  2. BBSIZE[2:0] bits can only be changed when BBEN = 1. Once BBEN = 0, BBSIZE[2:0] can only be changed through a Bulk Erase.
Name: CONFIG7
Address: 0x300006

Bit 76543210 
   DEBUGSAFENBBENBBSIZE[2:0] 
Access R/WR/WR/WR/WR/WR/W 
Reset 111111 

Bit 5 – DEBUG Debugger Enable

ValueDescription
1 Background debugger disabled
0 Background debugger enabled

Bit 4 – SAFEN  Storage Area Flash (SAF) Enable(1)

ValueDescription
1 SAF is disabled
0 SAF is enabled

Bit 3 – BBEN  Boot Block Enable(1)

ValueDescription
1 Boot Block is disabled
0 Boot Block is enabled

Bits 2:0 – BBSIZE[2:0]  Boot Block Size Selection(2)

Table 8-1. Boot Block Size
BBEN BBSIZE End Address of Boot Block Boot Block Size (words)
PIC18FX4Q40 PIC18FX5Q40 PIC18FX6Q40
1 xxx
0 111 00 03FFh 512
0 110 00 07FFh 1024
0 101 00 0FFFh 2048
0 100 00 1FFFh 4096
0 011 00 3FFFh 8192
0 010 00 7FFFh 16384
0 001 00 FFFFh
0 000 01 FFFFh
Once protection is enabled through ICSP™ or a self-write, it can only be reset through a Bulk Erase. BBSIZE[2:0] bits can only be changed when BBEN = 1. Once BBEN = 0, BBSIZE[2:0] can only be changed through a Bulk Erase.