Back to ESAcademy Home Page


CANopen Compliant Bootloader

Free Demo Version

 

CANopen Bootloader for Atmel CANary devices

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

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/pcanopenmagic

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:

Crystal (MHz) CAN speed (kBit/s) File
12 125 coboot12M125k.hex
12 1000 coboot12M1000k.hex
20 125 coboot20M125k.hex

The hex files contain a reset vector at address 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 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 the hex file that you download using the CANopen bootloader 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.

 

Download CANopen Bootloader

Current Version: 1.0
Size:10.6Kb

 

For more infomation:

San Jose, CA
Tel. (877) 812-6393
Fax. (877) 812-6382

www.esacademy.com
info@esacademy.com