Secure Firmware Over-The-Air (FOTA) Update in
Traveo II
About this document
Scope and purpose
AN229058 explains the different steps involved in developing a secure and reliable Firmware Over-The-Air
(FOTA) update in Traveo™ II MCU. Note that this document does not explain the setting up of a wireless
interface to perform an update over the air, rather explains how a logical flash bank in the Traveo II MCU can be
updated with the new image and how reliably (using Traveo II MCU’s Secure Boot Mechanisms) the boot code
can jump to the new image if successfully authenticated.
Table of contents
About this document ....................................................................................................................... 1
Table of contents ............................................................................................................................ 1
1 Introduction .......................................................................................................................... 3
2 Introduction to FOTA .............................................................................................................. 4
2.1 Challenges with Conventional FOTA (without Secure Boot) ................................................................. 4
3 Bank Switching Mechanism in Traveo II .................................................................................... 6
4 Introduction to Secure Boot .................................................................................................... 7
4.1 Secure Boot Mechanism for Secure FOTA .............................................................................................. 7
4.1.1 Dual Bank Manager ............................................................................................................................ 8
4.1.2 ROM Boot Functions for FOTA ........................................................................................................... 8
4.1.3 Flash Boot Functions for FOTA .......................................................................................................... 8
4.1.4 Dual Bank Manager Functions for FOTA ............................................................................................ 8
4.1.5 CM0+ Application Functions for FOTA ............................................................................................... 8
4.1.6 Chain of Trust (CoT) for Secure FOTA ................................................................................................ 9
4.1.7 Work Flash Marker .............................................................................................................................. 9
5 Dual Bank Manager ................................................................................................................ 11
5.1 Disabling Interrupts ............................................................................................................................... 12
5.2 Updating VTOR ...................................................................................................................................... 12
5.3 Disabling SRAM ECC Check ................................................................................................................... 12
5.4 Initializing Stack .................................................................................................................................... 13
5.5 Initializing SRAM Function Memory Region and Enabling ECC Check ................................................ 13
5.6 Disabling Work Flash Bus Error ............................................................................................................. 14
5.7 Pseudo Code .......................................................................................................................................... 14
5.7.1 Magic Word Check ............................................................................................................................ 16
5.7.2 Authentication Check ....................................................................................................................... 16
5.7.3 Authentication Failure ..................................................................................................................... 18
5.7.4 SFlash to SRAM Copy ........................................................................................................................ 18
5.8 Digital Signature Verification Function ................................................................................................ 19
6 SRAM Function for Flash Bank Management ............................................................................. 21
6.1 Configure Flash as Dual Bank ............................................................................................................... 21
6.2 Configure Flash Map .............................................................................................................................. 22