[Security] CSEC component invoke the eraseKeys interface problem

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

[Security] CSEC component invoke the eraseKeys interface problem

189件の閲覧回数
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 返答(返信)

148件の閲覧回数
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 件の賞賛
返信

120件の閲覧回数
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 件の賞賛
返信