UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
264 of 362
NXP Semiconductors
UM10208
Chapter 20: LPC2800 DAO
The multiplicity of OUT registers and interrupt events available in the SAO allow a variety
of strategies for reading values from memory and writing them to the L and R FIFOs:
6.3 Data transfer via DMA channel(s)
One GP DMA channel can service SAO1 and the DAO in the following cases:
•
16-bit values for both channels are available in the same buffer. In this case write the
address of the LR32OUT1 register to the DMA channel’s Destination Address
register, program the channel to transfer words, and enable LUNDER for interrupt in
the SAO1 Mask register.
•
16-bit values are available for only one channel. In this case, if the SAO’s DMA
request is based on the FIFO being half-empty, write the address of the L32OUT1 or
R32OUT1 register to the DMA channel’s Destination Address register, program the
Table 299. Use of SAO1 OUT registers
Register
Mode of use
LR32OUT1 If 16-bit values for both channels are available in the same buffer, read a word from
the buffer and write it to this register.
If LMTMK is 0, do this 4 times, then read SAOSTAT1, check LUNDER, then dismiss
the interrupt.
If LHALFMK is 0, do this twice, then read SAOSTAT1, check LUNDER, and loop back
to read and store more words as long as LFULL is 0.
L24OUT1
R24OUT1
Whenever values wider than 16 bits are available in the buffer(s), these are the
register(s) to write.
If L data wider than 16 bits is available, read a word from the L buffer and write it to
L24OUT1. If R data wider than 16 bits is available, read a word from the R buffer
(which may be the same as the L buffer) and write it to R24OUT1.
If LMTMK is 0, do this 4 times, then read SAOSTAT1, check LUNDER and RUNDER,
then dismiss the interrupt.
If LHALFMK is 0, do this twice, then read SAOSTAT1, check LUNDER and RUNDER,
and loop back to read and write more words as long as LFULL or RFULL is 0.
L32OUT1
R32OUT1
These registers can be used if 16-bit values for only one channel are available, or if
16-bit values for both channels are available in separate buffers.
If L data is available, read a word from the L buffer and write it to L32OUT1. If R data
is available, read a word from the R buffer and write it to R32OUT1.
If LMTMK is 0, do this twice, then read SAOSTAT1, check LUNDER and RUNDER,
then dismiss the interrupt.
If LHALFMK is 0, do this once, then read SAOSTAT1, check LUNDER and RUNDER,
and loop back to read and write again if LHALF or RHALF is 1.
L16OUT1
R16OUT1
These registers are less efficient to use for 16-bit data than L32OUT1 and R32OUT1,
but an ISR would use them as follows:
If L data is available, read a halfword from the L buffer and write it to L16OUT1. If R
data is available, read a halfword from the R buffer and write it to R16OUT1. Then
read SAOSTAT1, check LUNDER and RUNDER, and loop back to read and write
again as long as LFULL or RFULL is 0.