Simplify JumpToBootloader() by only using the first method to reset the MCU.

This commit is contained in:
László Monda
2017-03-18 21:13:25 +01:00
parent 487c02335b
commit 1bb76d7d3f

View File

@@ -112,8 +112,7 @@ void getSystemProperty() {
} }
void jumpToBootloader() { void jumpToBootloader() {
// We should reset the device here SCB->AIRCR = 0x5FA<<SCB_AIRCR_VECTKEY_Pos | SCB_AIRCR_SYSRESETREQ_Msk; // Reset the MCU.
SCB->AIRCR = (0x5FA<<SCB_AIRCR_VECTKEY_Pos)|SCB_AIRCR_SYSRESETREQ_Msk;
// SCB->AIRCR = 0x05fA0002; // If the masked version doesn't work, this should also reset the core. // SCB->AIRCR = 0x05fA0002; // If the masked version doesn't work, this should also reset the core.
for (;;); for (;;);
} }