Interrupt Handling in multi-threaded CTL environment
Hi,
I hope someone can help me get some clarity on this. How is an interrupt dealt with in a CTL multi-threaded environment?
For example if I use the CTL to set up several threads, one of which deals with a USART, if I set an interrupt on that USART will it only interrupt when in that thread, or can it interrupt from within any thread?
My concern is that if it interrupts whilst servicing a higher-priority thread then we may have timing issues.
Anyone have any example C/C++ code for interrupts within multi-threaded applications?
Thanks for your help!
Luke
-
I've added my USART handling code.
The USART IRQ handler (USART2_IRQHandler) replaces the defalt system one (this just happens my magic, cos the original is a weak reference)
**This IRQ handler is called regardless of CTL threads/tasking etc.**
All you need to do is pass the USART data to you app code somehow, I use a CTL byte queue for this, as it handles all issues regarding queueing and sharing of the buffer. All the other stuff is just my wrapper.
cheers
Mark
Please sign in to leave a comment.
Comments
1 comment