Need of signal measurement

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

cross mob
psoc_3295286
Level 4
Level 4
10 sign-ins 5 sign-ins Welcome!

Hello,

I want to use tuner helper for CY8C4245AXI-483 for touch switch. Is sample code for using tuner helper available for this particular controller?


The reason for asking for code is that I have made a few changes in design. Is it necessary to measure signal (raw count - baseline) for setting proper value of finger threshold or it can be done on trial and error basis.
I have FT value of 85 and it's working fine, but want to check for new design changes.
Please let me know if FT must be set after calculating signal (80 % of signal) or can I skip using tuner helper and set FT manually?


Thank you.

0 Likes
1 Solution
PandaS
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 5 likes given

Hi @psoc_3295286 ,

Please make sure you have the follow the checklist and verify each step:

1. I2C Configurations: Please make sure you use the same settings on both CapSense Tuner and Device firmware. Especially the Speed(in KHz)-100,400,1000; Address(7bit), and Sub Address bytes.

PandaS_1-1693125890147.png

2. Is the device powered? Please check the power supply pins(5V and GND) of the Device.

3. If you are not using MiniProg3 then you would be using a KitProg from another Kit from Infineon. Please connect the I2C Pins of the PSoC4 to respective I2C pins(P12.0, P12.1) of the KitProg board.

PandaS_0-1693125638850.png

4. Post this make sure, each each you program the board with some firmware changes, you should Restart the CapSense Tuner app.

Thanks and regards,

Sobhit

View solution in original post

0 Likes
3 Replies
PandaS
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 5 likes given

Hi @psoc_3295286 ,

PSoC4 CapSense Low Power One Button code example has Tuner implementation. You can refer to the code example for using CapSense Tuner. 

Basically you need to add a EzI2C block in Top Design:

PandaS_0-1682312936196.png

You will have to Start the EzI2C in main and Initialize the Buffer

    /* Start EZI2C block */
    EZI2C_Start();
    
    /* Set up communication data buffer to CapSense data structure to 
     * expose to I2C master at primary slave address request        
     */
    EZI2C_EzI2CSetBuffer1(sizeof(CapSense_dsRam), sizeof(CapSense_dsRam),\
                         (uint8 *)&CapSense_dsRam);

You should call the Run Tuner function after Process Widget command:

CapSense_RunTuner();

In the code example suggested, you will have to enable the Turn by this macro in order to use the Tuner:

/* Macro to disable/enable tuner to update sensor parameters - 0: disable 1: enable */
#define TUNER_UPDATE_ENABLE             (1u)

Warm regards,

Sobhit

Hello,

Thanks for suggestions but still receiving data read error.

I am using cy8c5868lti-lp039 instead of miniprog3 (given in datasheet) and therefore connected SCL and SDA pins of programmer to the respective pins of controller. Hope it is fine.

Thank you.

0 Likes
PandaS
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 5 likes given

Hi @psoc_3295286 ,

Please make sure you have the follow the checklist and verify each step:

1. I2C Configurations: Please make sure you use the same settings on both CapSense Tuner and Device firmware. Especially the Speed(in KHz)-100,400,1000; Address(7bit), and Sub Address bytes.

PandaS_1-1693125890147.png

2. Is the device powered? Please check the power supply pins(5V and GND) of the Device.

3. If you are not using MiniProg3 then you would be using a KitProg from another Kit from Infineon. Please connect the I2C Pins of the PSoC4 to respective I2C pins(P12.0, P12.1) of the KitProg board.

PandaS_0-1693125638850.png

4. Post this make sure, each each you program the board with some firmware changes, you should Restart the CapSense Tuner app.

Thanks and regards,

Sobhit

0 Likes