7 Replies Latest reply on Aug 23, 2019 3:54 AM by LePo_1062026

    I can't get the CapSenseSlider Example program to work.

    LePo_1062026

      hi,

       

      I'm new to ModusToolbox and its' ecosystem.

      I'm using a CY8CPROTO-062-4343W kit and have gotten BlinkyLED and USBCommDevice to compile, load and work just fine.

      I can get CapSenseSlider to compile. (Yes.   I reassigned the LED_RED to port 13.7).  I can get it to be loaded into the kit.

      When I run the CapSense Tuner "Connect"  to the EZI2C port @ 100Kbps and hit the "Start" button, I get NO RESPONSE from any of the CapSense Widgets on the Kit board.

       

      There appears to be no response from the CapSense widgets to activate the LED either.

       

      Am I missing something?

       

      Len

        • 1. Re: I can't get the CapSenseSlider Example program to work.
          LePo_1062026

          To all,

           

          Update: 8.17.2019 16:43

          Still doesn't work.

          Once I "Connect" and then "Start" in the CapSense Tuner Tool, the SCL (P6.0) and SDA (P6.1) signals are active on the KitProg3 PCB ports P12.0 and P12.1 respectively.  The SCL frequency is 100KHz.  Note: The CapSenseSlider app configured the EZI2C component with 100KHz.  However the CapSense Tuner Tool defaults to 400KHz.  I changed the CapSense Tuner Tool to 100KHz.  No improvement.

           

          There is no detectable signals on the BTN0 Tx (P1.0) or SLD0-4 Tx (P9.3).

           

          Additionally in debug mode, the code is always stuck at: main:line=186

          if(CY_CAPSENSE_NOT_BUSY == Cy_CapSense_IsBusy(&cy_capsense_context))

           

          Any suggestions out there?

           

          Thanks in advance.

           

          Len

          • 2. Re: I can't get the CapSenseSlider Example program to work.
            AH_96

            Hello LePo_1062026

             

            I tried the same project at my end and it was found to be working. Can you please import the attached project to your workspace and check if it is working?

             

            Please make sure that the CapSense and EzI2C ISRs are configured correctly in your project.

            /*******************************************************************************

            * Interrupt configuration

            *******************************************************************************/

            static void EZI2C_Interrupt(void);

            static void CapSense_Interrupt(void);

             

             

            const cy_stc_sysint_t CapSense_ISR_cfg =

            {

                .intrSrc = csd_interrupt_IRQn,

                .intrPriority = 7u,

            };

             

             

            const cy_stc_sysint_t EZI2C_ISR_cfg = {

                .intrSrc = scb_3_interrupt_IRQn,

                .intrPriority = 7u

            };

             

             

             

            Also, make sure that the CapSense component is enabled correctly

            /* Initialize CapSense interrupt */

                Cy_SysInt_Init(&CapSense_ISR_cfg, &CapSense_Interrupt);

                NVIC_ClearPendingIRQ(CapSense_ISR_cfg.intrSrc);

                NVIC_EnableIRQ(CapSense_ISR_cfg.intrSrc);

             

             

                /* Initialize the CapSense firmware modules. */

                Cy_CapSense_Enable(&cy_capsense_context);

             

             

            Do let me know if any other changes were made to the code example.

             

            Thanks and regards
            Harigovind

            • 3. Re: I can't get the CapSenseSlider Example program to work.
              LePo_1062026

              Harigovind,

               

              Thank you for replying.  I tried your project without any modifications.  It compiles and programs with no reported errors.

               

              No improvements.  The Capsense Tuner still provides NO RESPONSE!

               

              Additionally the LED_RED and LED_GREEN do not turn on.

               

              Do I have a defective CY8CPROTO-062-4343W kit?  Does it need to run with 1.8V or 3.3V VTARG?

               

              Len

              • 4. Re: I can't get the CapSenseSlider Example program to work.
                AH_96

                Hello LePo_1062026

                 

                In the example that I shared (and the code example) the supply voltage is set to 3.3V. This causes the reference voltage of the CapSense sensor to be set accordingly.

                In case you are using 1.8V as supply voltage, please set the same under Platform tab of design.modus.

                 

                I tried the same with both 1.8 and 3.3 V (after changing it to 1800mV in the operating conditions) and it was working. Please try this at your end and let us know if it solves the issue.

                 

                Thanks and regards
                Harigovind

                • 5. Re: I can't get the CapSenseSlider Example program to work.
                  LePo_1062026

                  Harigovind,

                   

                  Sorry for the late reply.  Many "fires" to fight at work!

                   

                  Thank you for your continued support.

                   

                  I've been using CapSenseSlider in 3.3V mode (J3  pins 2&3).  No improvements.

                   

                  In my normal debugging methodology, if I don't see the system is working, I look for subsystem signals.  Are there any subsystem signals I can monitor?  Is there a supporting interrupt?  HW signal connected to a pin that can e monitored?

                   

                  I've never needed to use Cypress capsense components before.  I have loaded capsense examples and got them to work fine in PSoC Creator.  This is the first time with ModusToolBox.

                   

                  Update:  In debug mode, I am entering Cy_CapSense_InterruptHandler() multiple times.

                  Len

                  • 6. Re: I can't get the CapSenseSlider Example program to work.
                    AH_96

                    Hi LePo_1062026

                     

                    If you probe the CapSense sensor pin, you will observe a signal similar to the picture attached:

                     

                    Please verify if the CapSense sensors are being charged and discharged completely. There will be multiple such cycles in a given scan interval.

                     

                    Also, please try to run the same example project at 1.8V, without any changes and let us know the observations.

                     

                    Thanks and regards
                    Harigovind

                    • 7. Re: I can't get the CapSenseSlider Example program to work.
                      LePo_1062026

                      Harigovind,

                       

                      Thank you again for all the help.

                       

                      Problem found.  My bad!

                       

                      I didn't look closely on the J3 jumper where pin 1 was located.  I had mistakenly though pin 1 was nearest the J10 USB connector.  Oops.  Once I realized my mistake I got the program to correctly operate at 3.3V or 1.8V  with the "correct" setting of the J3 jumper.

                       

                      Len