Introduction
The bootloader is a piece of code used to program or re-program the application code (firmware) to the internal Flash of the microcontroller without the need for an external programmer or debugger.
The following are key features of the dual-bank bootloader:
- It is the first program to run on Power-on-Reset (POR), and responsible to load the firmware into a specific memory location
- It can communicate to the host program to receive the firmware through communication interfaces, such as USB, Ethernet, CAN, UART, I2C and SPI
- It is programmed into the microcontroller using the normal conventional programming methods such as an external programmer or debugger (SWD, JTAG)
- It is responsible to check whether the user is intending to update the firmware or run the existing firmware. A microcontroller can have two code images co-existing in the same memory space (bootloader and user application (firmware)).
The SAM E54 MCU provides a dual-bank support on the internal Flash memory. The dual-bank Flash enables the programming of the inactive bank with a new version of the firmware without affecting the existing application on an active bank.
The MPLAB Harmony v3 provides a bootloader framework for 32-bit microcontrollers, which can be used to upgrade the firmware on a target device without using the external programmer or debugger. This document describes the dual-bank bootloader provided by MPLAB Harmony v3. The dual-bank bootloader utilizes the dual-bank feature of the internal Flash for safer application upgrade.