RTX51: CALLING OS_DISABLE_ISR INSIDE AN INTERRUPT
Information in this article applies to:
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?
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.
Refer to the RTX51 User's Guide for more information on oi_reset_int_masks.
Last Reviewed: Friday, April 13, 2007
of your data.