4 Replies Latest reply on Mar 23, 2018 2:12 AM by terrychan_3034126

    CapSense power saving mode

    terrychan_3034126

      Hi,

       

      I am using CYBLE-014008-EVAL for my development.

       

      I would like to write a power saving mode in my project in which the CapSense buttons are used.

      However, after I added the below codes in the main loop, I seems to be unable to use those CapSense buttons (nothing happened after I pressed them).

       

      /* Prepare CapSense component for Deep-Sleep mode */

      CapSense_CSD_Sleep();

       

      CySysPmDeepSleep();

       

      /* Reconfigure CapSense component after Deep-Sleep */

      CapSense_CSD_Wakeup();

       

      Can anyone help me on the issue.

       

      Thanks,

      Terry

        • 1. Re: CapSense power saving mode
          e.pratt_1639216

          See this application note: CE95288 - CapSense Low Power with PSoC 4

          Here is the direct document: http://www.cypress.com/file/230796/download

          The capsense component does not run in low power modes, and must be scanned frequently to work correctly. Thus, if you want to use a low power mode with capsense, you will need to wake up frequently with a timer to scan the capsense for desired functionality.

          1 of 1 people found this helpful
          • 2. Re: CapSense power saving mode
            terrychan_3034126

            Hi e.pratt_1639216,

             

            Thanks for your information.

            I referenced to the example CE210291 to create a watchdog timer in my project (Based on BLE_Heart_Rate_Sensor example).

            And, I removed the original watchdog interrupt of counter 2.

            The watchdog handler could be triggered even if the system was in sleep mode.

             

            However, that watchdog timer could not wake up the system since if I stopped the debugger, the program stopped at the line of CY_PM_WFI.

             

            The system went to sleep mode from CyBle_ProcessEvents() (according to Call Stack).

             

            Do I need to set the interrupt soucre?

            • 3. Re: CapSense power saving mode
              e.pratt_1639216

              The debugger doesn't run when the CPU enters a sleep power mode, thus the debugger shouldn't be operable when you are doing deep sleep (at least not reliably from my own testing).

              Things you would want to check:

              Make sure you are clearing the WDT interrupt flag to allow a new interrupt to wake up the unit from sleep

              If the example you are using has the WDT working for waking from low power sleep, then it should already be configured as the interrupt source.

              If you can attach an archive of your project with the settings, we can take a look at it and see if you accidentally broke it

              Generally you need to handle the interrupt, and if you are in a low power mode, I believe you will need to set a handler and topdesign.cysch component to wake up the device from deep sleep using WDT interrupts.

              1 of 1 people found this helpful
              • 4. Re: CapSense power saving mode
                terrychan_3034126

                Hi e.pratt_1639216,

                 

                Thanks for your information, I added my custom WDT successfully.