Hi.@lukaszadrapa
I saw in the reference manual that CSEc is a feature that requires you to configure an empt EEPROM in DFLASH to enable it, I am not currently configuring EEPROM, which should mean that I am not enabling the CSEc module. At the same time, I also checked the FSEC register in my FTFC register, where the read value shows that batch erase is allowed and it is in insecure mode, which should be the effect of the configuration word that needs to be configured for the address segment 0x400-0x40F you mentioned in the screenshot. However, after I do the chip erase, my chip will lock up and give me some exception at the address 0x400-0x40F, forgive me for not knowing much about this error, but it means that I can't recover it and the chip is completely dead. Have you ever been in this situation? Or do you have any thoughts on how this situation arose
P.S.If I use J-FLASH to erase the chip and only manipulate the PFLASH fields, this problem does not occur. Even though the flash is protected, I can unlock it with the unlock command.So I think it's possible that the CSEc key in DFLASH was erased(My conjecture)
Because of the poor contact of the SWD debugging pin, the problem of locking will occur after the J-FLASH indicates that the erase is successful and the SWD pin is disconnected immediately.
Thank you very much for your answer to the CSEc module. I hope you can provide some ideas for the subsequent questions. Regardless of whether can solve this problem, all thank you very much for your help.
