www.ti.com
EDMA3 Interrupts
Example 2-1. Interrupt Servicing
The pseudo code:
1. Read the interrupt pending register (IPR/IPRH).
2. Perform the operations needed.
3. Write to the interrupt pending clear register (ICR/ICRH) to clear the corresponding IPR/IPRH bit.
4. Read IPR/IPRH again:
a. If IPR/IPRH is not equal to 0, repeat from step 2 (implies occurrence of new event between step
2 to step 4).
b. If IPR/IPRH is equal to 0, this should assure you that all enabled interrupts are inactive.
Note:
It is possible that during step 4, an event occurs while the IPR/IPRH bits are read to be 0
and the application is still in the interrupt service routine. If this happens, a new interrupt
is recorded in the device interrupt controller and a new interrupt is generated as soon as
the application exits the interrupt service routine.
is less rigorous, with less burden on the software in polling for set interrupt bits, but can
occasionally cause a race condition, as mentioned above.
Example 2-2. Interrupt Servicing
If it is desired to leave any enabled and pending (possibly lower priority) interrupts, it is required to force
the interrupt logic to reassert the interrupt pulse by setting the EVAL bit in the interrupt evaluation
register (IEVAL).
The pseudo code:
1. Enter ISR.
2. Read IPR/IPRH.
3. For the condition set in IPR/IPRH that you desire to service:
a. Service interrupt as required by application.
b. Clear bit for serviced conditions (others may still be set, and other transfers may have resulted in
returning the TCC to EDMA3CC after step 2).
4. Read IPR/IPRH prior to exiting ISR:
a. If IPR/IPRH is equal to 0, then exit ISR.
b. If IPR/IPRH is not equal to 0, then set IEVAL so that upon exit of ISR, a new interrupt is
triggered if any enabled interrupts are still pending.
The EVAL bit must not be set when IPR and IPRH are read to be 0, to avoid generation of extra
interrupt pulses.
Note:
Since the DMA region access registers (DRAE/DRAEH) are required to enable the transfer
completion region interrupts, it is assumed that there will be a unique and nonoverlapping (in
most cases) assignment of the channels and interrupts among the different shadow regions.
This allows the interrupt registers (IER, IESR, IECR, IPR, and ICR) in the different shadow
regions to functionally operate in an independent manner and nonoverlapping. The above
examples for the interrupt service routine is based on this assumption.
SPRUG34 – November 2008
EDMA3 Architecture
53
Содержание TMS320DM357
Страница 2: ...2 SPRUG34 November 2008 Submit Documentation Feedback ...
Страница 12: ...List of Tables 12 SPRUG34 November 2008 Submit Documentation Feedback ...
Страница 16: ...Read This First 16 SPRUG34 November 2008 Submit Documentation Feedback ...
Страница 64: ...EDMA3 Architecture 64 SPRUG34 November 2008 Submit Documentation Feedback ...