SWRU543B January 2019 – June 2025 CC3230S , CC3230SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Direct programming of the on-chip flash using JTAG or flash-loaders is not supported by the CC323xSF device. During programming, the image is always first downloaded onto the serial flash, using the filename /sys/mcuflashimg.bin. During the first-time boot, the bootloader reads the encrypted image from serial flash, decrypts it, and writes it onto the on-chip flash. The bootloader ensures that the on-chip flash image is always in sync with that on the serial flash. Otherwise, if a valid image is detected on the on-chip flash, the bootloader will pass on the execution control to that image.
The user application image binary should be linked to run from 0x0100_0800.
Figure 21-12 shows the final structure of the image on the serial flash, where the initial 32-byte SHA-256 hash is auto-computed by the image creator and appended to the image provided by the user.
Transferring the image from the serial flash to the on-chip flash is a multistep process. The process starts by detecting the /sys/mcuflashimg.bin file on the serial flash. When the file is detected, the whole image is transferred to on-chip flash, skipping the first 32 bytes. A SHA-256 hash for the transferred portion is computed and verified against the SHA-256 at offset 0 on the serial flash file. Finally, the header is written onto the on-chip flash offset 0, to identify the image as valid.
The first 32-byte hash part of the serial flash file /sys/mcuflashimg.bin is not copied nor does it take part in the generation of SHA-256 by the bootloader. The first 32-byte hash serves as an identifier for detecting a new image on serial flash. A mismatch with the previously stored hash triggers an update cycle, and the transfer process is repeated.
Figure 21-12 User Application Image Binary Structure on Serial Flash