This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280039: security boot

Part Number: TMS320F280039
Other Parts Discussed in Thread: C2000WARE

Tool/software:

We plan to implement secure start in our bootloader, and I find secure function API as follow, in  "TMS320F28003x Real-Time Microcontrollers Technical Reference Manual.pdf".

Can we use the function CPU1BROM_calculateCMAC() in TMS320F280039?

If we can, where can I find this function?

  • Yes, this function is located in BootROM, you will need to add the following library to your project to add the location of the CMAC function you referenced above: C:\ti\c2000\C2000Ware_5_03_00_00\libraries\boot_rom\f28003x\rev0\rom_symbol_libs\secureZone/F28003x_SecureZoneCodeSymbols_fpu32.lib.  Once this is added to your project, you should be able to call this function.

    We don't have a dedicated example on the flow to implement the CMAC key, etc for F28003x; I would suggest looking at the F28P65x example for a starting point: C:\ti\c2000\C2000Ware_5_03_00_00\driverlib\f28p65x\examples\c28x\boot/

    Best,

    Matthew

  • Thank you, I have find the F28P65x example for a starting point: C:\ti\c2000\C2000Ware_5_03_00_00\driverlib\f28p65x\examples\c28x\boot/, and I find the CMAC Key0 to Key4 is all 1.

    If I use API: CPU1BROM_calculateCMAC() in TMS320F280039, can I change the CMAC Key0 to Key4 in someway?

  • Yes, in that original directory there is a txt file that contains the key  boot_ex1_user_cmac_key.txt, we have just used all 1's, but you can change this as desired.  This is what hex utility will use as the key(there should be some reference to it in the hex command line I believe).

    Best,

    Matthew

  • Yes, I have found reference in file "boot_ex1_cpu1_secure_flash.projectspec", but I don't know how to use this file, and how does the key work?

    Also, I find the CMAC key register. When we use the CMAC function, do we use the keys from those register? 

  • The text file contains the 128-bit key that will be used to calculate the Golden CMAC signature that is stored in the flash.  This same key will be used during boot to determine the validity of the secure region.

    Best,

    Matthew