I'm confused (imagine that-LOL). Are any LED's on during the idle time? When you say it appears dead, I assume you mean it won't respond to the switch. (of which I see nowhere in the program where it would)
I think you need to configre it so either the switch causes an wake up interrupt, or put it to sleep for short periods then wake up and check the switch. maybe 1 ms nap (power nap?)
Just my thoughts.
Bookmarks