HWI Module
2-152
DSP/BIOS and NMI Support
You should use the NMI interrupt only if tasking is disabled (that is, in a
SWI-only system) or if tasking is enabled but all the task stacks and the
ISR stack are in the same memory page. This is because it is not possible
to atomically modify SP, SSP, and the page register such that the whole
operation is protected from an NMI (non-maskable interrupt). When
tasking is enabled, DSP/BIOS modifies these registers whenever an
interrupt occurs, whenever a SWI is executed, and whenever a task
context switch takes place. Thus it is possible for an NMI to occur when
the state of these registers is not internally consistent. This could result
in unpredictable behavior when the DSP tries to push the processor state
onto the stack on its way to the NMI vector.
Registers and Stack
Whether a hardware interrupt is dispatched by the HWI dispatcher or
handled with the HWI_enter/HWI_exit macros, a common interrupt stack
(called the system stack) is used for the duration of the HWI. This same
stack is also used by all SWI routines.
The register mask argument to HWI_enter and HWI_exit allows you to
save and restore registers used within the function. Other arguments, for
example, allow the HWI to control the settings of the IMR or, in the case
of the C55x device, the IER0[IER1].
Note:
By using HWI_enter and HWI_exit as an HWI function’s prolog and
epilog, an HWI function can be interrupted; that is, a hardware interrupt
can interrupt another interrupt. For the c55x device, you can use the
IER0DISABLEMASK and IER1DISABLEMASK parameters to prevent
this from occurring.
HWI Manager
Properties
DSP/BIOS manages the hardware interrupt vector table and provides
basic hardware interrupt control functions; for example, enabling and
disabling the execution of hardware interrupts.
The following global properties can be set for the HWI module in the HWI
Manager Properties dialog of Gconf or in a Tconf script:
❏
Stack Mode.
Select the Stack Mode used for the application:
C54X_STK, USE_RETA or NO_RETA. The stack mode selected
here takes effect only if the program address 0xffff00 (the hardware
reset vector location) is programmable and the linker is configured to
place the vector table (.hwi_vec section) at address 0xffff00. If this