Note: Requires that CCFG.permissions.allowChipErase ==
ALLOWED
- Perform SWD connect and reset
device (through SWD reset or pin reset) to enter SACI
- If user record needs to be
kept, read out contents using SACI_CMD_MISC_GET_CCFG_USER_REC.
- Perform SACI_CMD_FLASH_ERASE_CHIP
command
- If there are main sectors
(logging, runtime configuration, etc) that shouldn't be erased these
should have been identified in CCFG.flashProt.chipEraseRetain and the
option retainSelMainSectors passed to the SACI_CMD_FLASH_ERASE_CHIP
command
- If applicable, write back
user record using SACI_CMD_FLASH_PROG_CCFG_USER_REC
- Program in image using a sequence
of SACI_CMD_FLASH_PROG_MAIN_SECTOR commands and/or one or more
SACI_CMD_FLASH_PROG_MAIN_PIPELINED commands
- Optionally verify that
image is correctly programmed using one or more
SACI_CMD_FLASH_VERIFY_MAIN_SECTORS(crc32_calculated_or_extracted_from_image)
- Program in CCFG sector using
SACI_CMD_FLASH_PROG_CCFG_SECTOR(skipUserRec).
- Optionally verify CCFG
sector using SACI_CMD_FLASH_VERIFY_CCFG_SECTOR(identity check). If user record
has CRC32 at end the user record integrity can be checked too
- Device can now be reset/rebooted
with SACI_CMD_BLDR_APP_RESET_DEVICE after which the device boots into
application and/or any configured bootloader