Program configuration information, Erasing the flash, Starting the bootloader – Rainbow Electronics AT89C5132 User Manual

Page 27

Advertising
background image

27

AT89C5132

4256A–USB–06/03

Program Configuration
Information

•

Parameter settings

•

instruction: LCALL FFF0h.

Notes: 1. Refer to the AT89C5132 datasheet for information on Write operation Timing.

2. No special resources are used by the bootloader during these operations.

Erasing the Flash

The AT89C5132 Flash memory is divided into four blocks:

Block 0: from address 0000h to 1FFFh (64 pages)

Block 1: from address 2000h to 3FFFh (64 pages)

Block 2: from address 4000h to 7FFFh (128 pages)

Block 3: from address 8000h to FFFFh (256 pages)

•

Parameter settings

•

Instruction: LCALL FFF0h.

Note:

1. Refer to the AT89C5132 datasheet for information on Write operation Timing, then

multiply this timing by the number of pages.

2. No special resources are used by the bootloader during these operations.

Starting the Bootloader

This routine allows to start at the beginning of the bootloader as after a reset. After call-
ing this routine the regular boot process is performed and the communication must be
opened before any action.
•

No special parameter setting

•

Set bit ENBOOT in AUXR1 register

•

instruction: LJUMP or LCALL at address F000h

API Name

api_command

api_dph

api_dpl

api_value

__api_clr_BLJB

07h

–

–

(HSB & BFh) |

40h

__api_set_BLJB

07h

–

–

HSB & BFh

__api_clr_X2

07h

–

–

(HSB & 7Fh) |

80h

__api_set_X2

07h

–

–

HSB & 7Fh

__api_wr_BSB

04h

–

00h

value to write

__api_wr_SBV

04h

–

01h

value to write

__api_wr_SSB

04h

–

05h

value to write

__api_wr_EB

04h

–

06h

value to write

API Name

api_command

api_dph

api_dpl

api_value

__api_erase_block0

00h

00h

–

–

__api_erase_block1

00h

20h

–

__api_erase_block2

00h

40h

–

__api_erase_block3

00h

80h

–

Advertising