2 Replies Latest reply on Nov 26, 2019 1:36 AM by KrDe_284951

    PSOC3 will not stay in hibernate

      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)       



        • 1. Re: PSOC3 will not stay in hibernate

          I have the same question - but unlike the OP, I do call


          before I call hibernate.


          So I'm assuming an interrupt is occurring, bringing the uC out of hibernate - can I read a reg to know which interrupt caused the resume out of hibernate?

          • 2. Re: PSOC3 will not stay in hibernate



            I'm no expert in this matter (iI struggle with similar issues using CyPmSleep()) but what I suppose is that when using PmCyHibernate() the IO pins of the processor become high impedant (at least they don't have the same behaviour as when using CyPmSleep()).. This could cause a involuntary interrupt when a IO pin driffts from high to low or vice versa.