Capsense tunner

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

cross mob
Anonymous
Not applicable

Hello All,

Iam working on CY8C4014 and want to launch the tuner for capsense parameters,

I have setup the capsense module and EZI2C module, I have enable tuner in capsense module under SCB tab, I have set BR - 400 khz, sub address - 16 bits, and address - 0x08 both  in tuner as well as EZI2C module configuration tab,

Iam unable to read the device and I2C communication fails,

Iam configuring P3.0 - SCL and P3.1 - SDA for connecting to Mini prog3 as tuner.

Please help me on this as project criticality.

Thanks & Regards,

Pramod Kashyap

0 Likes
1 Solution
Anonymous
Not applicable

Pramod,

You need to use the below code for tuner setup. I don't know where you got the CapSense_Run()

#include <project.h>

int main()

{

    CyGlobalIntEnable; /* Enable global interrupts */

    EZI2C_Start(); /* Start EZI2C component */

    /*

    * Set up communication and initialize data buffer to CapSense data structure

    * to use Tuner application

    */

    EZI2C_EzI2CSetBuffer1(sizeof(CapSense_dsRam), sizeof(CapSense_dsRam),

    (uint8 *)&CapSense_dsRam);

    CapSense_Start(); /* Initialize component */

    CapSense_ScanAllWidgets(); /* Scan all widgets */

   

    for(;;)

    {

        /* Do this only when a scan is done */

        if(CapSense_NOT_BUSY == CapSense_IsBusy())

        {

        CapSense_ProcessAllWidgets(); /* Process all widgets */

        CapSense_RunTuner(); /* To sync with Tuner application */

        if (CapSense_IsAnyWidgetActive()) /* Scan result verification */

        {

        /* add custom tasks to execute when touch detected */

        }

        CapSense_ScanAllWidgets(); /* Start next scan */

        }

    }

}

View solution in original post

0 Likes
11 Replies
Anonymous
Not applicable

Pramod,

Are you using CY8CKIT-040? or your own custom board?

If you are using the -040 kit, then you should use P1.2 and P1.3 as I2C pins as these pins are connected to Kitprog for I2C interface.

Also, can you please attach your code? I want to check if you have called EZI2C_Start() and EZI2C_SetBuffer1 APIs.

-Chethan

0 Likes
Anonymous
Not applicable

Hello Chetan,

Thanks for reply,

I have a custom board, and iam using miniprog 3, with swd debug interface,

P3. 0 and P3. 1 pins are used for tuner debugging with miniprog 3

I have enable ezi2c communication in same pin and disabled swd interface to gpio in Dwr.

Iam able to connect with the tuner during run time I get the below error while debuging in tuner,

Data in device loaded is mismatch with tuner load data, reprogram device.

Iam using these two functions in main function,

Capsense1_tuner_start before while(1)

Capsense1_tuner_com in while (1)

Please let me know if iam missing any important configuration in ezi2c module.

0 Likes
Anonymous
Not applicable

Pramod,

I just want to confirm the PSoC Creator and component version you are using.

If you are using CapSense v2.50, i suggest you to move to the latest CapSense v4.0.

Can you please post your project archive?

-Chethan

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello Chetan,

Thanks for reply,

Iam using CapsenseCSD v2.6 from component catalog,

Iam using PSOC creator 4.1, you mean i have to use Capsense v4.0 component from Component catalog?

Please let me know ASAP.

Thanks

Pramod

0 Likes
Anonymous
Not applicable

Yes. I highly recommend you to use CapSense v4.0 as this allows you to use all the new features and updates done to the old component.

You can refer to the component datasheet for a simple CapSense project code.

I tested your project at my end and did not see any issues with CapSense tuner. Can you clean and build your project and then program the device?

0 Likes
Anonymous
Not applicable

Hello Chetan,

Thanks for fast response,

On which Board did you try to run the Capsense tuner?

Iam getting below message in tuner , when i press start button,

pastedImage_2.png

Please let me know what is the issue? if it is running on your end

Is my project setup correct?

Please let me know ASAP,

Thanks

Pramod

0 Likes
Anonymous
Not applicable

Hello Chetan,

As per your suggestion i used Capsense V4.0 component,

I included Capsense_1_Start and Capsense_1_run function in main function.

Iam not able to connect to the device when i use Tuner in the component,

Please help on this issue ASAP.

Thanks,

Pramod

0 Likes
Anonymous
Not applicable

Pramod,

You need to use the below code for tuner setup. I don't know where you got the CapSense_Run()

#include <project.h>

int main()

{

    CyGlobalIntEnable; /* Enable global interrupts */

    EZI2C_Start(); /* Start EZI2C component */

    /*

    * Set up communication and initialize data buffer to CapSense data structure

    * to use Tuner application

    */

    EZI2C_EzI2CSetBuffer1(sizeof(CapSense_dsRam), sizeof(CapSense_dsRam),

    (uint8 *)&CapSense_dsRam);

    CapSense_Start(); /* Initialize component */

    CapSense_ScanAllWidgets(); /* Scan all widgets */

   

    for(;;)

    {

        /* Do this only when a scan is done */

        if(CapSense_NOT_BUSY == CapSense_IsBusy())

        {

        CapSense_ProcessAllWidgets(); /* Process all widgets */

        CapSense_RunTuner(); /* To sync with Tuner application */

        if (CapSense_IsAnyWidgetActive()) /* Scan result verification */

        {

        /* add custom tasks to execute when touch detected */

        }

        CapSense_ScanAllWidgets(); /* Start next scan */

        }

    }

}

0 Likes
Anonymous
Not applicable

Shall i give try to u r code ??

0 Likes
Anonymous
Not applicable

Hello Chetan,

Iam able to run the tuner without any communication issues,

Capsense v4. 0 is working fine with u r code snippet.

Thanks for help,

Pramod

0 Likes
Anonymous
Not applicable

Hi Pramod,

Glad to hear that issue is resolved 🙂

-Chethan

0 Likes