[Security] About secureboot enable

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

[Security] About secureboot enable

559 次查看
Gideon
Contributor III

Dear NXPs:

ARCH:S32K146

OS:freeRTOS

I want to call the SystemSoftwareReset interface immediately after calling the Secureboot Enable interface. Will there be any problem?
CODE:
/* enable secureboot SERIAL Mode */
(void)CSEC_DRV_BootDefine(BM_BOOT_SIZE, CSEC_BOOT_SERIAL);
/* Reset process. */
SystemSoftwareReset();

The reason for doing this is mainly to reduce one manual power operation on the production line, so that the startup process becomes: call Secureboot Enable interface → SystemSoftwareReset → Secureboot Enabled → Free RTOS Startup.

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 项奖励
回复
0 回复数