8 Replies Latest reply on Apr 10, 2017 4:52 AM by mehul.laliwala

    Cap Sense CSD method

    mehul.laliwala

      Does anyone know why would I would have to call CapSense_CSD_Start() method twice in order to make my 3 button switch to work correctly?  My top button wouldn't work if i don't call that method twice.  The top button is further away from other 2 buttons.  The tuning method is set to "AutoSense." 

         

      Here is the line of code.

         

          CyGlobalIntEnable;  /* Uncomment this line to enable global interrupts. */     
          CapSense_CSD_Start();    
          CapSense_CSD_Start();
          CapSense_CSD_InitializeAllBaselines();

         

      for(,,)    

         

      if(CapSense_CSD_IsBusy() == 0u){// If not busy.
                  /* Update all baselines */
                  CapSense_CSD_UpdateEnabledBaselines();
                  /* Update On/Off State */
                  CapSense_CSD_ScanEnabledWidgets();
                  /* Display CapSense state using LED/LCD */         
              }
              CapSense_State();//checks for active widget

         

      }