Chapter 14 Serial Peripheral Interface (SPIV3) Block Description
422
MC9S12C-Family / MC9S12GC-Family
Freescale Semiconductor
Rev 01.24
14.3.2.4
SPI Status Register (SPISR)
Read: anytime
Write: has no effect
14.3.2.5
SPI Data Register (SPIDR)
Read: anytime; normally read only after SPIF is set
Module Base 0x0003
7
6
5
4
3
2
1
0
R
SPIF
0
SPTEF
MODF
0
0
0
0
W
Reset
0
0
1
0
0
0
0
0
= Unimplemented or Reserved
Figure 14-6. SPI Status Register (SPISR)
Table 14-8. SPISR Field Descriptions
Field
Description
7
SPIF
SPIF Interrupt Flag
— This bit is set after a received data byte has been transferred into the SPI Data Register.
This bit is cleared by reading the SPISR register (with SPIF set) followed by a read access to the SPI Data
Register.
0 Transfer not yet complete
1 New data copied to SPIDR
5
SPTEF
SPI Transmit Empty Interrupt Flag
— If set, this bit indicates that the transmit data register is empty. To clear
this bit and place data into the transmit data register, SPISR has to be read with SPTEF = 1, followed by a write
to SPIDR. Any write to the SPI Data Register without reading SPTEF = 1, is effectively ignored.
0 SPI Data register not empty
1 SPI Data register empty
4
MODF
Mode Fault Flag
— This bit is set if the SS input becomes low while the SPI is configured as a master and mode
fault detection is enabled, MODFEN bit of SPICR2 register is set. Refer to MODFEN bit description in
Section 14.3.2.2, “SPI Control Register 2 (SPICR2)
”
The flag is cleared automatically by a read of the SPI Status
Register (with MODF set) followed by a write to the SPI Control Register 1.
0 Mode fault has not occurred.
1 Mode fault has occurred.
Module Base 0x0005
7
6
5
4
3
2
1
0
R
Bit 7
6
5
4
3
2
2
Bit 0
W
Reset
0
0
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 14-7. SPI Data Register (SPIDR)
Summary of Contents for MC9S12C Family
Page 689: ......