Datasheet

16
4266C–CAN–03/08
AT89C51CC03 UART Bootloader
Flow Description
Example
Erase the Flash The flow described below allows the user to erase the Flash memory.
Two modes of Flash erasing are possible:
Full Chip erase
Block erase
The Full Chip erase command erases the whole Flash (64 Kbytes) and sets some Configuration
Bytes at their default values:
BSB = FFh
SBV = FCh
SSB = FFh (NO_SECURITY)
The full chip erase is always executed whatever the Software Security Byte value is.
The Block erase command erases only a part of the Flash.
Three Blocks are defined in the AT89C51CC03:
block0 (From 0000h to 1FFFh)
block1 (From 2000h to 3FFFh)
Host
Bootloader
Read Command
’X’ & CR & LF
RD_WR_SECURITY
Wait Read Command
Read Value
Send Security error
Send Data Read
Send Read Command
Wait Checksum Error
Wait Value of Data
Wait Security Error
OR
COMMAND ABORTED
COMMAND FINISHED
Send Checksum error
COMMAND ABORTED
’L’ & CR & LF
OR
’value’ & ’.’ & CR & LF
Checksum error
HOST : 02 0000 05 07 02 F0
BOOTLOADER : 02 0000 05 07 02 F0 Value . CR LF
HOST : 02 0000 01 02 00 FB
BOOTLOADER : 02 0000 01 02 00 FB Value . CR LF
Read function (read SBV)
Atmel Read function (read Bootloader version)