- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,
I use capsense function for my company new vehicle air condition HMI product.
Some key will auto trigger in EMS test. (Fail frequency in the 10~12 MHz)
Capsense setting is manual In PSoC creator. (If set Auto some keys are too sensitive)
My key press detect code in the below.
Are there any code design suggestions under the interference of EMS?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ChHs_4614611
In the code, you are scanning the sensors continuously. CapSense_ScanAllWidgets must be called if CapSense block is free. that is, The CapSense_ScanAllWidgets must also be inside the if (CapSense_NOT_BUSY == CapSense_IsBusy()) statement.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ChHs_4614611
In the code, you are scanning the sensors continuously. CapSense_ScanAllWidgets must be called if CapSense block is free. that is, The CapSense_ScanAllWidgets must also be inside the if (CapSense_NOT_BUSY == CapSense_IsBusy()) statement.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Hari,
Thanks for your reply.
So do I just add CapSense_ScanAllWidgets in this line?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ChHs_4614611
This is not correct. CapSense_ScanAllWidgets will return to program execution since it is interrupt based. So, you must call this after CapSense_ProcessAllWidgets(). The correct implementation is
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
CapSense_ProcessAllWidgets();
CapSense_ScanAllWidgets();
.
.
.
.
}
Please refer any CapSense related Code example for details on implementation.
You must also remove the scanallwidgets from the bottom portion (last line of the code snippet).
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I see.
Thank you for your reply.