Hi team,
Customer currently do CSE key load&erase( with a for loop, first load key and then erase key about 10000 times) test experiment.
But after the 10000 times test, and power on the MCU again, the key can not be loaded or erased any more and the CSE_ECR = 0x02 reported command sequence error, and other CSE command also have this error when send to CSE. And CANCEL is the only command the CSE will accept without 0x02 error. This issue also same with this ticket, but it doesn't have a correct answer: https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589107#M4239
So question is how to handle this issue, since in this case the key can not be loaded or erased any more and the CSE command also can not be accepted by CSE core.
I compared the normal(replaced with new chip on EVB) and issue chip and found that the SR_BFN bit and CSE_ECR bit are different, SR_BFN bit means secure boot finished but i don't enable the secure boot on the issue chip.
error one:
normal one:
Solved! Go to Solution.
most likely, this is caused by unexpected reset or by too short timeout before power cycle of the MCU (the more erase cycles is performed on the flash, the more time is needed to erase the flash).
If erase operation triggered by DEBUG_CHAL+DEBUG_AUTH commands is terminated by unexpected reset, it will make the CSE unusable and there's no way to recover.
Anyway, this is not expected use-case in real application. DEBUG_CHAL+DEBUG_AUTH should be used only during development, not in the field.
Regards,
Lukas
most likely, this is caused by unexpected reset or by too short timeout before power cycle of the MCU (the more erase cycles is performed on the flash, the more time is needed to erase the flash).
If erase operation triggered by DEBUG_CHAL+DEBUG_AUTH commands is terminated by unexpected reset, it will make the CSE unusable and there's no way to recover.
Anyway, this is not expected use-case in real application. DEBUG_CHAL+DEBUG_AUTH should be used only during development, not in the field.
Regards,
Lukas
Hi Lukas,
It sounds make sense, if this point should pay attention about Key erase, it should figure out in doc, because in our normal debug process we may have unexpected restart or power on the board again when calling the DEBUG_CHAL+DEBUG_AUTH.
Hi Lukas,
Are there any docs that mention this point?