• If MODFEN and SSOE bit are set, the SS pin is configured as slave select
output. The SS output becomes low during each transmission and is high when
the SPI is in idle state. If MODFEN is set and SSOE is cleared, the SS pin is
configured as input for detecting mode fault error. If the SS input becomes low
this indicates a mode fault error where another master tries to drive the MOSI
and SPSCK lines. In this case, the SPI immediately switches to slave mode by
clearing the MSTR bit and also disables the slave output buffer MISO (or SISO
in bidirectional mode). As a result, all outputs are disabled, and SPSCK, MOSI
and MISO are inputs. If a transmission is in progress when the mode fault
occurs, the transmission is aborted and the SPI is forced into idle state. This
mode fault error also sets the mode fault (MODF) flag in the SPI Status Register
(SPIx_S). If the SPI interrupt enable bit (SPIE) is set when the MODF flag gets
set, then an SPI interrupt sequence is also requested. When a write to the SPI
Data Register in the master occurs, there is a half SPSCK-cycle delay. After the
delay, SPSCK is started within the master. The rest of the transfer operation
differs slightly, depending on the clock format specified by the SPI clock phase
bit, CPHA, in SPI Control Register 1 (see
Note
A change of the bits CPOL, CPHA, SSOE, LSBFE, MODFEN,
SPC0, BIDIROE with SPC0 set, SPPR2-SPPR0 and SPR3-
SPR0 in master mode abort a transmission in progress and force
the SPI into idle state. The remote slave cannot detect this,
therefore the master has to ensure that the remote slave is set
back to idle state.
16.4.3 Slave Mode
The SPI operates in slave mode when the MSTR bit in SPI Control Register1 is clear.
• SPSCK
In slave mode, SPSCK is the SPI clock input from the master.
• MISO, MOSI pin
In slave mode, the function of the serial data output pin (MISO) and serial data input
pin (MOSI) is determined by the SPC0 bit and BIDIROE bit in SPI Control Register
2.
• SS pin
Functional Description
MC9S08PT60 Reference Manual, Rev. 4, 08/2014
454
Freescale Semiconductor, Inc.
Содержание MC9S08PT60
Страница 2: ...MC9S08PT60 Reference Manual Rev 4 08 2014 2 Freescale Semiconductor Inc...
Страница 34: ...MC9S08PT60 Reference Manual Rev 4 08 2014 34 Freescale Semiconductor Inc...
Страница 40: ...System clock distribution MC9S08PT60 Reference Manual Rev 4 08 2014 40 Freescale Semiconductor Inc...
Страница 120: ...Flash and EEPROM registers descriptions MC9S08PT60 Reference Manual Rev 4 08 2014 120 Freescale Semiconductor Inc...
Страница 200: ...Port data registers MC9S08PT60 Reference Manual Rev 4 08 2014 200 Freescale Semiconductor Inc...
Страница 228: ...System clock gating control registers MC9S08PT60 Reference Manual Rev 4 08 2014 228 Freescale Semiconductor Inc...
Страница 262: ...Human machine interfaces HMI MC9S08PT60 Reference Manual Rev 4 08 2014 262 Freescale Semiconductor Inc...
Страница 298: ...Functional Description MC9S08PT60 Reference Manual Rev 4 08 2014 298 Freescale Semiconductor Inc...
Страница 396: ...FTM Interrupts MC9S08PT60 Reference Manual Rev 4 08 2014 396 Freescale Semiconductor Inc...
Страница 440: ...Functional description MC9S08PT60 Reference Manual Rev 4 08 2014 440 Freescale Semiconductor Inc...
Страница 468: ...Initialization Application Information MC9S08PT60 Reference Manual Rev 4 08 2014 468 Freescale Semiconductor Inc...
Страница 570: ...Application information MC9S08PT60 Reference Manual Rev 4 08 2014 570 Freescale Semiconductor Inc...
Страница 648: ...Memory map and register description MC9S08PT60 Reference Manual Rev 4 08 2014 648 Freescale Semiconductor Inc...
Страница 676: ...Resets MC9S08PT60 Reference Manual Rev 4 08 2014 676 Freescale Semiconductor Inc...