FILE: boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.c
This example demonstrates how to use the secure flash boot mode for CPU1 as well as release CPU2 and CM for secure flash boot.
Secure flash boot performs a CMAC authentication on the entry sector of flash upon device boot up. If authentication passes, the application will begin execution. Learn more on the secure flash boot mode in the device technical reference manual.
This project shows how to use the C2000 HEX Utility to generate a CMAC Tag based on a user CMAC key and embed the value into the flash application. Additionally, the example details the method to call the CMAC API from the user application to calculate CMAC on other flash sectors beyond the the application entry flash sector.
How to Run:
- Load application into CPU1 flash (as well as CPU2 and CM applications)
- Disconnect and reconnect to only CPU1
- In memory window, set address 0xD00/D01 to 0x5AFFFFFF and address 0xD04 to 0x000A (This sets emulation boot to secure flash boot)
- Reset CPU1 via CCS and click resume
- Observe the LEDs
Determining Pass/Fail without debugger connected:
CPU1 - ControlCARD LED1.
- LED off = Secure Boot failed
- LED On (Solid) = Secure Boot Passed, Full Flash CMAC failed
- LED Blinking = Secure Boot Passed and Full Flash CMAC passed CPU2 - ControlCARD LED2.
- LED off = Secure Boot failed
- LED On (Solid) = Secure Boot Passed, Full Flash CMAC failed
- LED Blinking = Secure Boot Passed and Full Flash CMAC passed CM - ControlCARD LED3.
- LED off = Secure Boot failed
- LED On (Solid) = Secure Boot Passed, Full Flash CMAC failed
- LED Blinking = Secure Boot Passed and Full Flash CMAC passed
External Connections
Watch Variables
- cpu1_SuccessfullyBooted - True when CPU1 full flash CMAC authentication passes. Otherwise, false.
- cpu2_SuccessfullyBooted - True when CPU2 full flash CMAC authentication passes and CPU1 receives IPC. Otherwise, false.
- cm_SuccessfullyBooted - True when CM full flash CMAC authentication passes and CPU1 receives IPC. Otherwise, false.