Datasheet

18
AT89C5132
4173C–USB–07/04
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.
Software Boot Mapping The software way to set ENBOOT consists in writing to AUXR1 from the user’s soft-
ware. 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 12, the hardware condition always allows in-system recovery when
user’s memory has been corrupted.
Programmed Condition Boot
Mapping
The programmed condition is based on the Bootloader Jump Bit (BLJB) in HSB. As
shown in Figure 12, 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 12. Hardware Boot Process Algorithm
The software process (bootloader) is detailed in the AT89C5132 Bootloader datasheet.
Preventing Flash Corruption See “Reset Recommendation to Prevent Flash Corruption” on page 44.
Atmel’s
Boot Loader
HardwareSoftware
Hard Cond?
ISP
= L?
RESET
Hard Cond Init
ENBOOT = 1
PC = F000h
FCON = 00h
Prog Cond?
BLJB = P?
Standard Init
ENBOOT = 0
PC = 0000h
FCON = F0h
Prog Cond Init
ENBOOT = 1
PC = F000h
FCON = F0h
User’s
Application
Process Process