
Functional Description and Application Information
Serial Peripheral Interface (S12SPIV4)
MM912F634
Freescale Semiconductor
317
4.38.3.2.2
SPI Control Register 2 (SPICR2)
Read: Anytime
Write: Anytime; writes to the reserved bits have no effect
Table 405. SS Input / Output Selection
MODFEN
SSOE
Master Mode
Slave Mode
00
SS not used by the SPI
SS input
01
SS not used by the SPI
SS input
10
SS input with MODF feature
SS input
11
SS is slave select output
SS input
Table 406. SPI Control Register 2 (SPICR2)
0x00E9
7
6
5
432
10
R0
0
MODFEN
BIDIROE
0
SPISWAI
SPC0
W
Reset
0
000
00
0
Table 407. SPICR2 Field Descriptions
Field
Description
4
MODFEN
Mode Fault Enable Bit — This bit allows the MODF failure to be detected. If the SPI is in master mode and MODFEN is
cleared, then the SS port pin is not used by the SPI. In slave mode, the SS is available only as an input regardless of the value
of MODFEN. For an overview on the impact of the MODFEN bit on the SS port pin configuration, refer to
Table 408. In master
mode, a change of this bit will abort a transmission in progress and force the SPI system into idle state.
0SS port pin is not used by the SPI.
1SS port pin with MODF feature.
3
BIDIROE
Output Enable in the Bidirectional Mode of Operation — This bit controls the MOSI and MISO output buffer of the SPI,
when in bidirectional mode of operation (SPC0 is set). In master mode, this bit controls the output buffer of the MOSI port, and
in slave mode it controls the output buffer of the MISO port. In master mode, with SPC0 set, a change of this bit will abort a
transmission in progress and force the SPI into idle state.
0 Output buffer disabled.
1 Output buffer enabled.
1
SPISWAI
SPI Stop in Wait Mode Bit — This bit is used for power conservation while in wait mode.
0 SPI clock operates normally in wait mode.
1 Stop SPI clock generation when in wait mode.
0
SPC0
Serial Pin Control Bit 0 — This bit enables bidirectional pin configurations as shown in
Table 408. In master mode, a change
of this bit will abort a transmission in progress and force the SPI system into idle state.