Hi support teams,
I'm developing for FRDM-MCXC444 with bootloader.
I'd like to use I2C peripherals to update MCU flash memory in bootloader.
So I wrote some commands to erase and write flash memory.
However, there're some troubles after writing flash memory via I2C.
The MCU stuck at "HardFault_Handler" when I try to use debug with MCUXpresso IDE.

I use debug to read back the memory as follows.
You can see some wrong data in the corresponding configuration location.
I know this is cased by writing wrong data to flash memory.

But I can't erase the flash or do anything to recovery it.
Could you please give me some advice?
Thank you for your time and suggestions.
BR,
Nian