User`s guide
Hardware Interrupts
Thread Scheduling 4-21
When HWI_exit is called, you can also provide an IMRRESTOREMASK
parameter. The bit pattern in the IMRRESTOREMASK determines what
interrupts are restored by HWI_exit, by setting the corresponding bits in
the IMR. Of the interrupts in IMRRESTOREMASK, HWI_exit restores
only those that were disabled with HWI_enter. If upon exiting the ISR you
do not wish to restore one of the interrupts that was disabled with
HWI_enter, do not set that interrupt bit in IMRRESTOREMASK in
HWI_exit. HWI_exit does not affect the status of interrupt bits that are not
in IMRRESTOREMASK.
The C55x platform can have seven parameters in all, the first five specify
which CPU registers to save as context, and the last two can specify two
interrupt mask bitmaps.
HWI_enter and HWI_exit both take four parameters on the C6000 platform:
❏ The first two, ABMASK and CMASK, specify which A, B, and control
registers are to be saved and restored by the ISR.
❏ The third parameter on the C6000 platform, IEMASK, is a mask of those
interrupts that are to be disabled between the HWI_enter and HWI_exit
macro calls.
When an interrupt is triggered, the processor disables interrupts globally
(by clearing the GIE bit in the control status register (CSR)) and then
jumps to the ISR set up in the interrupt service table. The HWI_enter
macro reenables interrupts by setting the GIE in the CSR. Before doing
so, HWI_enter selectively disables bits in the interrupt enable register
(IER) determined by the IEMASK parameter. Hence, HWI_enter gives
you control to select what interrupts can and cannot preempt the current
HWI function.
When HWI_exit is called, the bit pattern in the IEMASK determines what
interrupts are restored by HWI_exit by setting the corresponding bits in
the IER. Of the interrupts in IEMASK, HWI_exit restores only those that
were disabled with HWI_enter. If upon exiting the ISR you do not want to
restore one of the interrupts that was disabled with HWI_enter, do not set
that interrupt bit in IEMASK in HWI_exit. HWI_exit does not affect the
status of interrupt bits that are not in IEMASK.










