Hello @258817 ,
Hope you are doing great!
Is this in general correct?
->> Yes, it's basically correct. However, the memory range 0x400–0x40F must not be treated as a normal flash area without special handling.
Is any special handling required for configuration bytes from 0x400 to 0x40F
->> Yes. This 16‑byte region is the Flash Configuration Field, which directly controls system‑level behavior such as security, debug access, and erase permissions.
It is recommended to:
- Program this region as a separate, explicit step with well‑defined values
- Keep FCF_FLASH_SECURE_BYTE = 0x7E (unsecure and mass‑erase enabled) during the development phase
- Carefully evaluate the unlock/recovery strategy before enabling security for mass production, to avoid permanently locking the device
Maybe you can refer to our SDK realization with Flash_config.c/Flash_config.h:
Hope it helps.
BR
Celeste