In-system programming, Bootloader execution, Software boot mapping – Rainbow Electronics AT89C5132 User Manual
Page 6: Hardware condition boot mapping, Programmed condition boot mapping

6
AT89C5132
4256A–USB–06/03
In-System
Programming
The ISP allows the user to program or reprogram the microcontroller’s on-chip Flash
memory through the serial line without removing it from the system and without the need
of a pre-programmed application.
This section describes how to start the UART bootloader and the higher level protocol
over the serial line.
Bootloader 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 F000h
to FFFFh. The boot memory is enabled by setting the ENBOOT bit in AUXR1. The three
ways to set this bit are detailed below.
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 2, 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 2, this bit is programmed (by hardware or software programming
mode), the chip reset set ENBOOT and forces the reset vector to F000h instead of
0000h, in order to execute the bootloader software.