
3.1 Resetting the Serial Port: RRST, XRST, GRST, and RESET
Resetting the Serial Port: RRST, XRST, GRST, and RESET
The serial port can be reset in two ways:•Device reset ( RESET pin is low) places the receiver, the transmitter, and the sample rate generator inreset. If it is removed ( RESET = 1), FRST = GRST = RRST = XRST = 0, the entire serial port is kept inthe reset state.•The serial port transmitter and receiver can be independently reset by the XRST and RRST bits in theserial port control register (SPCR). The sample rate generator is reset by the GRST bit in SPCR.
Table 3-1 shows the state of the McBSP pins when the serial port is reset by these methods.
Table 3-1. Reset State of McBSP Pins
Device ResetPin Direction ( RESET = 0) McBSP Reset
Receiver Reset (RRST = 0 and GRST = 1)
DR I Input InputCLKR I/O/Z Input CLKRM bit determines if CLKR pin is input or output; if configured asoutput, pin is driven by CLKRFSR I/O/Z Input FSRM bit determines if FSR pin is input or output; if configured as output,FSR is driven inactive as specified by FSRPCLKS I Input Input
Transmitter Reset (XRST = 0 and GRST = 1)
DX O/Z High impedance High impedanceCLKX I/O/Z Input CLKXM bit determines if CLKX pin is input or output; if configured asoutput, pin is driven by CLKXFSX I/O/Z Input FSXM bit determines if FSX pin is input or output; if configured as output,FSX is driven inactive as specified by FSXPCLKS I Input Input
•Device reset or McBSP reset: Resetting the McBSP by device or McBSP reset also resets the statemachine to its initial state, and resets all counters and status bits. This includes the receive status bits(RFULL, RRDY, RSYNCERR), and the transmit status bits (XEMPTY, XRDY, XSYNCERR).•Device reset: When the McBSP is reset by device reset, the entire serial port (including thetransmitter, receiver, and the sample rate generator) is reset. All input-only pins and 3-state pinsshould be in a known state. The output-only pin, DX, is in the high-impedance state. See Section 4.2for more information on the sample rate generator. When the device is pulled out of reset, the serialport remains in the reset condition (RRST = XRST = FRST = GRST = 0). In this reset condition, theserial port pins can be used as general-purpose I/O (see Chapter 10 ).•McBSP reset: When the receiver and transmitter reset bits (RRST, XRST), are cleared, the respectiveportions of the McBSP are reset and activity in the corresponding section stops. All input-only pins,such as DR and CLKS, and all other pins that are configured as inputs are in a known state. FS(R/X)is driven to its inactive state if it is an output, as well as its polarity bit, FS(R/X)P. CLKG drivesCLK(R/X) provided that GRST = 1 and they are programmed as outputs. The DX pin is in thehigh-impedance state when the transmitter is reset. During normal operation, clearing GRST resets thesample rate generator. GRST should be low only when neither the transmitter nor the receiver is usingthe sample rate generator. In this case, the internal sample rate generator clock CLKG, and its framesync signal (FSG) are driven inactive (low). When the sample rate generator is not in the reset state(GRST = 1), FSR and FSX are in an inactive state when RRST = 0 and XRST = 0, respectively, even ifthey are outputs driven by FSG. Thus, when only one portion of the McBSP is in reset, the otherportion can continue operation when FRST = 1 and frame sync is driven by FSG. After reset in C645xdevices, McBSP will disregard the first frame sync, and the data in XSR will be shifted out at thesecond frame sync. During that time, the data write by the DMA will be ready for transmit.•Sample-rate generator reset: The sample rate generator is reset when the device is reset or when itsreset bit, GRST, is cleared.
McBSP Overview18 SPRU580E – December 2005