Hello.
Environment : S32K142, IAR 8.22, Multilink Debugger
I want to test backdoorkey verify before enable secure lock.
I set my program like below.
IAR setup
Startup.s
ROM file (SREC)
Memory Dump in Debugger
Verify Code
After "launch command", FSTAT = 0xA0.
When I test this solution in another product, that works ok.
--> S32K146, GHS Compiler, Trace32 Debugger
Could you give me some advise?
Thank you.
Solved! Go to Solution.
Hi
The IAR setup should be correct, as the ROM file (SREC) and Memory Dump in Debugger look correct.
Did you already refer to the example: S32K144 Verify Backdoor Access Key S32DS1.3? NOTE: The Verify Backdoor key command is executed from RAM to avoid simultaneous access to the PFlash block.
You can also refer to the APIs in S32K1 SDK: FLASH_DRV_SecurityBypass and FLASH_DRV_CommandSequence
According the "Verify Backdoor Access Key command" of S32K-RM, the following may cause FSTAT[ACCERR]:
I want to test backdoorkey verify before enable secure lock.
MassErase (FSEC[MEEN])is able to unsecure the MCU too(Do not enable CSEc until the backdoor is normal). Maybe you can secure the MCU in FlashConfig and check if FSEC[SEC] is unsecured after Verify Backdoor Access Key command.
Best Regards,
Robin
Hi
The IAR setup should be correct, as the ROM file (SREC) and Memory Dump in Debugger look correct.
Did you already refer to the example: S32K144 Verify Backdoor Access Key S32DS1.3? NOTE: The Verify Backdoor key command is executed from RAM to avoid simultaneous access to the PFlash block.
You can also refer to the APIs in S32K1 SDK: FLASH_DRV_SecurityBypass and FLASH_DRV_CommandSequence
According the "Verify Backdoor Access Key command" of S32K-RM, the following may cause FSTAT[ACCERR]:
I want to test backdoorkey verify before enable secure lock.
MassErase (FSEC[MEEN])is able to unsecure the MCU too(Do not enable CSEc until the backdoor is normal). Maybe you can secure the MCU in FlashConfig and check if FSEC[SEC] is unsecured after Verify Backdoor Access Key command.
Best Regards,
Robin
Dear @Robin_Shen
Thank you for reply.
Program run in HSRUN mode, it caused ACCERR bit.
Change to RUN mode, ACCERR bit not set.
But after then...
Program falls hard fault exception and jump to reset handler after run below code
FTFC->FSTAT = FTFC_FSTAT_CCIF_MASK; // launch command
I'm in waiting for support from FAE in my regions.
If you have any advice for me, just let me know.
Best Reagrds,
Sean.