CSEc MASTER ECU KEY update error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CSEc MASTER ECU KEY update error

ソリューションへジャンプ
1,958件の閲覧回数
leandro_malara_
Contributor I

Hi,

I am using CSEc peripheral on S32K144 MCU and an error occurs sporadically when configuring the MASTER ECU KEY (90% of the time works fine):

  • When configuring first time the MASTER_ECU_KEY, CSEC returns ERC_KEY_UPDATE_ERROR. It also appears that using the MASTER_ECU_KEY for updating other keys, returns ERC_KEY_EMPTY, so it seems that the key is actually not configured. What i found out is that the FlexRAM is corrupted: at startup it is sometimes entirely filled with "junk" data, or sometimes goes back to all 1s. So the question is, could it be that an error during FLASH partitioning command (e.g. power loss) caused a FlexRAM error, that in turn resulted in CSEc driver being unable to correctly function?
  • After this error, i am unable to revert back to factory state: no mass erase is possible and CMD_DEBUG_AUTH returns ERC_GENERAL_ERROR when

Also, when partitioning the flash for CSEc usage, but without configuring the MASTER_ECU_KEY, i am unable to revert to factory state:

  • Mass erase is not working, as if keys were configured
  • Executing CMD_DEBUG_CHAL and CMD_DEBUG_AUTH, returns ERC_GENERAL_ERROR. I use MASTER_ECU_KEY equal to all 1s. Is there a default value to use for MASTER_ECU_KEY that is not all 1s? or is it not possible to erase keys and flash partition without first configuring a MASTER_ECU_KEY?

Thank you. Kind regards,

Leandro Malara.

 

0 件の賞賛
返信
1 解決策
1,948件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,
If MASTER_ECU_KEY is not programmed, it is not possible to reset the device back to factory state. The key is either loaded or the slot is considered as empty. There’s no default key value. Yes, it’s equal to all 1s but it’s not considered as default and valid key. This behavior is required by SHE specification.
Once CSE is enabled by partitioning, the only way to destroy the partition is to run CMD_DEBUG_CHAL and CMD_DEBUG_AUTH with knowledge of the MASTER_ECU_KEY. There’s no workaround for that.
Such sporadic problem should not happen. That means something obviously went wrong during previous steps. Unexpected reset/power-down during partitioning could also be the reason. Or are you sure you are not operating the device out of specification? In production, the partitioning is supposed to be done only once per lifetime of the device. It should be done in factory under controlled conditions, so such situation cannot happen.
I’m not really sure what’s the root cause of your troubles. Can you see that on one device only? Or is more of them affected?
Regards,
Lukas

元の投稿で解決策を見る

5 返答(返信)
82件の閲覧回数
Hua_Xue
Contributor I

Hello, I met the exactly same problem as you did. Have you found the root cause and solved the problem yet? 

0 件の賞賛
返信
1,949件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,
If MASTER_ECU_KEY is not programmed, it is not possible to reset the device back to factory state. The key is either loaded or the slot is considered as empty. There’s no default key value. Yes, it’s equal to all 1s but it’s not considered as default and valid key. This behavior is required by SHE specification.
Once CSE is enabled by partitioning, the only way to destroy the partition is to run CMD_DEBUG_CHAL and CMD_DEBUG_AUTH with knowledge of the MASTER_ECU_KEY. There’s no workaround for that.
Such sporadic problem should not happen. That means something obviously went wrong during previous steps. Unexpected reset/power-down during partitioning could also be the reason. Or are you sure you are not operating the device out of specification? In production, the partitioning is supposed to be done only once per lifetime of the device. It should be done in factory under controlled conditions, so such situation cannot happen.
I’m not really sure what’s the root cause of your troubles. Can you see that on one device only? Or is more of them affected?
Regards,
Lukas

1,408件の閲覧回数
luyu
Contributor I

Hello

      I‘m engineer from China Aptiv. And also I meet the same issue as the customer did.

      But I still don't know how to fix this issue.

      Could you give me some advice for it?

0 件の賞賛
返信
77件の閲覧回数
Hua_Xue
Contributor I

Hello, I met the exactly same problem as you did. Have you found the root cause and solved the problem yet? 

0 件の賞賛
返信
1,939件の閲覧回数
leandro_malara_
Contributor I

Hi,

Thank you for your feedback. It happened on two ECUthat I use during development. As you mentioned, during production the partition is done once and under controlled conditions, and until now no problems occurred in production ECUs but just during development.

0 件の賞賛
返信