MS51
Nov. 28, 2019
Page
252
of 491
Rev 1.00
MS51
32K
SE
RIES
TE
CHNICAL RE
F
EREN
CE MA
N
UAL
CHPCON
– Chip Control
Register
SFR Address
Reset Value
CHPCON
9FH, All page, TA protected
Software 0000_00U0 b
Others 0000_00C0 b
7
6
5
4
3
2
1
0
SWRST
IAPFF
-
-
-
-
BS
IAPEN
W
R/W
-
-
-
-
R/W
R/W
Bit
Name
Description
6
IAPFF
IAP fault flag
The hardware will set this bit after IAPGO (IAPTRG.0) is set if any of the following condition is met:
(1) The accessing address is oversize.
(2) IAPCN command is invalid.
(3) IAP erases or programs updating un-enabled block.
(4) IAP erasing or programming operates under V
BOD
while BOIAP (CONFIG2.5) remains un-
programmed 1 with BODEN (BODCON0.7) as 1 and BORST (BODCON0.2) as 0.
This bit should be cleared via software.
0
IAPEN
IAP enable
0 = IAP function Disabled.
1 = IAP function Enabled.
Once enabling IAP function, the HIRC will be turned on for timing control. To clear IAPEN should
always be the last instruction after IAP operation to stop internal oscillator if reducing power
consumption is concerned.