Hi, I'm trying to do a software reboot.
I've found two options:
1. Use watchdog timer. This works every time, however, I want to distinguish between 3 states, not 2.
2. Run the reset handler routine:However, this only works when I run it from the main of core 0. If it's run from a timer interrupt, the program gets stuck on the first sleep function.
Is there any way to set the watchdog's reason bits to 0? Or 3??
I'm also curious, what is missing from the reset handler routine that causes this behaviour. It feels like something hasn't reset properly but what?
I've found two options:
1. Use watchdog timer. This works every time, however, I want to distinguish between 3 states, not 2.
2. Run the reset handler routine:
Code:
multicore_reset_core1(); // stop core 1 before the reset // In an assembly snippet . . . // Set VTOR register, set stack pointer, and jump to reset asm volatile ( "mov r0, %[start]\n" "ldr r1, =%[vtable]\n" "str r0, [r1]\n" "ldmia r0, {r0, r1}\n" "msr msp, r0\n" "bx r1\n" : : [start] "r" (XIP_BASE + 256), [vtable] "X" (PPB_BASE + M0PLUS_VTOR_OFFSET) : );
Is there any way to set the watchdog's reason bits to 0? Or 3??
I'm also curious, what is missing from the reset handler routine that causes this behaviour. It feels like something hasn't reset properly but what?
Statistics: Posted by SREG_SFR — Fri Aug 23, 2024 12:35 pm — Replies 1 — Views 36