NuMicro® NUC029LEE/NUC029SEE
32-bit Arm
®
Cortex
®
-M0 Microcontroller
Aug, 2018
Page
149
of
497
Rev 1.00
N
U
MICRO
®
N
UC02
9L
E
E
/N
UC029
S
E
E
T
E
CHN
ICA
L R
E
F
E
R
E
NC
E
M
A
NU
A
L
6.4.4.3 Boot Selection
The NuMicro
®
NUC029LEE/NUC029SEE provides In-System-Programming (ISP) feature to
enable user to update program memory by a stand-alone ISP firmware. A dedicated 8 KB
program memory (LDROM) is used to store ISP firmware. User can select to start program fetch
from APROM or LDROM by CBS[1] in CONFIG0.
In addition to setting boot from APROM or LDROM, CBS in CONFIG0 is also used to control
system memory map after booting. When CBS[0] = 1 and set CBS[1] = 1 to boot from APROM,
the application in APROM will not be able to access LDROM by memory read. In other words,
when CBS[0] = 1 and CBS[1] = 0 are set to boot from LDROM, the software executed in LDROM
will not be able to access APROM by memory read. Figure 6.4-3 shows the memory map when
booting from APROM and LDROM.
APROM
0x0000_0000
CBS = 11b
LDROM
(8K)
0x0000_0000
CBS = 01b
0x0000_1FFF
(APROM Size
–
1)
Figure 6.4-3 Program Executing Range for Booting from APROM and LDROM
For the application that software needs to execute code in APROM and call the functions in
LDROM or to execute code in LDROM and call the APROM function without changing boot mode,
CBS[0] needs to be set as 0 and this is called In-Application-Programming(IAP).
6.4.4.4 In-Application-Programming (IAP)
The NuMicro
®
NUC029LEE/NUC029SEE provides In-application-programming (IAP) function for
user to switch the code executing between APROM and LDROM without a reset. User can enable
the IAP function by re-booting chip and setting the chip boot selection bits in CONFIG0 (CBS[1:0])
as 10b or 00b.
In the case that the chip boots from APROM with the IAP function enabled (CBS[1:0] = 10b), the
executable range of code includes all of APROM and LDROM. The address space of APROM is
kept as the original size but the address space of the 8 KB LDROM is mapped to 0x0010_0000~
0x0010_1FFF.
In the case that the chip boots from LDROM with the IAP function enabled (CBS[1:0] = 00b), the
executable range of code includes all of LDROM and almost all of APROM except for its first
page. User cannot access the first page of APROM by CPU because the first page of executable
code range becomes the mirror of the first page of LDROM as set by default. Meanwhile, the
address space of 8 KB LDROM is mapped to 0x0010_0000~0x0010_1FFF.
Please refer to Figure 6.4-4 for the address map while IAP is activating.