MPC5200B Users Guide, Rev. 1
15-74 Freescale Semiconductor
PSC FIFO System
When using BestComm you must specify a non-zero “Granularity” to get FIFO underrun errors. This is due to its internal pipelining.
BestComm does not immediately stop accessing the FIFO when the FIFO interrupt goes away.
15.4.2 TX FIFO
The TX FIFO space is 512 Byte. For a Tx FIFO, the “Alarm” value specifies a threshold in terms of DATA bytes, not in terms of empty space
as with the Rx FIFO. Once the amount of data in the Tx FIFO falls below the “Alarm” level, an interrupt activates. The interrupt indicates the
Tx FIFO is “almost empty” and needs more data. Tx FIFO “Granularity” is specified in terms of empty bytes, not a number of data bytes as
with the Rx FIFO. For more informations see also Figure15-22. The “Granularity” value range is 0–7.
The Tx FIFO controller hardware multiplies this value by 4, to establish the actual level at which the FIFO alarm goes away.
For the Tx FIFO, the alarm goes away when the number of empty bytes left in the Tx FIFO is less than or equal to:
0 (Granularity value 0)
4 (Granularity value 1)
8 (Granularity value 2)
12 (Granularity value 3)
16 (Granularity value 4)
20 (Granularity value 5)
24 (Granularity value 6)
28 (Granularity value 7)
The FIFO interrupt stays active until BestComm writes enough data into the Tx FIFO to reach the Granularity level. Once the Granularity
level is reached, the interrupt goes away.
For the example (see Figure 15-22) it means:
The requestor to the BestComm to filling the TX FIFO becomes active if the amount of data in the FIFO is less then 16 data.
The requester became inactive if less than 20 (5 * 4) bytes space in the FIFO.
15.4.3 Looping Modes
The PSC can be configured to operate in various loopback modes as shown in Figure 15-23. These modes are useful for local and remote
system diagnostic functions and can be used by in Codec mode as well as UART mode. The modes are described below and in Section 15.2,
PSC Registers—MBAR + 0x2000, 0x2200, 0x2400, 0x2600, 0x2800, 0x2C00.
The PSCs transmitter and receiver should be disabled when switching between modes. The selected mode is activated immediately on mode
selection, regardless of whether a character is being received or transmitted.

15.4.3.1 Automatic Echo Mode

In automatic echo mode, shown in Figure15-23, the PSC automatically resends received data bit-by-bit. The local CPU-to-receiver
communication continues normally, but the CPU-to-transmitter link is disabled. In this mode, received data is clocked on the receiver clock
and resent on TxD. The receiver must be enabled, but the transmitter need not be.

Figure 15-23. Automatic Echo

Because the transmitter is inactive, SR[TxEMP,TxRDY] is inactive and data is sent as it is received. Received parity is checked, but is not
recalculated for transmission. Character framing is also checked, but stop bits are sent as they are received. A received break is echoed as
received until the next valid start bit is detected.

15.4.3.2 Local Loop-Back Mode

Figure 15-24 shows how TxD and RxD are internally connected in local loop-back mode. This mode is for testing the operation of a local
PSC module channel by sending data to the transmitter and checking data assembled by the receiver to ensure proper operations.

CPU

Disabled Disabled

RxD Input

TxD Input

Tx

Rx