This section explains the fundamental process of transmission in the McBSP. For details about how to program the McBSP transmitter, see Section 34.9.
Figure 34-15 and Figure 34-16 show how transmission occurs in the McBSP. Figure 34-15 shows the physical path for the data. Figure 34-16 is a timing diagram showing signal activity for one possible transmission scenario. A description of the process follows the figures.
- The CPU or the DMA controller writes data to the
data transmit registers. When DXR1 is loaded, the transmitter ready bit (XRDY)
is cleared in SPCR2 to indicate that the transmitter is not ready for new
data.
If the word length is 16 bits or smaller,
only DXR1 is used. If the word length is larger than 16 bits, DXR2 and DXR1 are
used and DXR2 contains the most-significant bits. For details on choosing a word
length, see Section 34.9.9.Note: If both DXRs are
needed (word length larger than 16 bits), the CPU or the DMA controller must
load DXR2 first and then load DXR1. As soon as DXR1 is loaded, the contents
of both DXRs are copied to the transmit shift registers (XSRs), as described
in the next step. If DXR2 is not loaded first, the previous content of DXR2
is passed to the XSR2.
- When new data arrives in DXR1, the McBSP copies
the content of the data transmit registers to the transmit shift registers. In
addition, the transmit ready bit (XRDY) is set. This indicates that the
transmitter is ready to accept new data from the CPU or the DMA controller.
If the word length is 16 bits or smaller, only
XSR1 is used. If the word length is larger than 16 bits, XSR2 and XSR1 are used
and XSR2 contains the most-significant bits.
If
companding is used during the transfer (XCOMPAND = 10b or 11b in XCR2), the
McBSP compresses the 16-bit data in DXR1 to 8-bit data in the μ-law or A-law
format in XSR1. If companding is disabled, the McBSP passes data from the DXRs
to the XSRs without modification. - The McBSP waits for a transmit frame-synchronization pulse on internal FSX.
- When the pulse arrives, the McBSP inserts the
appropriate data delay that is selected with the XDATDLY bits of XCR2.
In the preceding timing diagram (Figure 34-16), a 1-bit data delay is selected. - The McBSP shifts data bits from the transmit
shift registers to the DX pin.
When activity is not properly timed, errors can occur. See the following topics for more details: