Hello Community,
We are observing strange behavior from MKL13Z64 MCU while setting flash security registers. The FSEC register has value 0xAA:
- Backdoor key access enabled
- Mass erase is disabled
- Freescale factory access denied
- MCU security status is unsecure
We have programmed the register by setting Flash Configuration Field in our SecondaryBootloader (SBL). The SBL loads application when it finds a valid checksum on a particular flash address otherwise, it starts ROM Bootloader. We cannot erase the flash which as expected is fine and the security status is unsecure we can connect using J-LINK for debugging. After initializing boot pins (BOARD_InitBootPins, which is empty) it gets hardfault and it resets. The only thing that changed in the SBL was the FSEC register value from 0xFE to 0xAA.
The value of FOPT register is 0x3D.
The backdoor key is also set but as the SBL gets into hardfault it does not start ROM bootloader and that is why we cannot use the backdoor key to start mass erase.
How can we rescue our board?
Thanks.
MCUXpresso IDE v11.1.0
SDK_2.x_MKL13Z64xxx4 2.8.0