|
The micro is really resetting itself:
I think the problem lies with the wfe() (wait for event) function
When I wait for a rising edge on a pin or an update on timer 2, the timer 3 is doing something different on its own (sounder).
The system works for 5s then the micro goes to a random memory location, flag an illegal access and restart.
My understanding is that it is due to the Cosmic compiler error or to a misconception in the microcontroller itself...
My way arounf the problem is to remove the use of the wfe() function
Regards |
|