AT89C5132
7.3
Boot Memory Execution
As internal C51 code space is limited to 64K Bytes, some mechanisms are implemented to allow
boot memory to be mapped in the code space for execution at addresses from F000h to FFFFh.
The boot memory is enabled by setting the ENBOOT bit in AUXR1 (see Table 6). The three
ways to set this bit are detailed in the following sections.
7.3.1
7.3.2
Software Boot Mapping
The software way to set ENBOOT consists in writing to AUXR1 from the user’s software. This
enables bootloader or API routines execution.
Hardware Condition Boot Mapping
The hardware condition is based on the ISP pin. When driving this pin to low level, the chip reset
sets ENBOOT and forces the reset vector to F000h instead of 0000h in order to execute the
bootloader software.
As shown in Figure 7-3, the hardware condition always allows in-system recovery when user’s
memory has been corrupted.
7.3.3
Programmed Condition Boot Mapping
The programmed condition is based on the Bootloader Jump Bit (BLJB) in HSB. As shown in
Figure 7-3, when this bit is programmed (by hardware or software programming mode), the chip
resets ENBOOT and forces the reset vector to F000h instead of 0000h, in order to execute the
bootloader software.
Figure 7-3. Hardware Boot Process Algorithm
RESET
Hard Cond?
ISP = L?
Prog Cond?
BLJB = P?
Hard Cond Init
ENBOOT = 1
PC = F000h
FCON = 00h
Standard Init
ENBOOT = 0
PC = 0000h
FCON = F0h
Prog Cond Init
ENBOOT = 1
PC = F000h
FCON = F0h
User’s
Application
Atmel’s
Boot Loader
The software process (bootloader) is detailed in the AT89C5132 Bootloader datasheet.
19
4173E–USB–09/07