I am now resetting using "asm volatile (" jmp 0"); and it works but I would like to leave the variables as is. I want to leave the LCD backlight off. I can supply the code if necessary.
Thanks, Bill
I am now resetting using "asm volatile (" jmp 0"); and it works but I would like to leave the variables as is. I want to leave the LCD backlight off. I can supply the code if necessary.
Thanks, Bill
I agree. A POR isn't the same, and all goes out the window in that case. And as you say, additional trickiness is then to figure out what kind of reset occurred. I think Bill is aware we're not advocating this should be done at all, we wouldn't do it for real. In practice only a few times I can think of for a JMP 0 (other than a watchdog forced reset which can be a different location) such as perhaps after an in-service software upgrade.. and even then we wouldn't be presuming the state of RAM contents in our code (for reasons mentioned before).
As usual, a simple question is more involved depending how deep the rabbit hole we go.