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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

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

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Solution

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

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
7 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

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

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
lock attach
Attachments are accessible only for community members.
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

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

0 Likes

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

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

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.

pastedImage_1.png

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

0 Likes

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

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi LePo_1062026

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

pastedImage_0.png

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

0 Likes

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

Len
"Engineering is an Art. The Art of Compromise."
0 Likes