Functional Description and Application Information
Serial Peripheral Interface (S12SPIV4)
MM912F634
Freescale Semiconductor
329
When the preselection bits are 001, the divisor determined by the selection bits is multiplied by 2. When the preselection bits are
010, the divisor is multiplied by 3, etc. See
Table 411 for baud rate calculations for all bit conditions, based on a 20 MHz bus clock.
The two sets of selects allows the clock to be divided by a non-power of two to achieve other baud rates such as divide by 6,
divide by 10, etc.
The baud rate generator is activated only when the SPI is in master mode and a serial transfer is taking place. In the other cases,
the divider is disabled to decrease IDD current.
4.38.4.5
Special Features
4.38.4.5.1
SS Output
NOTE
Care must be taken when using the SS output feature in a multi master system because the
mode fault feature is not available for detecting system errors between masters.
The SS output feature automatically drives the SS pin low during transmission to select external devices and drives it high during
idle to deselect external devices. When SS output is selected, the SS output pin is connected to the SS input pin of the external
device.
The SS output is available only in master mode during normal SPI operation by asserting SSOE and MODFEN bit as shown in
The mode fault feature is disabled while SS output is enabled.
4.38.4.5.2
Bidirectional Mode (MOMI or SISO)
NOTE
In bidirectional master mode, with mode fault enabled, both MISO and MOSI data pins can
be occupied by the SPI, though MOSI is normally used for transmissions in bidirectional
mode, and MISO is not used by the SPI. If a mode fault occurs, the SPI is automatically
switched to slave mode. In this case, MISO becomes occupied by the SPI and MOSI is not
used. This must be considered if the MISO pin is used for another purpose.
The bidirectional mode is selected when the SPC0 bit is set in SPI control register 2 (see
Table 415). In this mode, the SPI uses
only one serial data pin for the interface with external device(s). The MSTR bit decides which pin to use. The MOSI pin becomes
the serial data I/O (MOMI) pin for the master mode, and the MISO pin becomes serial data I/O (SISO) pin for the slave mode.
The MISO pin in master mode and MOSI pin in slave mode are not used by the SPI.