MPC5777C CSE CSE_ECR= 0X02 command sequence error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5777C CSE CSE_ECR= 0X02 command sequence error

跳至解决方案
514 次查看
Zhongling_Lang
NXP Employee
NXP Employee

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.

Zhongling_Lang_1-1712049463213.png

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:

Zhongling_Lang_0-1712054067056.png

normal one:

Zhongling_Lang_2-1712054216233.png

 

 

0 项奖励
回复
1 解答
469 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Zhongling_Lang 

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

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
470 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Zhongling_Lang 

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

 

0 项奖励
回复
438 次查看
Zhongling_Lang
NXP Employee
NXP Employee

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.

0 项奖励
回复
442 次查看
WeoWang
NXP Employee
NXP Employee

Hi Lukas,

Are there any docs that mention this point?

0 项奖励
回复