1 Reply Latest reply on Feb 27, 2018 12:14 AM by gani

    Capsense sleep current is too high

    user_438312833

      Hi,

       

      I'm trying to use the CY8CKIT-059 (containing a psoc5lp) to create a low power capsense button. The button works fine, but the addition of the capsense module adds about 900uA to the sleep mode current, which is pretty significantly beyond what I was expecting. If I disable the capsense module in the schematic editor (and comment out the code), my sleep current goes back to about 2uA. If I just enable the capsense module but never run any code (no CapSense_Start(), etc) it still adds the 900uA current.

       

      Am I doing something wrong here? My code is below, and the project is attached.

       

      #include "project.h"
      
      
      CY_ISR(WakeupIsr)
      {
          SleepTimer_GetStatus();
      }
      
      
      int main(void)
      {
          CyGlobalIntEnable; /* Enable global interrupts. */
          
          //CapSense_1_TunerStart();
      
      
          /* Place your initialization/startup code here (e.g. MyInst_Start()) */
          isr_StartEx(WakeupIsr);
          SleepTimer_Start();
          
          CapSense_1_Start();
          CapSense_1_IdacCH0_SetValue(255);
          CapSense_1_InitializeAllBaselines();
          
          for(;;)
          {
              /* Place your application code here. */
              if(0u == CapSense_1_IsBusy())
              {
                  CapSense_1_UpdateEnabledBaselines();
      
      
                  CapSense_1_ScanEnabledWidgets();
              }
              
              if (CapSense_1_CheckIsWidgetActive(CapSense_1_SENSOR_BUTTON0__BTN)) LEDPin_Write(1);
              else LEDPin_Write(0);
              
              //CapSense_1_TunerComm();
              
              CapSense_1_Sleep();
              CyPmSaveClocks();
              
              CyPmSleep(PM_SLEEP_TIME_NONE, PM_SLEEP_SRC_CTW);
              
              // sleeping here
              
              CyPmRestoreClocks();
              CapSense_1_Wakeup();
              //CyDelay(1000);
          }
      }
      
      
      /* [] END OF FILE */
      

       

      Thanks,

      Jeremy

        • 1. Re: Capsense sleep current is too high
          gani

          Hi,

           

          The behavior is expected because When you put the CapSense component inside the schematic and build the project, the analog components will be connected internally and draws some current. Please use the system level API "SetAnalogRoutingPumps()" and disable the analog pumps. You can observe some significant reduce in the current. Please refer page number 30 in the PSoC 5 system reference guide for more information of this API attached with this response.

           

          Thanks and regards

          Ganesh