Datasheet

06 February 2012 Broadcom Europe Ltd. 406 Science Park Milton Road Cambridge CB4 0WW Page 123
© 2012 Broadcom Corporation. All rights reserved
If transmitting, ensure that sufficient sample words have been written to PCMFIFO
before transmission is started. Set TXON and/or RXON to begin operation. Poll
TXW writing sample words to PCMFIFO and RXR reading sample words from
PCMFIFO until all data is transferred.
8.4.2 Operating in Interrupt mode
a) Set the EN bit to enable the PCM block. Set all operational values to define the frame
and channel settings. Assert RXCLR and/or TXCLR wait for 2 PCM clocks to ensure
the FIFOs are reset. The SYNC bit can be used to determine when 2 clocks have
passed. Set RXTHR/TXTHR to determine the FIFO thresholds.
b) Set INTR and/or INTT to enable interrupts.
c) If transmitting, ensure that sufficient sample words have been written to PCMFIFO
before transmission is started. Set TXON and/or RXON to begin operation.
d) When an interrupt occurs, check RXR. If this is set then one or more sample words
are available in PCMFIFO. If TXW is set then one or more sample words can be sent
to PCMFIFO.
8.4.3 DMA
a) Set the EN bit to enable the PCM block. Set all operational values to define the frame
and channel settings. Assert RXCLR and/or TXCLR wait for 2 PCM clocks to ensure
the FIFOs are reset. The SYNC bit can be used to determine when 2 clocks have
passed.
b) Set DMAEN to enable DMA DREQ generation and set RXREQ/TXREQ to determine
the FIFO thresholds for the DREQs. If required, set TXPANIC and RXPANIC to
determine the level at which the DMA should increase its AXI priority,
c) In the DMA controllers set the correct DREQ channels, one for RX and one for TX.
Start the DMA which should fill the TX FIFO.
d) Set TXON and/or RXON to begin operation.
8.5 Error Handling.
In all software operational modes, the possibility of FIFO over or under run exists. Should this
happen when using 2 channels per frame, there is a risk of losing sync with the channel data stored
in the FIFO. If this happens and is not detected and corrected, then the data channels may become
swapped.
The FIFO’s will automatically detect an error condition caused by a FIFO over or under-run and this
will set the appropriate latching error bit in the control/status register. Writing a ‘1’ back to this
error bit will clear the latched flag.
In a system using a polled operation, the error bits can be checked manually. For an interrupt or
DMA based system, setting the INTE bit will cause the PCM interface to generate an interrupt when
an error is detected.