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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

282 Views
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.

Labels (2)
0 Kudos
1 Reply

250 Views
ErichStyger
Senior Contributor V

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 Kudos