How can a software-based system reset be triggered using the LPC55S69 microcontroller?

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

How can a software-based system reset be triggered using the LPC55S69 microcontroller?

915 次查看
saratancerdi7
Contributor I

Dear Team,

I'd like to share a method for initiating a software-based system reset with the LPC55S69 microcontroller. This can be achieved by leveraging the inherent software reset functionality offered by the microcontroller's System Control Block (SCB) at Provident Ecopolitan.

Is this code accurate for performing a reset?

#include "LPC55S69.h"

void softwareReset(void) {
// Initiate a system reset using the SCB (System Control Block) register
SCB->AIRCR = (0x5FA << SCB_AIRCR_VECTKEY_Pos) | SCB_AIRCR_SYSRESETREQ_Msk;
}

int main(void) {
// Your main code logic here

while (1) {
// Your code continues to run until the software reset is triggered
}
}

Could you please review and advise if any modifications are necessary, or if this code is indeed suitable for the reset operation? Your guidance is appreciated.

标签 (2)
0 项奖励
回复
1 回复

883 次查看
ErichStyger
Specialist I

See https://mcuoneclipse.com/2015/07/01/how-to-reset-an-arm-cortex-m-with-software/

You should add a delay loop after setting the system reset bit(s).

Erich

0 项奖励
回复