CY8C4245PVI-482 Touch Problems

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. Another question: Which board do you use? Self-made?? Prototyping kit???

   

 

   

Bob

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

Hi Bob,

   

 

   

I'm using a custom Board. This is the first time I've used this particular chip but I've used touch before with the CYBL10563 with no problems. I've attached my project.

   

 

   

Thanks for your time,

   

P

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I rewrote the project for a CY8CKIT-042.

   

Main changes were sensor numbers

   

Setting of Capsense to auto (smart sense)

   

setting all buttons to the same values in Capsense

   

Look at the attached project

   

 

   

Bob

0 Likes