- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anyone know why would I would have to call CapSense_CSD_Start() method twice in order to make my 3 button switch to work correctly? My top button wouldn't work if i don't call that method twice. The top button is further away from other 2 buttons. The tuning method is set to "AutoSense."
Here is the line of code.
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
CapSense_CSD_Start();
CapSense_CSD_Start();
CapSense_CSD_InitializeAllBaselines();
for(,,)
if(CapSense_CSD_IsBusy() == 0u){// If not busy.
/* Update all baselines */
CapSense_CSD_UpdateEnabledBaselines();
/* Update On/Off State */
CapSense_CSD_ScanEnabledWidgets();
/* Display CapSense state using LED/LCD */
}
CapSense_State();//checks for active widget
}
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mehul,
I am attaching a simple LED project here which checks whether any of the 3 CapSense buttons is pressed or not and glows LED if the button is touched. Could you please check this code on your board and let me know whether it is working or not? Please ensure that the pins are assigned correctly to CapSense buttons and LED.
Thank you,
Best Regards,
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It is sufficient to use CapSense_Start() once in the project. Tell us more information about what happens when you use CapSense_Start().
Also what happens when using Manual tuning mode?
Thanks,
Yuva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yuva,
I have not tried manual tuning method. I thought it would be best to keep it Auto Sense, since it serves the best results. As I said before when I use CapSense_start() once, one of the button would not respond.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mehul,
Can you please attach your complete project.
Thanks,
ANMN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mehul,
I am attaching a simple LED project here which checks whether any of the 3 CapSense buttons is pressed or not and glows LED if the button is touched. Could you please check this code on your board and let me know whether it is working or not? Please ensure that the pins are assigned correctly to CapSense buttons and LED.
Thank you,
Best Regards,
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ganesh,
it works, but it still doesn't explain why in my code it doesn't work without adding CapSense_start() twice.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mehul
I am also facing same issue what u mentioned above....
I am using Casense_CSD V3.10 component for touch detection. After code loading all my buttons are working fine after some time suddenly one or two buttons are not detecting... I am not able to know what is the exact issue for this. If u solved ur problem pls let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gangaghar,
The only way I was able make this issue go away by calling CapSense_Start() twice at initialization. I am not sure why, but that has worked for me.