UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
257 of 362
NXP Semiconductors
UM10208
Chapter 19: LPC2800 DAI
LHALFMK, and 4 for LFULMK). The following steps assume that the ISR is to store the
values in one or two buffer(s) in memory. The case in which the values are to be written to
another peripheral should be a straightforward variation on the steps described below.
The multiplicity of IN registers and interrupt events available in the SAI allow a variety of
strategies for reading and storing values:
Table 291. Use of SAI IN registers
Register Mode of use
LR32IN1 If 16-bit values for both channels are to be stored in the same buffer, read this register
and store the word in the buffer.
If LFULMK is 0, do this 4 times, then read SAISTAT1, check LOVER, then dismiss the
interrupt.
If LHALFMK is 0, do this twice, then read SAISTAT1, check LOVER, and loop back to
read and store more words as long as LNOTMT is 1.
If LNMTMK is 0, read and store one word, then read SAISTAT1 and loop back to read
and store more words as long as LNOTMT is 1.
L24IN1
R24IN1
Whenever values wider than 16 bits are to be stored, these are the register(s) to read.
Read L24IN1 if L data should be stored, and store the word in the L buffer. Read R24IN
if R data should be stored, and store the word in the R buffer (which may be the same
as the L buffer).
If LFULMK is 0, do this 4 times, then read SAISTAT1, check LOVER and ROVER, then
dismiss the interrupt.
If LHALFMK is 0, do this twice, then read SAISTAT1, check LOVER and ROVER, and
loop back to read and store more words as long as LNOTMT is 1.
If LNMTMK is 0, do this once, then read SAISTAT1, check LOVER and ROVER, and
loop back to read and store more words as long as LNOTMT is 1.
L32IN1
R32IN1
These registers can be used if LHALFMK or LFULMK is 0 and (16-bit values for only
one channel are to be stored, or 16-bit values for both channels are to be stored in
separate buffers).
Read L32IN1 if L data should be stored and write the word to the L buffer. Read R32IN1
if R data should be stored and write the word to the R buffer.
If LFULMK is 0, do this twice, then read SAISTAT1, check LOVER and ROVER, then
dismiss the interrupt.
If LHALFMK is 0, do this once, then read SAISTAT1, check LOVER and ROVER, and
loop back to read and store again if LHALF is 1.
L16IN1
R16IN1
Use these registers if LNMTMK is 0 and (16-bit values for only one channel are to be
stored, or 16-bit values for both channels are to be stored in separate buffers).
Read L16IN1 if L data is to be stored, and write the halfword to the L buffer. Read
R16IN1 if R data is to be stored, and write the halfword to the R buffer. Then read
SAISTAT1, check LOVER and ROVER, and loop back to read and store again as long
as LNOTMT is 1.