SPRUHM8K December 2013 – May 2024 TMS320F28374D , TMS320F28375D , TMS320F28376D , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28378D , TMS320F28379D , TMS320F28379D-Q1
The bits required to configure the McBSP as an SPI device are introduced in Table 21-14. Table 21-15 shows how the various combinations of the CLKSTP bit and the polarity bits CLKXP and CLKRP create four possible clock stop mode configurations. The timing diagrams in Section 21.7.4 show the effects of CLKSTP, CLKXP, and CLKRP.
Bit Field | Description |
---|---|
CLKSTP bits of SPCR1 | Use these bits to enable the clock stop mode and to select one of two timing variations. (See also Table 21-15.) |
CLKXP bit of PCR | This bit determines the polarity of the CLKX signal. (See also Table 21-15.) |
CLKRP bit of PCR | This bit determines the polarity of the MCLKR signal. (See also Table 21-15.) |
CLKXM bit of PCR | This bit determines whether CLKX is an input signal (McBSP as slave) or an output signal (McBSP as master). |
XPHASE bit of XCR2 | You must use a single-phase transmit frame (XPHASE = 0). |
RPHASE bit of RCR2 | You must use a single-phase receive frame (RPHASE = 0). |
XFRLEN1 bits of XCR1 | You must use a transmit frame length of 1 serial word (XFRLEN1 = 0). |
RFRLEN1 bits of RCR1 | You must use a receive frame length of 1 serial word (RFRLEN1 = 0). |
XWDLEN1 bits of XCR1 | The XWDLEN1 bits determine the transmit packet length. XWDLEN1 must be equal to RWDLEN1 because in the clock stop mode. The McBSP transmit and receive circuits are synchronized to a single clock. |
RWDLEN1 bits of RCR1 | The RWDLEN1 bits determine the receive packet length. RWDLEN1 must be equal to XWDLEN1 because in the clock stop mode. The McBSP transmit and receive circuits are synchronized to a single clock. |
Bit Settings | Clock Scheme |
---|---|
CLKSTP = 00b or 01b | Clock stop mode disabled. Clock enabled for non-SPI mode. |
CLKXP = 0 or 1 | |
CLKRP = 0 or 1 | |
CLKSTP = 10b | Low inactive state without delay: The McBSP transmits data on the rising edge of CLKX and receives data on the falling edge of MCLKR. |
CLKXP = 0 | |
CLKRP = 0 | |
CLKSTP = 11b | Low inactive state with delay: The McBSP transmits data one-half cycle ahead of the rising edge of CLKX and receives data on the rising edge of MCLKR. |
CLKXP = 0 | |
CLKRP = 1 | |
CLKSTP = 10b | High inactive state without delay: The McBSP transmits data on the falling edge of CLKX and receives data on the rising edge of MCLKR. |
CLKXP = 1 | |
CLKRP = 0 | |
CLKSTP = 11b | High inactive state with delay: The McBSP transmits data one-half cycle ahead of the falling edge of CLKX and receives data on the falling edge of MCLKR. |
CLKXP = 1 | |
CLKRP = 1 |