Content originally posted in LPCWare by thunderBird on Mon Aug 06 22:12:13 MST 2012
So after trying to get it to work, I've come to understand the following...
1.) When I use the "__WFI()" instruction, the controller does indeed go into sleep. How do I know this? As per the user manual, the outputs of the controller become static when the controller is in sleep/deep-sleep. That means that the level on outputs is maintained.
2.) When I use the "__WFI()" instruction to go to sleep/deep sleep, the "WAKEUP_IRQHandler" is not executed, when it should. In fact, I can not get the controller to wake up the way I want to, so I use the reset option.
3.) I tried using the "__WFE()" instruction instead of the "__WFI()" and that got me going somewhere. When I use the "__WFE()" instruction, the controller executes the "WAKEUP_IRQHandler" when I give it the input to wake up.
I haven't yet understood the ramifications of this. If it seems obvious to one of you, I would be grateful for that clarity.
Warm Regards,
Yash...