T89C51CC02UA-RATIM Atmel, T89C51CC02UA-RATIM Datasheet

no-image

T89C51CC02UA-RATIM

Manufacturer Part Number
T89C51CC02UA-RATIM
Description
IC 8051 MCU FLASH 16K 32VQFP
Manufacturer
Atmel
Series
AT89C CANr

Specifications of T89C51CC02UA-RATIM

Core Processor
8051
Core Size
8-Bit
Speed
40MHz
Connectivity
CAN, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
20
Program Memory Size
16KB (16K x 8)
Program Memory Type
FLASH
Eeprom Size
2K x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
32-TQFP, 32-VQFP
For Use With
AT89STK-06 - KIT DEMOBOARD 8051 MCU W/CAN
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
T89C51CC02UARATIM

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
T89C51CC02UA-RATIM
Manufacturer:
Atmel
Quantity:
10 000
Features
Description
This document describes the CAN bootloader functionalities as well as the CAN proto-
col to efficiently perform operations on the on-chip Flash (EEPROM) memories.
Additional information on the T89C51CC02 product can be found in the T89C51CC02
datasheet and the T89C51CC02 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.2
Revision 1.2.1
Protocol
In-System Programming
In-Application Programming/Self-Programming
– CAN Used as a Physical Layer
– 7 ISP CAN Identifiers
– Relocatable ISP CAN Identifiers
– Autobaud
– Read/Write Flash and EEPROM Memory
– Read Device ID
– Full-chip Erase
– Read/Write Configuration Bytes
– Security Setting From ISP Command
– Remote Application Start
– Read/Write Flash and EEPROM Memory
– Read Device ID
– Block Erase
– Read/Write Configuration Bytes
– Bootloader Start
Purpose of Modifications
First release
Standardization of tasks in source
program.
Date
14/12/2001
19/03/2007
CAN
Microcontrollers
T89C51CC02
CAN Bootloader

Related parts for T89C51CC02UA-RATIM

T89C51CC02UA-RATIM Summary of contents

Page 1

... Flash (EEPROM) memories. Additional information on the T89C51CC02 product can be found in the T89C51CC02 datasheet and the T89C51CC02 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 ...

Page 2

Functional The T89C51CC02 Bootloader facilitates In-System Programming and In-Application Programming. Description In-System The ISP allows the user to program or reprogram a microcontroller on-chip Flash memory with- out removing it from the system and without the need of a pre-programmed ...

Page 3

ISP Communication The purpose of this process is to manage the communication and its protocol between the on- Management chip bootloader and an external device (host). The on-chip bootloader implements a CAN proto- col (see Section “Protocol”, page 9). This ...

Page 4

Mapping and Default The 4 Most Significant Bit (MSB) of the Hardware Byte can be read/written by software (this area Value of Hardware is called Fuse bits). The 4 Least Significant Bit (LSB) can only be read by software and ...

Page 5

... FLIP software program running under Windows that supports all Atmel Flash microcontroller and CAN protocol communication media. Program Several CAN dongles are supported by FLIP (for Windows). This software program is available free of charge from the Atmel web site. 4208D–CAN–03/08 T89C51CC02 CAN Bootloader User Bootloader ...

Page 6

In-System The ISP allows the user to program or reprogram a microcontroller’s on-chip Flash memory through the CAN network without removing it from the system and without the need of a pre-pro- Programming grammed application. (ISP) This section describes how ...

Page 7

Figure 3. Regular Boot Process Yes Start Application 4208D–CAN–03/08 T89C51CC02 CAN Bootloader RESET ENBOOT = 0 Yes PC = 0000h BLJB = 1 No P1_CF = FFh No P1_CF = P1 Yes No P3_CF = P3 BSB = 0 No ...

Page 8

Physical Layer The CAN is used to transmit information has the following configuration: • Standard Frame CAN format 2.0A (identifier 11-bit) • Frame: Data Frame • Baud rate: autobaud is performed by the bootloader CAN Controller Two ways are possible ...

Page 9

CAN Autobaud The following table shows the autobaud performance for a point-to-point connection in X1 mode. 20K 100K 125K 250K 500K 1M Note: CAN Autobaud The CAN Autobaud implemented in the bootloader is efficient only in point-to-point connection. Limitation Because ...

Page 10

Identifier ID_PROG_START ID_PROG_DATA ID_DISPLAY_DATA ID_WRITE_COMMAND ID_READ_COMMAND ID_ERROR It is possible to allocate a new value for CAN ISP identifiers by writing the byte CRIS with the base value for the group of identifier. The maximum value for CRIS is 7Fh ...

Page 11

Figure 5. Identifier Remapping Communication The communication with a device (CAN node) must be opened prior to initiating any ISP Initialization communication. To open the communication with the device, the Host sends a “connecting” CAN message (ID_SELECT_NODE) with the node ...

Page 12

Request from Host Note: Answers from Bootloader Note: If the communication is closed then all the others messages won’t be managed by bootloader. ID_SELECT_NODE Flow Description Host Send Select Node Message with Node Number in Parameter OR Time-out 10 ms ...

Page 13

Programming the The communication flow described above shows how to program data in the Flash memory or in Flash or EEPROM data the EEPROM data memory. This operation can be executed only with a device previously opened in communication. 1. ...

Page 14

Answers from The device has two possible answers: Bootloader • If the device is ready to receive new data, it sends a “programming data” CAN message (Id_prog_data) with the result Command_new passed in parameter. • If the device has finished ...

Page 15

Programming Example Programming Data (write 55h from 0000h to 0008h in the flash) HOST BOOTLOADER HOST BOOTLOADER HOST BOOTLOADER Programming Data (write 55h from 0000h to 0008h in the flash), with SSB in write security HOST BOOTLOADER Reading the Flash ...

Page 16

Answer to a blank check command: ID_DISPLAY_DATA ID_DISPLAY_DATA Flow Description Host Send Display_data Message with Addresses or Blank Check OR Wait ERROR COMMAND ABORTED OR Wait Data Display All Data Read COMMAND FINISHED OR Wait COMMAND_OK COMMAND FINISHED Wait COMMAND_OK ...

Page 17

ID_Display_DATA Example Display Data (from 0000h to 0008h) HOST BOOTLOADER BOOTLOADER Blank Check HOST BOOTLOADER Programming The ID_WRITE_COMMAND flow described below allows the user to program Configuration Configuration Information regarding the bootloader functionalities. Information This operation can be executed only ...

Page 18

Requests from Host ID_WRITE_COMMAND Answers from The device has two possible answers: Bootloader • If the chip is protected from program access an “Error” CAN message is sent (see Section “Error Message Description”, page 23). • Otherwise an acknowledge “Command ...

Page 19

ID_WRITE_COMMAND Flow Description Host Send Write_Command OR Wait ERROR_SECURITY COMMAND ABORTED Wait COMMAND_OK COMMAND FINISHED ID_WRITE_COMMAND Example Write BSB at 88h HOST BOOTLOADER Write Fuse bit at Fxh HOST BOOTLOADER Reading Configuration The ID_READ_COMMAND flow described below allows the user ...

Page 20

Requests from Host ID_READ_COMMAND Answers from The device has two possible answers: Bootloader • If the chip is protected from read access an “Error” CAN message is sent (see Section “Error Message Description”, page 23). • Otherwise the device answers ...

Page 21

Flow Description Host Send read_com message OR Wait ERROR_SECURITY COMMAND ABORTED Wait Value of data COMMAND FINISHED ID_READ_COMMAND Example Read Bootloader Version HOST BOOTLOADER Read SBV HOST BOOTLOADER Read Fuse bit HOST BOOTLOADER 4208D–CAN–03/08 T89C51CC02 CAN Bootloader ID_READ_COM MESSAGE ID_ERROR ...

Page 22

Erasing the Flash The ID_WRITE_COMMAND flow described below allows the user to erase the Flash memory. This operation can be executed only with a device previously opened in communication. Two modes of Flash erasing are possible: • Full-chip erase • ...

Page 23

Starting the The ID_WRITE_COMMAND flow described below allows to start the application directly from Application the bootloader upon a specific command reception. This operation can be executed only with a device previously opened in communication. Two options are possible: • ...

Page 24

... To call the corresponding API, the user must use a set of Flash_api routines which can be linked with the application. Example of Flash_api routines are available on the Atmel web site on the application note: C Flash Drivers for the T89C51CC02CA The Flash_api routines on the package work only with the CAN bootloader. ...

Page 25

API Commands Several types of APIs are available: • Read/Program Flash and EEPROM Data memory • Read Configuration and Manufacturer Information • Program Configuration Information • Erase Flash • Start Bootloader Read/Program Flash All routines to access EEPROM Data are ...

Page 26

Instruction: LCALL FFF0h. • At the complete API execution by the bootloader, the value to read is in the api_value variable. Note: Program • Parameter Settings Configuration Information • Instruction: LCALL FFF0h. Note: Erasing Flash The T89C51CC02 Flash ...

Page 27

Starting the There are two start bootloader routines possible: Bootloader 1. This routine allows to start at the beginning of the bootloader or after a reset. After calling this routine the regular boot process is performed and the communication must ...

Page 28

Appendix-A Table 1. Summary of Frames from Host Identifier Length ID_SELECT_NODE 1 (CRIS:0h) ID_PROG_START 5 (CRIS:1h) ID_PROG_DATA n (CRIS:2h) ID_DISPLAY_DATA 5 (CRIS:3h) 2 ID_WRITE_COMMAND 3 (CRIS:4h T89C51CC02 CAN Bootloader 28 Data[0] Data[1] Data[2] num node - - ...

Page 29

Table 1. Summary of Frames from Host (Continued) Identifier Length 2 ID_READ_COMMAND (CRIS:5h 4208D–CAN–03/08 T89C51CC02 CAN Bootloader Data[0] Data[1] Data[2] 00h - 00h 01h - 02h - 00h - 01h - 02h - 03h - 04h - 05h ...

Page 30

Table 2. Summary of Frames from Target (Bootloader) Identifier Length ID_SELECT_NODE 2 (CRIS:0h) ID_PROG_START 0 (CIRS:1h) ID_PROG_DATA 1 (CRIS:2h) n ID_DISPLAY_DATA 0 (CRIS:3h) 2 ID_WRITE_COMMAND 1 (CIRS:4h) ID_READ_COMMAND 1 (CRIS:5h) ID_ERROR 1 (CRIS:6h) T89C51CC02 CAN Bootloader 30 Data[0] Data[1] Data[2] ...

Page 31

Appendix-B Table 3. API Summary Function Name __api_rd_code_byte __api_wr_code_byte __api_wr_code_page __api_erase_block0 __api_erase_block1 __api_rd_HSB __api_clr_X2 __api_set_X2 __api_rd_BSB __api_wr_BSB __api_rd_SBV __api_wr_SBV __api_erase_SBV __api_rd_SSB __api_wr_SSB __api_rd_EB __api_wr_EB __api_rd_CANBTC1 __api_wr_CANBTC1 __api_rd_CANBTC2 __api_wr_CANBTC2 __api_rd_CANBTC3 __api_wr_CANBTC3 __api_rd_NNB __api_wr_NNB __api_rd_CRIS __api_wr_CRIS __api_rd_manufacturer __api_rd_device_id1 __api_rd_device_id2 __api_rd_device_id3 __api_rd_bootloader_version 4208D–CAN–03/08 ...

Page 32

Table 3. API Summary (Continued) Function Name __api_eeprom_busy __api_rd_eeprom_byte __api_wr_eeprom_byte __api_start_bootloader __api_start_isp Datasheet Change Log Changes from 1. Clarified explanation regarding full chip erase. See “Erasing Flash” on page 26. 4208B - 04/03 to 42108C - 12/03 Changes from 1. ...

Page 33

... Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ...

Related keywords