SWCU193A April 2023 – August 2024 CC2340R2 , CC2340R5 , CC2340R5-Q1
The bootloader entry function (function pointer in xCFG.bootCfg.pBldrVtor[1]) has the following function prototype:
__noreturn void BootloaderEntryFunction(uint32_t bldrParam, uint32_t bldrFlags)
bldrParam is passed on from either FCFG.bootCfg.bldrParam or CCFG.bootCfg.bldrParam according to Table 8-35. bldrFlags contains useful information from the boot flow that the bootloader can use. See Table 8-36.
Flag | Name | Description |
---|---|---|
bldrFlags[0] | bCcfgValid | 1 if CCFG is valid, else 0 |
bldrFlags[1] | bAppCanBoot | 1 if there exists an application that will be booted into once HapiEnterApplication() is called. Typically if there is no application to boot into remain in the bootloader indefinitely |
bldrFlags[2] | bChipEraseAllowed | 1 if chip erase is allowed by CCFG, 0 if not. Any bootloader should for consistency adhere to this restriction |
bldrFlags[3] | bParamsFromCcfg | 1 if bldrParam is from CCFG, 0 if bldrPAram is from FCFG. |
bldrFlags[4] | bBldrAllowDbg | 1 if debugging of bootloader is allowed, 0 if not. If 1, the boot flow may already have opened for debugging prior to invoking bootloader. |
bldrFlags[31:5] | Reserved | Do not assume any specific value |