1.2 I2C Bootloader
The I2C bootloader Library can be used to upgrade firmware on a target device without the need for an external programmer or debugger.
Features
Supported Only on CortexM0+ and CortexM4 based Devices
Uses Harmony 3 I2C PLIB to communicate resulting in smaller bootloader size
Supports Fail Safe update
Takes Binary File as input
Receives Binary from an I2C Embedded Host Device
Running From SRAM (For SAM Devices)
Has capability to self update as it is running from SRAM
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
I2C Bootloader Block Diagram
I2C Event Processor Task:
This task is responsible for receiving data from Embedded Host through the I2C communication interface
The task polls and processes the I2C events.
Based on the event received it gives control to I2C Host Write Request or I2C Host Read Request functions
This task is responsible for responding to the bootloader commands received
I2C Host Write Request:
This function is responsible to handle any write requests coming from I2C host
It processes the commands received and notifies the status to I2C Event Process Task
If the command received is a Erase/Prgram/Verify command it gives control to the Flash task
I2C Host Read Request:
This function is responsible to handle any read requests coming from I2C host
It sends the current status to I2C host if the command received is Read Status
Flash Task:
This task is responsible to Erase/Prgram/Verify the internal flash memory with data packet received
The task uses the NVM peripheral library to perform the Unlock/Erase/Write Operations