我们修改为串口升级,升级包通过Uart传输,是不是就不用注册重启事件?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
通过调用 SystemReset() 函数,你可以直接重启设备并加载新的固件。
/! \brief Perform a full system reset.
//!
//! \return The chip will reset and hence never return from this call.
//
//*****************************************************************************
__STATIC_INLINE void
SysCtrlSystemReset( void )
{
// Disable CPU interrupts
CPUcpsid();
// Write reset register
HWREGBITW( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL, AON_SYSCTL_RESETCTL_SYSRESET_BITN ) = 1;
// Finally, wait until the above write propagates
while ( 1 ) {
// Do nothing, just wait for the reset (and never return from here)
}
}
不需要做什么准备,SystemReset();也可以用SystemResetSoft();或者HAL_SYSTEM_RESET();