HWI_enable
2-162
C Interface
Syntax
HWI_enable();
Parameters
Void
Return Value
Void
Reentrant
yes
Description
HWI_enable enables hardware interrupts by clearing the intm bit in the
status register.
Hardware interrupts are enabled unless a call to HWI_disable disables
them. DSP/BIOS enables hardware interrupts after the program’s main()
function runs. Your main() function can enable individual interrupt mask
bits, but it should not call HWI_enable to globally enable interrupts.
Interrupts that occur while interrupts are disabled are postponed until
interrupts are reenabled. However, if the same type of interrupt occurs
several times while interrupts are disabled, the interrupt’s function is
executed only once when interrupts are reenabled. A context switch can
occur when calling HWI_enable/HWI_restore if an enabled interrupt
occurs while interrupts are disabled.
Any call to HWI_enable enables interrupts, even if HWI_disable has been
called several times.
Constraints and
Calling Context
❏
HWI_enable cannot be called from the program’s main() function.
Example
HWI_disable
()
;
"critical processing takes place"
HWI_enable
()
;
"non-critical processing"
See Also
HWI_disable
HWI_restore
SWI_disable
SWI_enable
HWI_enable
Enable interrupts