[Security] CSEC component invoke the eraseKeys interface problem

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

[Security] CSEC component invoke the eraseKeys interface problem

190 次查看
Gideon
Contributor III

Dear NXPs:

        S32K146;

        S32DS sample 《csec_keyconfig_s32k146》

        NXP NVM has written the key. First burn the Clear Key project. After calling the bool eraseKeys(void) interface in csec_utils.c, the key is successfully erased. Burn the KeyLoad project again. Under IAR Debug, hardFault occurs in the first run. Reset (the greenbox is the IAR Debug reset button) and execute again. Key is written successfully. (Two projects are designed, one Clear key and one load key. When using them, it is found that after the Clear key project is running, the loadkey project is burned again. It is found that the loadkey project is not executed. IAR Debug finds that it has entered hardFault. The participation of IAR Debug is only a temporary solution). I need your help, please

Gideon_0-1720059096084.png

 

0 项奖励
回复
2 回复数

149 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Gideon 

lukaszadrapa_0-1720601480488.png

 

Isn't just an additional reset needed? That's the only probable root cause I can see.

Regards,

Lukas

0 项奖励
回复

121 次查看
Gideon
Contributor III
@lukaszadrapa
Thank you for your strong support.I called the following function and found that it still didn't work.
void SystemSoftwareReset(void)
{
uint32_t regValue;

/* Read Application Interrupt and Reset Control Register */
regValue = S32_SCB->AIRCR;

/* Clear register key */
regValue &= ~( S32_SCB_AIRCR_VECTKEY_MASK);

/* Configure System reset request bit and Register Key */
regValue |= S32_SCB_AIRCR_VECTKEY(FEATURE_SCB_VECTKEY);
regValue |= S32_SCB_AIRCR_SYSRESETREQ(0x1u);

/* Write computed register value */
S32_SCB->AIRCR = regValue;
}
0 项奖励
回复