- 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
At first: Never ever use a delay within an interrupt handler, this may stall the complete system.
I did not hear of a SetHandler() function, but for an interrupt component there is a isr_StartEx() API
You are setting and resetting the flag, nobody will see that.
You need an infinite loop in your main() or the program will halt or be re-initialized.
All global variables changed in an interrupt handler should be declared with "volatile" to prevent them from getting optimized out of a loop.
Bob
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some more ref material -
http://www.cypress.com/documentation/application-notes/an54460-psoc-3-and-psoc-5lp-interrupts AN54460 - PSoC® 3, PSoC 4, and PSoC 5LP Interrupts
http://www.cypress.com/?rID=95069 AN90799 - PSoC® 4 Interrupts
http://www.barrgroup.com/Embedded-Systems/How-To/C-Volatile-Keyword Volatile
Regards, Dana.