at89c51snd1 ATMEL Corporation, at89c51snd1 Datasheet

no-image

at89c51snd1

Manufacturer Part Number
at89c51snd1
Description
Mp3 Microcontrollers
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at89c51snd1C-7HTUL
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
at89c51snd1C-ROTUL
Manufacturer:
Atmel
Quantity:
10 000
Features
Description
This document describes the UART bootloader functionalities as well as the serial
protocol to efficiently perform operations on the on-chip Flash memory. Additional
information for the AT89C51SND1 product can be found in the AT89C51SND1 data
sheet and the AT89C51SND1 errata sheet available on the Atmel web site,
www.atmel.com.
The bootloader software package (source code and binary) currently used for produc-
tion is available from the Atmel web site.
Bootloader Revision
Revision 1.0.0
Revision 1.1.0
Protocol
In-System Programming
In-Application Programming/Self-Programming
– UART Used as a Physical Layer
– Based on the Intel Hex-type Records
– Autobaud
– Read/Write Flash Memory
– Read Device IDs
– Block Erase
– Full-chip Erase
– Read/Write Configuration Bytes
– Security Setting From ISP Command
– Remote Application Start Command
– Read/Write Flash Memory
– Read Device IDs
– Block Erase
– Read/Write Configuration Bytes
– Bootloader Start
Purpose of Modifications
New release increasing programming
speed
Bug fix in boot process
Date
June 2002
October 2002
MP3
Microcontrollers
AT89C51SND1
UART
Bootloader
4241B–MP3–07/04
1

Related parts for at89c51snd1

at89c51snd1 Summary of contents

Page 1

... This document describes the UART bootloader functionalities as well as the serial protocol to efficiently perform operations on the on-chip Flash memory. Additional information for the AT89C51SND1 product can be found in the AT89C51SND1 data sheet and the AT89C51SND1 errata sheet available on the Atmel web site, www.atmel.com. ...

Page 2

... Programming Capability Block Diagram AT89C51SND1 UART Bootloader 2 The AT89C51SND1 bootloader facilitates In-System Programming and In-Application Programming. In-System Programming (ISP) allows the user to program or reprogram a microcontrol- ler’s on-chip Flash memory without removing it from the system and without the need of a pre-programmed application. ...

Page 3

... Mapping and Default Value of Hardware Security Byte 4241B–MP3–07/04 AT89C51SND1 UART Bootloader The purpose of this process is to manage the communication and its protocol between the on-chip bootloader and an external device (host). The on-chip bootloader imple- ments a serial protocol (see Section “Protocol”, page 9). This process translates serial communication frames (UART) into Flash memory accesses (read, write, erase, etc ...

Page 4

... Software Security Byte Software Boot Vector AT89C51SND1 UART Bootloader 4 The bootloader has Software Security Byte (SSB) to protect itself from user access or ISP access. The Software Security Byte (SSB) protects from ISP accesses. The command “Program Software Security Bit” can only write a higher priority level. There are three levels of security: • ...

Page 5

... FLIP Software Program 4241B–MP3–07/04 AT89C51SND1 UART Bootloader Figure 2. Software Boot Vector User Bootloader Application FM0 FLIP software program running under Windows ® and LINUX that supports all Atmel Flash microcontrollers. This free software program is available on the Atmel web site. ...

Page 6

... Software Boot Mapping Hardware Condition Boot Mapping Programmed Condition Boot Mapping AT89C51SND1 UART Bootloader 6 The ISP allows the user to program or reprogram a 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. ...

Page 7

... Regular Boot Process 4241B–MP3–07/04 AT89C51SND1 UART Bootloader Figure 3. Boot Process Algorithm Standard Init ENBOOT = 0000h FCON = F0h User’s Application RESET Hard Cond? ISP Prog Cond? Hard Cond Init BLJB = P? ENBOOT = F000h FCON = 00h Prog Cond Init ...

Page 8

... Physical Layer Frame Description AT89C51SND1 UART Bootloader 8 The UART used to transmit information has the following configuration: • Character: 8-bit data • Parity: none • Stop: 1 bit • Flow control: none • Baud rate: auto baud is performed by the bootloader to compute the baud rate chosen by the host ...

Page 9

... Autobaud Performances Command Data Stream Protocol 4241B–MP3–07/04 AT89C51SND1 UART Bootloader An initialization step must be performed after each Reset. After microcontroller reset, the bootloader waits for an auto baud sequence (see Section “Autobaud Performances”, page 9). When the communication is initialized the protocol depends on the record type issued by the host. The host initiates the communication by sending a “ ...

Page 10

... Characters per Byte) Echo Analysis Programming the Flash Data Requests from Host Answers from Bootloader AT89C51SND1 UART Bootloader 10 ":" ":" The flow described in Figure 6 shows how to program data in the Flash memory. The bootloader programs on a page of 128 bytes basis when it is possible. ...

Page 11

... OR Wait Security Error COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED Programming Example 4241B–MP3–07/04 AT89C51SND1 UART Bootloader Write Command “X” & CR & LF “P” & CR & LF “.” & CR & LF Programming Data (write 55h at address 0010h in the Flash) HOST : 01 0010 BOOTLOADER : 01 0010 ...

Page 12

... COMMAND FINISHED Wait Address not Erased COMMAND FINISHED AT89C51SND1 UART Bootloader 12 The flow described in Figure 7 allows the user to read data in the Flash memory. A blank check command is possible with this flow. The device splits into blocks of 16 bytes the data to transfer to the Host if the number of data to display is greater than 16 data bytes ...

Page 13

... COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait Display Data All Data Read COMMAND FINISHED 4241B–MP3–07/04 AT89C51SND1 UART Bootloader Blank Check ok HOST : 05 0000 04 0000 7FFF 01 78 BOOTLOADER : 05 0000 04 0000 7FFF Blank Check ok at address xxxx HOST : 05 0000 04 0000 7FFF 01 78 ...

Page 14

... Blank Check Example Program Configuration Information Requests from Host Answers from Bootloader AT89C51SND1 UART Bootloader 14 Display data from address 0000h to 0020h HOST : 05 0000 04 0000 0020 00 D7 BOOTLOADER : 05 0000 04 0000 0020 00 D7 BOOTLOADER 0000=-----data------ CR LF BOOTLOADER 0010=-----data------ CR LF BOOTLOADER 0020=data CR LF The flow described in Figure 9 allows the user to program Configuration Information regarding the bootloader functionality ...

Page 15

... OR Wait Security Error COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED Program Configuration Example 4241B–MP3–07/04 AT89C51SND1 UART Bootloader Write Command “X” & CR & LF “P” & CR & LF “.” & CR & LF Programming Atmel function (write SSB to level 2) HOST : 02 0000 0000 ...

Page 16

... OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait Value of Data COMMAND FINISHED AT89C51SND1 UART Bootloader 16 The flow described in Figure 10 allows the user to read the configuration or manufac- turer information. Record Command Name Type Read Manufacturer Code Read Family Code ...

Page 17

... 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. Four Blocks are defined in the AT89C51SND1: • block0 (From 0000h to 1FFFh) • block1 (From 2000h to 3FFFh) • ...

Page 18

... Send Erase Command OR Wait Checksum Error COMMAND ABORTED OR Wait Security Error COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED Example AT89C51SND1 UART Bootloader 18 Erase Command “X” & CR & LF “P” & CR & LF “.” & CR & LF Full Chip Erase HOST : 01 0000 BOOTLOADER : 01 0000 ...

Page 19

... Start the Application Requests from Host Answer from Bootloader Start Application Example 4241B–MP3–07/04 AT89C51SND1 UART Bootloader The command described below allows to start the application directly from the boot- loader upon a specific command reception. Two options are possible: • Start the application with a reset pulse generation (using watchdog). ...

Page 20

... All routines to access Flash data are managed directly from the application without using bootloader resources. To read the Flash memory the bootloader is not involved. For more details on these routines see the AT89C51SND1 Datasheet sections “Pro- gram/Code Memory”. Two routines are available to program the Flash: – ...

Page 21

... Read Configuration and Manufacturer Information Program Configuration Information 4241B–MP3–07/04 AT89C51SND1 UART Bootloader • The application program loads the column latches of the Flash then calls the __api_wr_code_byte or __api_wr_code_page “Program/Code Memory ” . • Parameter Settings API_name R1 __api_wr_code_byte 02h Address in Flash memory to write ...

Page 22

... Instruction: LCALL FFF0h. Note: 1. Refer to the AT89C51SND1 datasheet for information on write operation timing and multiply this timing by the number of pages special resources are used by the bootloader during these operations 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 ...

Page 23

... Read Product Name Read Product Revision Read SSB Read BSB Read SBV Read Hardware Byte Read Device Boot ID1 Read Device Boot ID2 Read bootloader Version 4241B–MP3–07/04 AT89C51SND1 UART Bootloader Record Record Type Length Offset Data[ data start 00h ...

Page 24

... AT89C51SND1 UART Bootloader 24 R1 DPTR0 Address in Flash 02h memory to write Address of first Byte to Address in XRAM of 09h program in Flash the first data to memory 01h 0000h 01h 2000h ...

Page 25

... Fax: (81) 3-3523-7581 Disclaimer: Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standard warranty which is detailed in Atmel’s Terms and Conditions located on the Company’s web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein ...

Related keywords