0 Replies Latest reply on Jan 10, 2018 4:29 AM by user_438312833

    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