Datasheet
10
4266C–CAN–03/08
AT89C51CC03 UART Bootloader
Programming the
Flash or EEPROM data
The flow described below shows how to program data in the Flash memory or in the EEPROM
data memory.
The bootloader programs on a page of 128 bytes basis when it is possible.
The host must take care that:
• The data to program transmitted within a frame are in the same page.
Requests from Host
Answers from
Bootloader
The bootloader answers with:
• ‘.’ & ‘CR’ & ’LF’ when the data are programmed
• ‘X’ & ‘CR’ & ‘LF’ if the checksum is wrong
• ‘P’ & ‘CR’ & ‘LF’ if the Security is set
Flow Description
Example
Command Name
Record
Type
Load
Offset
Record
Length Data[0] ... Data[127]
Program Flash 00h
start
address
nb of Data x ... x
Program EEPROM
Data
07h
start
address
nb of Data x ... x
Host
Bootloader
Write Command
’X’ & CR & LF
NO_SECURITY
Wait Write Command
Checksum error
Wait Programming
Send Security error
Send COMMAND_OK
Send Write Command
Wait Checksum Error
Wait COMMAND_OK
Wait Security Error
OR
COMMAND ABORTED
COMMAND FINISHED
Send Checksum error
COMMAND ABORTED
’P’ & CR & LF
OR
’.’ & CR & LF
HOST : 01 0010 00 55 9A
BOOTLOADER : 01 0010 00 55 9A . CR LF
Programming Data (write 55h at address 0010h in the Flash)