Keil Logo

RTX51: CALLING OS_DISABLE_ISR INSIDE AN INTERRUPT


Information in this article applies to:

  • RTX51 Version 3.10

QUESTION

We have an interrupt that is triggered when two contacts are closed, however the contacts bounce so the interrupt is always called several times in succession. Is there any problem in disabling the interrupt by calling os_disable_isr during the interrupt routine?

ANSWER

Like any other system function starting with os_, os_disable_isr may be used by RTX51 tasks only. It may not be used in an interrupt.

In C51 interrupt functions, you should use the oi_reset_int_masks function instead of os_disable_isr.

In your specific case, the execution time of the interrupt routine may be shorter than the bounce time of the contacts. So, a better approach may be to provide hardware or software debouncing of the contacts.

MORE INFORMATION

Refer to the RTX51 User's Guide for more information on oi_reset_int_masks.

SEE ALSO

Last Reviewed: Friday, April 13, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.