7.4.8.2 Write an Encrypted Program when Keys are already Written

Command Description
0x00000000_DE05_5345ACBA After Reset, unblock the bootloader
0x00000000_DE05_ACBA5345
0x00000000_0004_0000XXXX Set the number of blocks of the encrypted program
0x00000000_0005_XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Set the initialization vector of the encrypted program
0x00000000_0006_XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Set signature of the encrypted program
0x00000000_0001_EEEEEEEE… Write the program at consecutive addresses from 0x00000000
0x00000000_0013_00000000 Launch code decryption
0x00000000_0012_00000000 Check bootloader status to know if decrypt process has finished. Answers:
  • 0x”Bootloader Hardware signature”_0000_ 00000002 (aes_active)
  • 0x”Bootloader Hardware signature”_0000_ 00000000 (bootloader ready)
0x00000000_0002_XXXXXXXX… (Optional) Read the decrypted program to validate it (READ_RAM fuse must not be set)
0x400E1800_0000_00000000 Clear CPUWAIT to start program operation
0x00000000_A66A_00000000 Give control of the MISO signal to M7-SPI and disable bootloader clock