English
Language : 

MC9S08GT16A Datasheet, PDF (189/300 Pages) Freescale Semiconductor, Inc – Microcontrollers
Serial Peripheral Interface (S08SPIV3)
Write:
Write:
Write:
SPIC1
SPIC2
SPIC1
Module Initialization (Slave):
to configure
to configure
interrupts, set primary SPI options, slave mode select, and
system enable.
optional SPI features
Module Initialization (Master):
to configure
interrupts, set primary SPI options, master mode select,
and system enable.
Write:
Write:
SPIC2
SPIBR
to configure
to set
optional SPI features
baud rate
Module Use:
After SPI master initiates transfer by checking that SPTEF = 1 and then writing data to SPID:
Wait for SPTEF, then write to SPID
Wait for SPRF, then read from SPID
Mode fault detection can be enabled for master mode in cases where more than one SPI device might become a master
at the same time.
SPIC1
SPIC2
SPIBR
SPID
SPIE
SPE
SPTIE
MSTR
Module/interrupt enables and configuration
CPOL
MODFEN BIDIROE
Additional configuration options.
SPPR2
SPPR1 SPPR0
Baud rate = (BUSCLK/SPPR[2:0])/SPR2[2:0]
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
CPHA
SPR2
Bit 2
SSOE
LSBFE
SPISWAI SPC0
SPR1
SPR0
Bit 1
Bit 0
SPIS
SPRF
SPTEF MODF
Figure 12-2. SPI Module Quick Start
12.1.1 Features
Features of the SPI module include:
• Master or slave mode operation
• Full-duplex or single-wire bidirectional option
• Programmable transmit bit rate
• Double-buffered transmit and receive
• Serial clock phase and polarity options
• Slave select output
• Selectable MSB-first or LSB-first shifting
MC9S08GT16A/GT8A Data Sheet, Rev. 1
Freescale Semiconductor
189