ARM Technical Support Knowledge Articles

CALLING OS_DISABLE_ISR INSIDE AN INTERRUPT

Applies to: RTX51 Real-time Kernel

Answer


Information in this article applies to:


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

Article last edited on: 2007-04-13 07:06:51

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential