Chapter 20 Deserial Serial Peripheral Interface (DSPI)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
447
20.7.2.3
DSPI Clock and Transfer Attributes Registers 0–7 (DSPI
x
_CTAR
n
)
The DSPI modules each contain eight clock and transfer attribute registers (DSPI
x
_CTAR
n
) that define
different transfer attribute configurations. Each DSPI
x
_CTAR controls:
•
Frame size
•
Baud rate and transfer delay values
•
Clock phase
•
Clock polarity
•
MSB or LSB first
DSPI
x
_CTARs support compatibility with the QSPI module used in certain members of the MPC56x
family of MCUs. At the initiation of an SPI transfer, control logic selects the DSPI
x
_CTAR that contains
the transfer’s attributes. Do not write to the DSPI
x
_CTARs while the DSPI is running.
In master mode, the DSPI
x
_CTAR
n
registers define combinations of transfer attributes such as frame size,
clock phase and polarity, data bit ordering, baud rate, and various delays. In slave mode, a subset of the bit
fields in the DSPI
x
_CTAR0 and DSPI
x
_CTAR1 registers sets the slave transfer attributes. Refer to the
individual bit descriptions for details on which bits are used in slave modes.
When the DSPI is configured as an SPI master, the CTAS field in the command portion of the TX FIFO
entry selects which of the DSPI
x
_CTAR registers is used on a per-frame basis. When the DSPI is
configured as an SPI bus slave, the DSPI
x
_CTAR0 register is used.
Table 20-4. DSPI
x
_TCR field descriptions
Field
Description
0–15
SPI_TCNT
[0:15]
SPI transfer counter
Counts the number of SPI transfers the DSPI makes. The SPI_TCNT field is incremented every time
the last bit of an SPI frame is transmitted. A value written to SPI_TCNT presets the counter to that value.
SPI_TCNT is reset to zero at the beginning of the frame when the CTCNT field is set in the executing
SPI command. The transfer counter ‘wraps around,’ incrementing the counter past 65535 resets the
counter to zero.
16–31
Reserved