1.4.2.2 CAN Bootloader Firmware Update mode execution flow

Bootloader Task Flow

  • Bootloader task is the main task which calls the Input sub-tasks in a forever loop.

  • It calls the Input task to poll for command packets from host

  • Once complete packet is received Input Task calls Command task to process the received command

  • If the command received was a data command Command task calls Flash Task to flash the application

can_bootloader_task_execution_flow

Input Task Flow

  • This task is used to receive the data bytes from embedded host

  • 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

can_input_task_execution_flow

Command Task Flow

  • 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

can_command_task_execution_flow

Flash Task Flow

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

For CORTEX-M based MCUs

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

can_flash_task_execution_flow_sam

For MIPS based MCUs

can_flash_task_execution_flow_pic32m