I have the following code:
That code should wakeup the processor when the WKUP0 pin goes from high (pull-up) to low. This does not work as expected. However....SUPC->SUPC_WUIR = (1 << 16);
The above code - which makes the processor wake up on a high on WKUP0 - works as expected. Although in this case I have to hold the button down until the sleep timer expires and the release the button to wake up the processor.SUPC->SUPC_WUIR = (1 << 16) | 1;
Any idea on why it would work from low to high transitions but not high to low???