1 MPLAB® Harmony v3 UART-I2C Factory Bootloader for PIC32CM SG00/GC00

The Bootloader programmed at production by Microchip is an MPLAB Harmony v3-based Bootloader capable of programming an application binary using either the UART or I2C interface.

Key Features

  • The Bootloader shall be capable of programming application binary using either the UART or I2C interface.
  • The Bootloader size shall be less than 8 KB and it resides from starting location 0x8000000 of the Boot Flash Memory (BFM) region.
  • To meet the Bootloader update requirement, the Bootloader code shall be linked to program in Flash but execute from SRAM.
  • The Bootloader provides a feature to read the current version of the Bootloader by using the read version command.
  • The Bootloader provides two options to trigger the Bootloader mode:
    • External trigger: Bootloader will be triggered based on the status of a dedicated GPIO pin.
    • Internal trigger: Bootloader will be triggered based on the trigger pattern written at a specific location in the SRAM by the application firmware.
  • After a new application image is programmed, the Bootloader will verify the programmed application space by generating a CRC-32 value and comparing it with the CRC-32 received from the Host. The application CRC will not be verified after every reset before jumping to the application space for faster startup.
  • The Bootloader will read the first 4 bytes of application space to decide if a valid application is present. If the contents of the first 4 bytes are not 0xFFFFFFFF, then the Bootloader assumes a valid application is present and jumps to the application. If a valid application is not present, then Bootloader will wait, and remain in Bootloader mode.
  • If the CRC check fails, the Host must reprogram the application again.
  • Internal pull-up shall be enabled on the I2C SCL and SDA lines.
Key Features for TrustZone variants PIC32CM SG00
  • The Bootloader is part of the Secure Flash BOOTPROT (BS) region.
  • The Bootloader will always jump to Application Secure Region at location 0xC000000 after programming. Therefore, the applications Reset handler should be part of Application Secure Region which can further call its Non-Secure region if any.
  • The Bootloader will provide command to program the Fuse settings which are part of BOOT configuration row.
  • All the Fuse configurations will be set to default except below few required by the Bootloader. Customers have to update the Fuse settings using the Bootloader during programming operation as required. - BOOTPROT (BS) - 8192 Bytes

Key Requirements

  • By default, the Bootloader expects the application to start from the location 0xC000000 for PIC32CM SG00/GC00 devices. Therefore, the application should be built to start from the Flash location 0xC000000 for PIC32CM SG/GC devices.
  • For TrustZone variants, proper Fuse settings required by the application have to be sent along with application binary.
Figure 1-1. UART-I2C Bootloader Memory Layout for PIC32CM GC00
Figure 1-2. UART-I2C Bootloader Memory Layout for PIC32CM SG00
Figure 1-3. UART-I2C Bootloader System Level Execution Flow