7 Replies Latest reply on Mar 13, 2014 5:32 AM by user_14586677

    PSoC5LP: How to use the comparator power down override?

    content.librarian

      What needs to be done in order for a comparator to continue operation while the PSoC5LP sleeps?

         

      I have a switch whose level will be between 0 and 0.7V, which I connect to a comparator with a reverence of 0.256V. The output is taken to a Debouncer, with a 50Hz clock (permanently enabled). It's pos output is taken  to an isr. (see the attached graphic)

         

      The comparator Speed is set to ultra low power and its PowerDownOverride is enabled.

         

      The code:

         

          Pwr_SW_Comp_PwrDwnOverrideEnable();                //keep the power switch comparator running during sleep
          Pwr_SW_Comp_Start();
          isr_PWR_SW_StartEx(&Power_SW_ISR);

         

          while (1) {
              CyPmSleep(PM_SLEEP_TIME_NONE, PM_SLEEP_SRC_NONE);
          }

      The ISR (Power_SW_ISR) is never entered, but if I comment out the CyPmSleep() line, it works fine.

         

      What am I missing?

         

      Any help would be appeciated.