=============================================== CANopen Bootloader for Atmel CANary devices Free Version 1.0 =============================================== This CANopen hex bootloader for Atmel CANary devices implements a minimal node in a CANopen network as specified in the CiA Draft Standard Proposal 302: "Framework for Programmable CANopen Devices". It allows to use regular CANopen master software or configuration tools to download new firmware into the user flash code memory. The free version allows you to fully evaluate it but has certain limitations: - CANopen node ID is fixed at 64 (0x40) - Only CAN baudrates of 125k and 1M at 12MHz crystal speed and 125k at 20MHz crystal speed are supported. - It runs from user flash and is located at 0x1000-0x17FF, leaving the lower 4K of the user flash area available for user code or example programs. - It needs the Atmel CANary chip's boot flash at 0xF800-0xFFFF programmed with one of the standard default bootloaders for CAN or UART which runs with Atmel's FLIP software. This is the way the chip comes from the factory and can only be changed using the parallel programming mode. The full version can be obtained from Atmel or from Embedded Systems Academy via licensing agreement and doesn't have the restrictions mentioned above. For details please contact info@esacademy.com Hardware Requirements =============================================== CAN hardware, for example Peak Dongle Target Hardware with Atmel CANary MCU Software Requirements =============================================== CANopen capable software that works with your CAN hardware and supports file download to CANopen "Domains". For a free download of ESAcademy's "CANopen Magic Lite" please go to http://www.esacademy.com/software/ Installation and Setup ================================================ Use Atmel's FLIP software to download one of the Intel Hex files in this package into your target board. Please make sure that the file matches with your hardware: XTAL MHz CAN speed File ---------+-----------+------------------- 12 | 125k | coboot12M125k.hex 12 | 1M | coboot12M1000k.hex 20 | 125k | coboot20M125k.hex The hex files contain a reset vector at 0 that jumps to 0x1000, the location of the CANopen bootloader. After reset with no boot condition the CANopen bootloader becomes active and sends the CANopen bootup message for CANopen node ID 0x40: CAN message ID Data length Data ---------------+-------------+------------- 0x740 | 1 | 0x00 [ ] You should now be able to talk to the node using your configuration tool. This is the list of implemented Object Dictionary entries: Index Subindex Data Type Access Function --------------+-----------+--------+-------------- 0x1000 0x00 | UINT32 | RO | Device Type | | | 0x1001 0x00 | UINT8 | RO | Error Register | | | 0x1018 0x00 | UINT8 | RO | Number of Entries = 2 0x1018 0x01 | UINT32 | RO | Vendor ID 0x1018 0x02 | UINT32 | RO | Product Code | | | 0x1F50 0x00 | UINT8 | RO | Number of Entries = 1 0x1F50 0x01 | DOMAIN | WO | Download Program Area | | | 0x1F51 0x00 | UINT8 | RO | Number of Entries = 1 0x1F51 0x01 | UINT8 | WO | Program Control Device Type (0x1000, 0x00) -------------------------- Reads back 0x544f4f42, or "BOOT" as ASCII string with the LSB first. Error Register (0x1001, 0x00) ----------------------------- Always 0. An error during programming is not indicated here but rather through an "SDO Abort" message. Vendor ID (0x1018, 0x00) ------------------------ Reads back 0x00455341, the Embedded Systems Academy's official vendor ID. Product Code (0x1018, 0x00) --------------------------- Reads back 0x544f4f42, or "ATML" as ASCII string with the LSB first. Download Program Area (0x1F50, 0x01) ------------------------------------ Use this entry to download your Intel hex file with the programming data. Please note that you cannot use the area 0x1000-0x17FF with the free version. Program Control (0x1F51, 0x01) ------------------------------ Writing 0x01 into this entry will reset the device. NOTE: If your hex file contains a reset vector it will overwrite the CANopen bootloader reset vector so that after reset only your application becomes active. There is two solutions: (1) In your code, implement a condition to jump to 0x1000 and activate the CANopen bootloader. (2) Use the regular bootloader and Atmel's FLIP software to activate the "Bootloader Jump Bit" (BLJB=0), and set the "Software Boot Vector" to 0x1000 (SBV=0x10). EDS File ================================================ The file "CANopenBootloader.eds" is a standard CANopen "Electronic Data Sheet" that you can use with your CANopen configuration tool to allow for immediate access to the Object Dictionary entries. For more infomation ================================================ - Article "Embedded Networking with CANopen": http://www.esacademy.com/faq/docs/canopen - Free CANopen Online Training Class: http://www.esacademy.com/myacademy - Atmel, the manufacturer of CANary high- performance 8051 CAN controllers: http://www.atmel.com/atmel/products - CiA, the "CAN in Automation User's and Manufacturer's Group", home of CANopen: http://www.can-cia.org Links ================================================ - Atmel CANopen bootloader page http://www.esacademy.com/atmel/bootloader.htm - ESAcademy's "CANopen Magic Lite" CANopen tool http://www.esacademy.com/software/ ------------------------------------------------ Embedded Systems Academy Email:support@esacademy.com Web: http://www.esacademy.com Copyright (C) Embedded Systems Academy, 2002. All rights reserved. Rev. 1.0, 05/2002 ================================================