_Sleep() | Cypress Semiconductor
Alright, I'm still having a hard time trying to reduce power consumption for my program as nothing seems to work how I expect it. I have dropped trying to put the entire device into sleep and I am first going to just stop certain components when I don't need them running. To do this I am using a timer that hits its terminal count every 8 ms, this feeds a counter which will then trigger an interrupt every 128 ms. I use this trigger as a psuedo sleep mode in that when its triggered it alternates a flag, when this flag is high certain parts of my system are on, when it is low everything is off.
The problem I am having is that none of my components seem to like to be put to sleep and woken up as they no longer work. The 128 ms on time for them should be plenty of time, so i don't think that is the problem. If anyone could give my code a look through and tell me what I'm doing wrong I would greatly appreciate it.