Datasheet
Table Of Contents
- List of Sections
- Table of Contents
- General Description
- Central Processing Unit (CPU)
- Pinout and Signal Description
- System Configuration
- Registers
- Operating Modes
- Resource Mapping
- Bus Control and Input/Output
- Resets and Interrupts
- Voltage Regulator (VREG)
- Flash EEPROM 256K
- EEPROM 4K
- Port Integration Module
- Clocks and Reset Generator (CRG)
- Pulse Width Modulator (PWM)
- Enhanced Capture Timer (ECT)
- Serial Communications Interface (SCI)
- Serial Peripheral Interface (SPI)
- Inter-IC Bus (IIC)
- MSCAN
- Analog to Digital Converter
- Byte Data Link Controller Module
- Contents
- Overview
- Features
- Block Diagram
- Register Map
- Functional Description
- Register Descriptions
- External Pin Descriptions
- Reset Initialization/Basic Operation
- Transmitting A Message
- Receiving A Message
- Transmitting An In-Frame Response (IFR)
- Receiving An In-Frame Response (IFR)
- Special BDLC Operations
- Modes of Operation
- Interrupt Operation
- Low Power Options
- Background Debug Module (BDM)
- Breakpoint (BKP) Module
- Revision History
- Glossary
- Literature Updates

Serial Peripheral Interface (SPI)
MC9S12DP256 — Revision 1.1
Serial Peripheral Interface (SPI)
Clock Phase and
Polarity Controls
Using two bits in the SPI control register1, software selects one of four
combinations of serial clock phase and polarity.
The CPOL clock polarity control bit specifies an active high or low clock
and has no significant effect on the transmission format.
The CPHA clock phase control bit selects one of two fundamentally
different transmission formats.
Clock phase and polarity should be identical for the master SPI device
and the communicating slave device. In some cases, the phase and
polarity are changed between transmissions to allow a master device to
communicate with peripheral slaves having different requirements.
CPHA = 0 Transfer
Format
The first edge on the SCK line is used to clock the first data bit of slave
into the master and the first data bit of master into the slave. In some
peripherals, the first bit of the slave's data is available at the slave data
out pin as soon as the slave is selected. In this format, the first SCK edge
is not issued until a half cycle into the 8-cycle transfer operation. The first
edge of SCK is delayed a half cycle by clearing the CPHA bit.
The SCK output from the master remains in the inactive state for a half
SCK period before the first edge appears. A half SCK cycle later, the
second edge appears on the SCK line. When this second edge occurs,
the value previously latched from the serial data input pin is shifted into
the LSB of the shifter.
After this second edge, the next bit of the SPI master data is transmitted
out of the serial data output pin of the master to the serial input pin on
the slave. This process continues for a total of 16 edges on the SCK line,
with data being latched on odd numbered edges and shifted on even
numbered edges.
Data reception is double buffered. Data is shifted serially into the SPI
shift register during the transfer and is transferred to the parallel SPI data
register after the last bit is shifted in.
After the 16th (last) SCK edge:
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...