1.4 CAN Bootloader

The CAN bootloader Library can be used to upgrade firmware on a target device without the need for an external programmer or debugger.

Features

  • Supported on CORTEX-M and MIPS based MCUs

  • Uses Harmony 3 CAN PLIB to communicate resulting in smaller bootloader size

  • Supports Fail Safe update

  • Takes Binary File as input

  • Receives Binary from an C Embedded Host Device

Running From SRAM (For SAM Devices)

  • Has capability to self update as it is running from SRAM

bootloader_ram_layout
  • At reset the bootloader Reset handler copies the entire bootloader firmware into SRAM from Start location and start executing from SRAM

  • Once the application is called from bootloader, applications startup code takes control over SRAM and starts executing

CAN Bootloader Block Diagram

can_bootloader_block_diagram
  • Input Task:

    • This task is responsible for receiving data from Embedded Host through the CAN interface

    • The task keeps polling for data to be received when bootloader is in idle mode

    • Once the packet reception is completed it gives control to Command Task

  • Command Task:

    • The task first validates the incoming packet from host with expected header information

    • The task processes the commands received from Input Task and provides response back to host accordingly

    • If the command received is a Data command it gives control to the Flash Task

  • Flash Task:

    • This task is responsible to program the internal flash memory with data packet received

    • The task uses the NVM peripheral library to perform the Unlock/Erase/Write Operations