MPC5777C CSE CSE_ECR= 0X02 command sequence error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5777C CSE CSE_ECR= 0X02 command sequence error

Jump to solution
400 Views
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 Kudos
Reply
1 Solution
355 Views
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

 

View solution in original post

0 Kudos
Reply
3 Replies
356 Views
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 Kudos
Reply
324 Views
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 Kudos
Reply
328 Views
WeoWang
NXP Employee
NXP Employee

Hi Lukas,

Are there any docs that mention this point?

0 Kudos
Reply