1.5.2 Serial Memory Bootloader Execution Flow

  • On device reset after System initialize, the Bootloader task starts executing from the SYS_Tasks()

  • Once the Serial Memory driver is ready, it retrieves the Meta Data from serial memory

    • If any error in reading the Meta Data it directly jumps Run application
  • It checks if the Meta Data read is valid using the Prologue and Epilogue.

    • If valid:

      • It stores the application start address and application size from meta data which will be used during programming operation

      • Checks if the Update Required flag is set. If set it jumps to Programming step or continues to Trigger Check

    • If Invalid:

      • It continues to Trigger Check

Trigger Check

  • If there are no conditions to enter the Firmware Upgrade mode, the Bootloader jumps to Run application

Programming

  • Starts reading the application binary from serial memory and perform erase/program operations on internal Flash

  • Once programming is completed, it generates CRC32 on programmed space of internal Flash and verifies it against the CRC32 value stored in Meta data

  • Once verification is complete it clears the update required flag in meta data and triggers reset to Run application

Run Application

  • The application start address used to jump to application space can be:

    • Application start address generated during compile time or

    • Application start address retrieved from valid Meta Data

  • Calls SYS_DeInitialize() function to release resources used

  • Jumps to application space to run the updated application