- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CapSense component uses interrupts that trigger after each sensor scan is complete.
Is there anything you have to pay attention to in the user application in order not to disturb this interrupt?
For example
Do not use interrupts with higher priority than CapSense interrupt.
There is a limit on the processing time of user interrupts with higher priority.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some general rules of thumb for interrupt handlers:
- Do not use delay functions within the handler directly or indirectly (Some LCD components use delays)
- Do not wait for an event to happen (Signal ready, Timer expires)
- When appropriate: Reset the interrupt cause and set a flag (global volatile uint8 variable) which is tested in the main loop and acted upon
Keep in mind:
Any global variablewhich gets changed within an interrupt handler must be declared as "volatile"
When you find a conflicting access you may encapsulate this within a "Critical Section". See CyEnterCriticalSection() and CyExitCriticalSection() APIs.
Of course you may use interrupts of higher priority (lower numbers) than the capsense interrupt.
There is no numeric limit, but keep the handlers short.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some general rules of thumb for interrupt handlers:
- Do not use delay functions within the handler directly or indirectly (Some LCD components use delays)
- Do not wait for an event to happen (Signal ready, Timer expires)
- When appropriate: Reset the interrupt cause and set a flag (global volatile uint8 variable) which is tested in the main loop and acted upon
Keep in mind:
Any global variablewhich gets changed within an interrupt handler must be declared as "volatile"
When you find a conflicting access you may encapsulate this within a "Critical Section". See CyEnterCriticalSection() and CyExitCriticalSection() APIs.
Of course you may use interrupts of higher priority (lower numbers) than the capsense interrupt.
There is no numeric limit, but keep the handlers short.
Bob