RTOS Interrupt handling

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RTOS Interrupt handling

1,239 Views
prasanthapplied
Contributor III

Dear All,

         I'm using lpc1768 controller with rtos for use an Ethernet application. When i'm running a thread while getting an external interrupt what happens is processor first process the current thread function after that only goes to IRQHandler.

         My question is any possibilities to start IRQHandler function quickly(don't wait for finish current thread process) when an external interrupt is occur?

Thanks & Regards,

Prasanth.

Labels (1)
0 Kudos
3 Replies

742 Views
converse
Senior Contributor V

Interrupts happen immediately, whether you run an rtos or anything else. Hence the name - interrupt.

You can stop this behaviour by running code as a critical section (which basically disables interrupts for the duration of the critical section) but this has to be done explicitly in your code. Bear in mind different rtos's may use different terminology.

also, remember that interrupts have priorities, which allow interrupts to be interrupted by other interrupts of a higher priority.

0 Kudos

742 Views
prasanthapplied
Contributor III

   Thanks for your comments Con Verse. I'm using keil rtx RTOS and uart receive function is handled by NVIC. I gave a high interrupt priority using NVIC_SetPriority(UART1_IRQn,0).

   Without RTOS IRQHandler function works suddenly at interrupt occur but now it is not. Keil RTX online document they don't said anything about RTOS interrupt handling. I don't know how to handle it. Is it have any procedure to set priority of interrupt when using RTOS?

Thanks & Regards,

Prasanth.

0 Kudos

742 Views
jeremyzhou
NXP Employee
NXP Employee

Hi prasanth R,

The interrupt manage is crucial part of the RTOS, however the handle way is a little different in several RTOS, likes uc/OS, FreeRTOS, you can find this information in the RTOS's reference manual.

Hope it helps.

Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos