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

For MPUs

Bootloader with SD/eMMC media

can_Flash_task_fs_execution_flow_MPUs

Bootloader with NAND/Serial Flash media

can_Flash_task_execution_flow_MPUs