3 Replies Latest reply on Dec 16, 2015 11:49 AM by user_1377889

    CY8C4245PVI-482 Touch Problems

    pauric_1403606

      Hi there,

         

       

         

      I'm having a weird problem with the touch buttons on the CY8C4245. When I enable only one button in capsense it works fine. But when I enable more than 1 input as capsense button the software goes to the CY_ISR(IntDefaultHandler) function. I've tried lots of different setting but cant get it to work. Any ideas?

         

      <code>

         

      CapSense_1_Start();
          
      CyGlobalIntEnable;

         

      /* Initialize baselines */ 
      CapSense_1_InitializeAllBaselines();

         

      while(1)
      {
          /* Update all baselines */
          CapSense_1_UpdateEnabledBaselines();

         

          /* Start scanning all enabled sensors */
          CapSense_1_ScanEnabledWidgets();

         

          /* Wait for scanning to complete */
          while(CapSense_1_IsBusy() != 0)
          {
              /* Loop until condition true */
          }
          if(CapSense_1_CheckIsWidgetActive(CapSense_1_Sns_Enter__BTN))
          {
              TP2_Write(0);
          }
          else
          {
               TP2_Write(1);
          }
          if(CapSense_1_CheckIsWidgetActive(CapSense_1_Sns_Up__BTN))
          {
              TP3_Write(0);
          }
          else
          {
               TP3_Write(1);
          }
          if(CapSense_1_CheckIsWidgetActive(CapSense_1_Sns_Right__BTN))
          {
              TP4_Write(0);
          }
          else
          {
               TP4_Write(1);
          }
      }

         

      </code>

         

       

         

      Thanks,

         

      P