Keil Logo

Interrupts

RTX51 Tiny works in parallel with your interrupt functions. Interrupt service routines may communicate with RTX51 Tiny tasks by sending signals (using the isr_send_signal function) or by setting a task's Ready flag (using the isr_set_ready function).

Interrupt routines must be implemented and enabled in your RTX51 Tiny application as they would be in a standard, non-RTX51 Tiny application. There is no interrupt service routine management in RTX51 Tiny.

RTX51 Tiny uses Timer 0, the Timer 0 interrupt, and register bank 1. If your program uses Timer 0 the RTX51 Tiny kernel will not function correctly. You may append your own Timer 0 ISR code to the end of the RTX51 Tiny Timer 0 ISR. Refer to Hardware Timer for more information about these.

RTX51 Tiny assumes that global interrupts are always enabled (EA=1). RTX51 Tiny library routines change the state of the interrupt system (the EA bit) as needed to ensure that RTX51 Tiny internal structures are not corrupted by interrupts. When enabling and disabling global interrupts, RTX51 Tiny simply changes the state of EA. It does not save and restore EA. EA is simply set or cleared. Therefore, if your program disables interrupts prior to calling an RTX51 routine, RTX51 may fail to respond.

Disabling interrupts for brief periods of time may be required for critical sections in your program. However, you may not invoke any RTX51 Tiny routines with interrupts disabled. If your program does disable interrupts, it should be for brief periods only.

Related Knowledgebase Articles

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.