Hi, I am attempting to use a soft power switch configuration with our PSOC3 driven product and having an issue with hibernate mode, in that the cpu seems to come out ofCyPmHibernate() right after going into it - without the power switch being turned on.
Prior to the hibernate call I am sleeping /stopping all components, clearing interrupts, etc. and re-configuring clocks per the System Reference guide. There are ample delays for some servo motor commands prior to powering down, so I'm not worried about debounce of the switch. Below is a code snip from the power down routine.
I have had to put in a loop that waits for the power switch to be turned on, so the unit is sitting in this loop using about 7ma - not good, but I am having to ship product like this until I have a solution.
As I understand it the PICU is the only way to wake up from hibernate. I assume that I'm overlooking something that is waking things up, any suggestions/ideas on where to look next?
CyPmSaveClocks(); //Save Clock configuration before entering Hibernate
CyPLL_OUT_Stop(); // change clock configuration for hibernate
PWR_SW_ClearInterrupt(); // again
CyPmHibernate(); // put the device into hibernate mode
//***** CPU is supposed to stay ^ Here until power switch turned on *****//
while (powerSwState = PWR_SW_Read()); // DEBUG - wait here till power sw is low (on)