Mark,
Thank you for your help.
The IAR is used in the project.
But FTFA_FOPT cannot be changed in the debug mode.
After the firmware is downloaded from the IAR, the value from 0x400 to 0x40B has been changed.
But the value in the 0x40D(FTFA_FOPT) cannot be changed.
So my project still cannot work normally when the firmware is downloaded by the IAR.
And I generate the .bin file by the IAR and find that the value in the 0x40D(FTFA_FOPT) can be changed.
Can you tell me why the value in the 0x40D(FTFA_FOPT) cannot be changed in the debug mode?
#pragma segment="FlashConfig_region"
#pragma location="FlashConfig_region"
__root static const uint8_t Config[16]=
{
/* NV_BACKKEY3: KEY=0xFF */
0xFFU,
/* NV_BACKKEY2: KEY=0xFF */
0xFFU,
/* NV_BACKKEY1: KEY=0xFF */
0xFFU,
/* NV_BACKKEY0: KEY=0xFF */
0xFFU,
/* NV_BACKKEY7: KEY=0xFF */
0xFFU,
/* NV_BACKKEY6: KEY=0xFF */
0xFFU,
/* NV_BACKKEY5: KEY=0xFF */
0xFFU,
/* NV_BACKKEY4: KEY=0xFF */
0xFFU,
/* NV_FPROT3: PROT=0xFF */
0xFFU,
/* NV_FPROT2: PROT=0xFF */
0xFFU,
/* NV_FPROT1: PROT=0xFF */
0xFFU,
/* NV_FPROT0: PROT=0xFF */
0xFFU,
/* NV_FSEC: KEYEN=1,MEEN=3,FSLACC=3,SEC=2 */
0x7EU,
/* NV_FOPT: =1,=1,FAST_INIT=1,LPBOOT1=1,RESET_PIN_CFG=1,NMI_DIS=0,=1,LPBOOT0=1 */
0xFBU,
0xFFU,
0xFFU
};