User Tools

Site Tools


manual:can_demo

This is an old revision of the document!


Firmware updates using the CAN communication interface

Bootloader configuration

In order to perform firmware updates with the OpenBLT through the CAN communication interface, double-check that this communication interface is configured in “blt_conf.h”. The following macro should have a value of 1. If this macro did not yet have a value of 1, the bootloader should be rebuild after making the change.

#define BOOT_COM_CAN_ENABLE            (1)

Preparing Microboot

The Microboot utility needs to be configured to connect to the correct CAN interface on the PC:

  • Start Microboot by double-clicking “\Host\MicroBoot.exe”.
  • Click the “Settings”-button and select “OpenBLT using Vector CAN interface” or “OpenBLT using Peak CAN interface” from the dropdown box, depending on the manufacturer of the CAN interface you intend to use on your PC.
  • Click the “Options”-button to configure the communication parameters.
    • Select the type of CAN hardware that is being used.
    • Select the channel with which the CAN hardware is connected to the CAN network.
    • Set the communication speed to the value specified by macro BOOT_COM_CAN_BAUDRATE in “blt_conf.h”. Typically, this is 500 kbits/sec for the demo programs.
    • Set the Transmit ID as a hexadecimal value. This is the value specified by macro BOOT_COM_CAN_RX_MSG_ID in “blt_conf.h”.
    • Set the Receive ID as a hexadecimal value. This is the value specified by macro BOOT_COM_CAN_TX_MSG_ID in “blt_conf.h”.
    • If the Transmit/Receive ID's are 29-bit instead of the default 11-bit, make sure to check of the “Use Extended ID's”-checkbox.

Once you saved the settings by clicking the “OK”-button twice, Microboot is now ready for action!

Downloading the user program

After building your user program, its S-record formatted firmware file can be downloaded to the remaining flash memory using the bootloader. In Microboot click the “Browse”-button and select your user program's firmware file. For the demo programs, this one is located in the “.\Prog\bin\” directory. Once the firmware file was selected, the download should automatically start.

Once the download completed, the newly programmed software will be started by the bootloader. For the demo program's you can verify this by checking that the status LED blinks. Congratulations! That's all there is to using the bootloader.

Notes

Depending on the configuration of the bootloader, there might be a delay between a system reset and the actual start of the user program. This is needed by design for the bootloader's backdoor functionality. Check configurable BACKDOOR_ENTRY_TIMEOUT_MS in “blt_conf.h” for the exact delay time.

manual/can_demo.1406211121.txt.gz · Last modified: 2019/09/24 22:08 (external edit)