In-system programming (isp) – Rainbow Electronics AT89C5131 User Manual

Page 53

Advertising
background image

53

AT89C5131

4136A–USB–03/03

In-System
Programming (ISP)

With the implementation of the User EEPROM and the Boot EEPROM in Flash technol-
ogy the AT89C5131 allows the system engineer to develop applications with a very high
level of flexibility. This flexibility is based on the possibility to alter the customer pro-
gramming on all stages of a product’s life:

During the final production phase, the 1st personalization of the product by parallel
or serial charging of the code in the User EEPROM and if wanted also a customized
Bootloader in the Boot memory (Atmel will provide also a standard Bootloader by
default).

After assembling of the product in its final stage, embedded position by serial mode
via the USB bus.

This In-System Programming (ISP) allows code modification over the total lifetime of the
product.

Besides the default Bootloader, Atmel will provide to the customer all the needed Appli-
cation Programming Interfaces (API) which are needed for ISP. The API will be located
in the Boot memory.

This will allow the customer to have a full use of the 32-Kbyte user memory.

Two blocks Flash memories are implemented (see Figure 22):

Flash memory FM0:
32-Kbytes of program memory organized in a page of 128 bytes,

Flash memory FM1:
3-Kbytes for default bootloader and Application Programming Interfaces (API).

The FM0 supports both, hardware (parallel) and software programming whereas FM1
supports only hardware programming.

The ISP functions are assumed by:

FCON register and bit ENBOOT in AUXR1 register

Bootloader Jump Bit (BLJB), which forces the application execution

Software Boot Vector (SBV), which can be read and modified by using an API or the
parallel programming mode. The SBV is stored in XROW

The Extra Byte (EB) and Boot Status Byte (BSB) can be modified only by using API.
EB is stored in XROW

The bit ENBOOT in AUXR1 register allows to map FM1 between address F400h and
FFFFh of FM0.

The FM0 can be programmed by:

The Atmel bootloader, located by default in FM1.

The user bootloader located in FM0

The user bootloader located in FM1 in place of Atmel bootloader.

API contained in FM1 can be called by the user bootloader located in FM0 at the
address [SBV]00h.

The user program simply calls the common entry point with appropriate parameters in
FM1 to accomplish the desired operation (all these methods will be described in Appli-
cation Notes on API-description).

Boot Flash operations include: erase block, program byte or page, verify byte or page,
program security lock bit, etc. Indeed, Atmel provides the binary code of the default
Flash bootloader.

Advertising