|ARM Technical Support Knowledge Articles|
Applies to: RTX51 Real-time Kernel
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.
Article last edited on: 2007-04-13 07:06:51
Did you find this article helpful? Yes No
How can we improve this article?