
MS51
Dec. 17, 2019
Page
69
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
CHPCON
– Chip Control
Regiser
Address
Reset Value
CHPCON
9FH, all pages,TA protected
Software: 0000_00U0b
Others 0000_00C0b
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 fla
The hardware will set this bit after IAPGO (ISPTRG.0) is set if any of the following condition is met:
(1) The accessing address is oversize.
(2) IAPCN commanis 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.
1
BS
Boot select
This bit defines from which block that MCU re-boots after all resets.
0 = MCU will re-boot from APROM after all resets.
1 = MCU will re-boot from LDROM after all resets.
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.