CapSense RAW Value always maximum

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

Hello community,

   

 

   

i´m developing an application with CY8CKIT-042-BLE, a SSD1306 OLED-Display and a NXP PN512 NFC-Controller.

   

I ned three buttons for my application and i want to use CapSense for that.

   

I use the CapSense v3.0 component with PSoC Creator 3.3 SP2.

   

The Example "PRoC_BLE_CapSense_P4_OneButton" works fine to tune the CapSense button(s) with the Tuner Application.

   

 

   

But in my Application (not the same code for CapSense) the CapSense v3.0 component is not working correctly.

   

If i print out (over UART) the RAW Value of any CapSense button, the value is always the highest possible value.

   

 

   

I don´t came along with this faulty behavior.

   

 

   

Can anyone take a look in my source and can tell me what is wrong with my project?

   

Thanks in advance.

   

 

   

PS.: CapSense algorithm is in C file "buttons.c"

0 Likes
6 Replies
Anonymous
Not applicable

Can anybody tell me witch HW (Timers, SysTick, IntVectors, ...) is used by the CapSense Component?

   

I think there is are a race condition with the HW that i use in my project, but the ressource monitor nor the documentation of CapSense describes the use of any HW by CapSense.

   

In my project i use the SysTick Timer, WDT0, SCB0 and SCB1, TCPWM2 and TCPWM3, 2x PWM.

   

I use the PRoC BLE board of the CY8CKIT-042-BLE Kit.

   

 

   

Please help me

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

When you open the CapSense datasheet and to proceed to "Resources" you will see that there is no timer or other resource used except the CSD block, an interrupt and one to two IDACs. So there might be the interrupt that causes your "race condition". Check / set the priorities to test. In your handlers (if you have got any) avoid lengthy code, loops and (absolutely no) delays.

   

 

   

Bob

   

PS: Where in Germany are you located? I live near Bremen.

0 Likes
Anonymous
Not applicable

Tanks for your reply.

   

I live near Munich in Bavaria.

   

I have a mode, called standby, in which no interrupt is periodically triggered except the interrupt of WDT0. Also in this mode i get always the highest possible RAW Value.

   

The WDT0 interrupt only triggers my "Scheduler" to execute the function which execute the relevant functions of the CapSense component.

   

My assumption until now was that i reconfigured an interrupt vector that is used by CapSense. Now i think that assumption was wrong.

   

I do not have any delays in normal operating mode. I handle this with one HW-Timer and a set of functions, called Scheduler, to delay operations.

   

What do you mean with handlers? Handlers in general or for CapSense?

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

A "handler" is the code that "handles" the interrupt 😉

   

I would suggest you to reduce the (a copy) project to its barest using capsense. One thing I could see: you are mostly working with "widgets". A single widget with 3 buttons could be enough.

   

 

   

Bob

0 Likes
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hi,

   

 

   

In your project I see that you are using manual tuning for capsense. Have you followed the tuning procedure given in section 5.3  in the CapSense design guide. Can you check if tuning helps to your your issue? Also disable the IDAC auto-calibration and try setting it manually. 

   

 

   

Thanks,

   

Yuva.

0 Likes
Anonymous
Not applicable

Dear Yuva,

   

thank you for your help. I have decided to do a fresh start of my project.

   

The code was very ugly, so i ported FreeRTOS to my uC to have a better frame for my project and implemented first Deep-Sleep and CapSense as a Task in it.

   

Until now, CapSense and Deep-Sleep is working perfectly with all other components that i had added in my old workspace before.

   

I don´t know what has caused this behavior, but it isn´t important anymore.

   

This topic can be closed.

0 Likes