Overwrite in the Transmitter
McBSP Exception/Error Conditions
4-8
SPRU592E
4.4 Overwrite in the Transmitter
After the CPU or the DMA controller writes data to the DXR(s), the transmitter
must then copy that data to the XSR(s) and then shift each bit from the XSR(s)
to the DX pin. If new data is written to the DXR(s) before the previous data is
copied to the XSR(s), the previous data in the DXR(s) is overwritten and thus
lost.
4.4.1 Example of the Overwrite Condition
6 shows what happens if the data in DXR1 is overwritten before
being transmitted. Initially, DXR1 is loaded with data C. A subsequent write to
DXR1 overwrites C with D before C is copied to XSR1. Thus, C is never
transmitted on DX.
Figure 4
−
6. Data in the McBSP Transmitter Overwritten and, Therefore, Not Transmitted
Write to DXR1(D)
ÁÁ
ÁÁ
Á
Á
Write to DXR1(E)
DXR1 to XSR1 copy(D)
Write to DXR1(C)
D5
D6
D7
B0
B1
B2
B3
B4
B5
B6
B7
A0
A1
XRDY
DX
FSX
CLKX
ÁÁ
ÁÁ
ÁÁ
ÁÁ
4.4.2 Preventing Overwrites
You can prevent CPU overwrites by making the CPU:
-
Poll for XRDY = 1 in SPCR2 before writing to the DXR(s). XRDY is set
when data is copied from DXR1 to XSR1 and is cleared when new data
is written to DXR1.
-
Wait for a transmit interrupt (XINT) before writing to the DXR(s). When
XINTM = 00b in SPCR2, the transmitter sends XINT to the CPU each time
XRDY is set.
You can prevent DMA overwrites by synchronizing DMA transfers to the
transmit synchronization event XEVT. The transmitter sends an XEVT signal
each time XRDY is set.
Содержание TMS320VC5509
Страница 5: ...vi This page is intentionally left blank ...
Страница 43: ...McBSP Operation 2 20 SPRU592E This page is intentionally left blank ...
Страница 105: ...SPI Operation Using the Clock Stop Mode 6 16 SPRU592E This page is intentionally left blank ...
Страница 187: ...Transmitter Configuration 8 40 SPRU592E This page is intentionally left blank ...
Страница 191: ...General Purpose I O on the McBSP Pins 9 4 SPRU592E This page is intentionally left blank ...
Страница 201: ...Emulation Power and Reset Considerations 10 10 SPRU592E ...
Страница 207: ...Data Packing Examples 11 6 SPRU592E This page is intentionally left blank ...
Страница 273: ...McBSP Register Worksheet 13 14 SPRU592E This page is intentionally left blank ...