![Texas Instruments AM1808 Technical Reference Manual Download Page 1128](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581128.webp)
1128
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Multichannel Audio Serial Port (McASP)
2.
Late: A late unexpected frame sync occurs when there is a gap or delay between the last bit of the
previous frame and the first bit of the next frame. When a late unexpected frame sync occurs (as soon
as the gap is detected):
•
Error interrupt flag is set (XSYNCERR, if an unexpected transmit frame sync occurs; RSYNCERR,
if an unexpected receive frame sync occurs).
•
Resynchronization occurs upon the arrival of the next frame sync.
Late frame sync is detected the same way in both burst mode and TDM mode; however, in burst mode,
late frame sync is not meaningful and its interrupt enable should not be set.
24.0.21.6.2 Buffer Underrun Error - Transmitter
A buffer underrun can only occur for serializers programmed to be transmitters. A buffer underrun occurs
when the serializer is instructed by the transmit state machine to transfer data from XRBUF[n] to XRSR[n],
but XRBUF[n] has not yet been written with new data since the last time the transfer occurred. When this
occurs, the transmit state machine sets the XUNDRN flag.
An underrun is checked only once per time slot. The XUNDRN flag is set when an underrun condition
occurs. Once set, the XUNDRN flag remains set until the CPU explicitly writes a 1 to the XUNDRN bit to
clear the XUNDRN bit.
In DIT mode, a pair of BMC zeros is shifted out when an underrun occurs (four bit times at 128 × f
s
). By
shifting out a pair of zeros, a clock may be recovered on the receiver. To recover, reset the McASP and
start again with the proper initialization.
In TDM mode, during an underrun case, a long stream of zeros are shifted out causing the DACs to mute.
To recover, reset the McASP and start again with the proper initialization.
24.0.21.6.3 Buffer Overrun Error - Receiver
A buffer overrun can only occur for serializers programmed to be receivers. A buffer overrun occurs when
the serializer is instructed to transfer data from XRSR[n] to XRBUF[n], but XRBUF[n] has not yet been
read by either the DMA or the CPU. When this occurs, the receiver state machine sets the ROVRN flag.
However, the individual serializer writes over the data in the XRBUF[n] register (destroying the previous
sample) and continues shifting.
An overrun is checked only once per time slot. The ROVRN flag is set when an overrun condition occurs.
It is possible that an overrun occurs on one time slot but then the CPU catches up and does not cause an
overrun on the following time slots. However, once the ROVRN flag is set, it remains set until the CPU
explicitly writes a 1 to the ROVRN bit to clear the ROVRN bit.
24.0.21.6.4 DMA Error - Transmitter
A transmit DMA error, as indicated by the XDMAERR flag in the XSTAT register, occurs when the DMA
(or CPU) writes more words to the DMA port of the McASP than it should. For each DMA event, the DMA
should write exactly as many words as there are serializers enabled as transmitters.
XDMAERR indicates that the DMA (or CPU) wrote too many words to the McASP for a given transmit
DMA event. Writing too few words results in a transmit underrun error setting XUNDRN in XSTAT.
While XDMAERR occurs infrequently, an occurrence indicates a serious loss of synchronization between
the McASP and the DMA or CPU. You should reinitialize both the McASP transmitter and the DMA to
resynchronize them.