NEXTKL=B_0x0, KEYPROG=B_0x0, OBKSIZE=B_0x0
FLASH option byte key control register
OBKINDEX | Option byte key index This bitfield represents the index of the option byte key in a given hide protection level. Reading keys with index lower that 8, the value is not be available in OBKDRx registers. It is instead sent directly to SAES peripheral. All others keys can be read using OBKDRx registers. Up to 32 keys can be provisioned per hide protection level (0, 1 or 2), provided there is enough space left in the Flash to store them. |
NEXTKL | Next key level 10 or 11: reserved 0 (B_0x0): OBKINDEX represents the index of the option byte key stored for the hide protection level indicated in SBS_HDPLSR. 1 (B_0x1): OBKINDEX represents the index of the option byte key stored for the hide protection level indicated in SBS_HDPLSR plus one (e.g. if HDPL=1 in SBS_HDPLR the key of level 2 is selected). |
OBKSIZE | Option byte key size Application must use this bitfield to specify how many bits must be used for the new key. Embedded Flash ignores OBKSIZE during read of option keys because size is stored with the key. 0 (B_0x0): Key size is 32 bits 1 (B_0x1): Key size is 64 bits 2 (B_0x2): Key size is 128 bits 3 (B_0x3): Key size is 256 bits |
KEYPROG | Key program This bit must be set to write option byte keys (keys are read otherwise). 0 (B_0x0): Read key. Result of the operation is stored in FLASH_OBKDRx registers, if applicable. 1 (B_0x1): Program key if PG_OPT is set in FLASH_OPTCR register, and KDREF flag is cleared in FLASH_OPTISR register. Correct key information must be stored in FLASH_OBKDRx register before setting PROG and START bits. |
KEYSTART | Key option start This bit is used to start the option byte key operation defined by the PROG bit. The embedded Flash memory resets START when the corresponding operation has been acknowledged. |