NXP S08SV Reference guide

Type
Reference guide
HCS08
Microcontrollers
freescale.com
MC9S08SV16
MC9S08SV8
Reference Manual
MC9S08SV16RM
Rev. 2
4/2009
Related Documentation:
MC9S08SV16 (Data Sheet)
Contains pin assignments and diagrams, all electrical
specifications, and mechanical drawing outlines.
Find the most current versions of all documents at:
http://www.freescale.com
8-Bit S08 Central Processor Unit (CPU)
Up to 40 MHz CPU at 2.7 V to 5.5 V across
temperature range of –40 °C to 85 °C
HC08 instruction set with added BGND
instruction
Support for up to 32 interrupt/reset sources
On-Chip Memory
Up to 16 KB flash read/program/erase over full
operating voltage and temperature
Up to 1024-byte random-access memory
(RAM)
Security circuitry to prevent unauthorized
access to RAM and flash contents
Power-Saving Modes
Two low power stop modes; reduced power
wait mode
Allowing clocks to remain enabled to specific
peripherals in stop3 mode
Clock Source Options
Oscillator (XOSC) — Loop-control Pierce
oscillator; crystal or ceramic resonator range of
31.25 kHz to 39.0625 kHz or 1 MHz to 16 MHz
Internal Clock Source (ICS) — Internal clock
source module containing a
frequency-locked-loop (FLL) controlled by
internal or external reference; precision
trimming of internal reference allows 0.2%
resolution and 2% deviation over temperature
and voltage; supporting bus frequencies up to
20 MHz
System Protection
Watchdog computer operating properly (COP)
reset with option to run from dedicated 1 kHz
internal clock source or bus clock
Low-voltage detection with reset or interrupt;
selectable trip points
Illegal opcode detection with reset
Illegal address detection with reset
Flash block protection
Development Support
Single-wire background debug interface
Breakpoint capability to allow single
breakpoint setting during in-circuit debugging
(plus two more breakpoints)
On-chip in-circuit emulator (ICE) debug
module containing two comparators and nine
trigger modes.
Peripherals
IPC — Interrupt priority controller to provide
hardware based nested interrupt mechanism
ADC — 12-channel, 10-bit resolution; 2.5 μs
conversion time; automatic compare function;
1.7 mV/°C temperature sensor; internal
bandgap reference channel; operation in stop;
optional hardware trigger; fully functional from
2.7 V to 5.5 V
TPM — One 6-channel and one 2-channel
timer/pulse-width modulators (TPM) modules;
selectable input capture, output compare, or
buffered edge- or center-aligned PWM on each
channel
MTIM16— One 16-bit modulo timer
SCI — One serial communications interface
module with optional 13-bit break; LIN
extensions
SPI — One serial peripheral interface module
in 8-bit data length mode with a receiving data
buffer hardware match function
IIC — Inter-integrated circuit bus module
capable of operation up to 100 kbps with
maximum bus loading; multi-master operation;
programmable slave address; interrupt-driven
byte-by-byte data transfer; broadcast mode;
10-bit addressing
ACMP — Analog comparator with option to
compare to internal reference
RTC — Real time counter
KBI— 8-pin keyboard interrupt module with
software selectable polarity on edge or
edge/level modes
Input/Output
30 GPIOs including 1 input-only pin and 1
output-only pin
Package Options
32-pin LQFP
32-pin SDIP
MC9S08SV16 Features
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 5
MC9S08SV16 MCU Series Reference Manual
Covers: MC9S08SV16
MC9S08SV8
MC9S08SV16
Rev. 2
4/2009
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 7
Revision History
To provide the most up-to-date information, the revision of our documents on the World Wide Web will
be the most current. Your printed copy may be an earlier revision. To verify you have the latest information
available, refer to:
http://freescale.com
The following revision history table summarizes changes contained in this document.
Revision
Number
Revision
Date
Description of Changes
1 4/2/2009 Initial public release.
2 4/29/2009
Reworded Chapter 11, “16-Bit Timer/PWM (S08TPMV3).”
Corrected Ta ble 2 - 1 .
This product incorporates SuperFlash
®
technology licensed from SST.
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
© Freescale Semiconductor, Inc., 2009. All rights reserved.
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 9
List of Chapters
Chapter 1 Device Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 2 Pins and Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 4 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Chapter 5 Resets, Interrupts, and System Configuration . . . . . . . . . . . . . . .61
Chapter 6 Parallel Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Chapter 7 Central Processor Unit (S08CPUV3) . . . . . . . . . . . . . . . . . . . . . . . 89
Chapter 8 Keyboard Interrupt (S08KBIV2) . . . . . . . . . . . . . . . . . . . . . . . . . .109
Chapter 9 Internal Clock Source (S08ICSV3) . . . . . . . . . . . . . . . . . . . . . . . . 117
Chapter 10 Interrupt Priority Controller (S08IPCV1) . . . . . . . . . . . . . . . . . . 131
Chapter 11 16-Bit Timer/PWM (S08TPMV3). . . . . . . . . . . . . . . . . . . . . . . . . . 143
Chapter 12 16-Bit Modulo Timer (S08MTIM16V1) . . . . . . . . . . . . . . . . . . . . . 167
Chapter 13 Real Time Counter (S08RTCV1) . . . . . . . . . . . . . . . . . . . . . . . . . 179
Chapter 14 Analog-to-Digital Converter (S08ADC12V1) . . . . . . . . . . . . . . .189
Chapter 15 Analog Comparator (S08ACMPV3). . . . . . . . . . . . . . . . . . . . . . .217
Chapter 16 Serial Communications Interface (S08SCIV4). . . . . . . . . . . . . . 225
Chapter 17 Serial Pheripherals Interface (S08SPIV4) . . . . . . . . . . . . . . . . .245
Chapter 18 Inter-Integrated Circuit (S08IICV2) . . . . . . . . . . . . . . . . . . . . . . .263
Chapter 19 Development Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 11
Contents
Section Number Title Page
Chapter 1
Device Overview
1.1 Introduction .....................................................................................................................................21
1.2 MCU Block Diagram ......................................................................................................................22
1.3 System Clock Distribution ..............................................................................................................23
Chapter 2
Pins and Connections
2.1 Introduction .....................................................................................................................................25
2.2 Device Pin Assignment ...................................................................................................................25
2.3 Recommended System Connections ...............................................................................................26
2.3.1 Power (V
DD
, V
SS
) .............................................................................................................27
2.3.2 Oscillator (XTAL, EXTAL) ..............................................................................................28
2.3.3 RESET and External Interrupt Pin (IRQ) .........................................................................28
2.3.4 Background/Mode Select (BKGD/MS) ............................................................................29
2.3.5 General-Purpose I/O and Peripheral Ports ........................................................................29
Chapter 3
Modes of Operation
3.1 Introduction .....................................................................................................................................33
3.2 Features ...........................................................................................................................................33
3.3 Run Mode ........................................................................................................................................33
3.4 Active Background Mode ...............................................................................................................33
3.5 Wait Mode .......................................................................................................................................34
3.6 Stop Modes ......................................................................................................................................35
3.6.1 Stop3 Mode .......................................................................................................................35
3.6.2 Stop2 Mode .......................................................................................................................36
3.6.3 On-Chip Peripheral Modules in Stop Modes ....................................................................36
Chapter 4
Memory
4.1 MC9S08SV16 Series Memory Map ...............................................................................................39
4.1.1 Reset and Interrupt Vector Assignments ...........................................................................41
4.2 Register Addresses and Bit Assignments ........................................................................................41
4.3 RAM (System RAM) ......................................................................................................................46
4.4 Flash ................................................................................................................................................47
4.4.1 Features .............................................................................................................................47
4.4.2 Program and Erase Times .................................................................................................47
4.4.3 Program and Erase Command Execution .........................................................................48
MC9S08SV16 MCU Series Reference Manual, Rev. 2
12 Freescale Semiconductor
4.4.4 Burst Program Execution ..................................................................................................50
4.4.5 Access Errors ....................................................................................................................52
4.4.6 Flash Block Protection ......................................................................................................52
4.4.7 Vector Redirection ............................................................................................................53
4.5 Security ............................................................................................................................................53
4.6 Flash Registers and Control Bits .....................................................................................................54
4.6.1 Flash Clock Divider Register (FCDIV) ............................................................................55
4.6.2 Flash Options Register (FOPT and NVOPT) ....................................................................56
4.6.3 Flash Configuration Register (FCNFG) ...........................................................................57
4.6.4 Flash Protection Register (FPROT and NVPROT) ..........................................................58
4.6.5 Flash Status Register (FSTAT) ..........................................................................................58
4.6.6 Flash Command Register (FCMD) ...................................................................................60
Chapter 5
Resets, Interrupts, and System Configuration
5.1 Introduction .....................................................................................................................................61
5.2 Features ...........................................................................................................................................61
5.3 MCU Reset ......................................................................................................................................61
5.4 Computer Operating Properly (COP) Watchdog .............................................................................62
5.5 Interrupts .........................................................................................................................................63
5.5.1 Interrupt Stack Frame .......................................................................................................63
5.5.2 External Interrupt Request (IRQ) Pin ...............................................................................64
5.5.3 Interrupt Vectors, Sources, and Local Masks ...................................................................65
5.6 Low-Voltage Detect (LVD) System ................................................................................................66
5.6.1 Power-On Reset Operation ...............................................................................................67
5.6.2 LVD Reset Operation ........................................................................................................67
5.6.3 Low-Voltage Warning (LVW) Interrupt Operation ...........................................................67
5.7 Reset, Interrupt, and System Control Registers and Control Bits ...................................................67
5.7.1 Interrupt Pin Request Status and Control Register (IRQSC) ............................................68
5.7.2 System Reset Status Register (SRS) .................................................................................69
5.7.3 System Background Debug Force Reset Register (SBDFR) ............................................70
5.7.4 System Options Register 1 (SOPT1) ................................................................................70
5.7.5 System Options Register 2 (SOPT2) ................................................................................72
5.7.6 System Device Identification Register (SDIDH, SDIDL) ................................................73
5.7.7 System Power Management Status and Control 1 Register (SPMSC1) ...........................74
5.7.8 System Power Management Status and Control 2 Register (SPMSC2) ...........................75
Chapter 6
Parallel Input/Output
6.1 Introduction .....................................................................................................................................77
6.2 Port Data and Data Direction ..........................................................................................................77
6.3 Pin Control ......................................................................................................................................78
6.3.1 Internal Pullup Enable ......................................................................................................79
6.3.2 Output Slew Rate Control Enable .....................................................................................79
6.3.3 Output Drive Strength Select ............................................................................................79
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 13
6.4 Pin Behavior in Stop Modes ............................................................................................................80
6.5 Parallel I/O and Pin Control Registers ............................................................................................80
6.5.1 Port A I/O Registers (PTAD and PTADD) ........................................................................80
6.5.2 Port A Pin Control Registers (PTAPE, PTASE, PTADS) .................................................81
6.5.3 Port B I/O Registers (PTBD and PTBDD) ........................................................................82
6.5.4 Port B Pin Control Registers (PTBPE, PTBSE, PTBDS) .................................................83
6.5.5 Port C I/O Registers (PTCD and PTCDD) ........................................................................84
6.5.6 Port C Pin Control Registers (PTCPE, PTCSE, PTCDS) .................................................85
6.5.7 Port D I/O Registers (PTDD and PTDDD) .......................................................................86
6.5.8 Port D Pin Control Registers (PTDPE, PTDSE, PTDDS) ................................................87
Chapter 7
Central Processor Unit (S08CPUV3)
7.1 Introduction .....................................................................................................................................89
7.1.1 Features .............................................................................................................................89
7.2 Programmers Model and CPU Registers .......................................................................................90
7.2.1 Accumulator (A) ...............................................................................................................90
7.2.2 Index Register (H:X) ........................................................................................................90
7.2.3 Stack Pointer (SP) .............................................................................................................91
7.2.4 Program Counter (PC) ......................................................................................................91
7.2.5 Condition Code Register (CCR) .......................................................................................91
7.3 Addressing Modes ...........................................................................................................................93
7.3.1 Inherent Addressing Mode (INH) .....................................................................................93
7.3.2 Relative Addressing Mode (REL) ....................................................................................93
7.3.3 Immediate Addressing Mode (IMM) ................................................................................93
7.3.4 Direct Addressing Mode (DIR) ........................................................................................93
7.3.5 Extended Addressing Mode (EXT) ..................................................................................94
7.3.6 Indexed Addressing Mode ................................................................................................94
7.4 Special Operations ...........................................................................................................................95
7.4.1 Reset Sequence .................................................................................................................95
7.4.2 Interrupt Sequence ............................................................................................................95
7.4.3 Wait Mode Operation ........................................................................................................96
7.4.4 Stop Mode Operation ........................................................................................................96
7.4.5 BGND Instruction .............................................................................................................97
7.5 HCS08 Instruction Set Summary ....................................................................................................98
Chapter 8
Keyboard Interrupt (S08KBIV2)
8.1 Introduction ...................................................................................................................................109
8.1.1 Features ...........................................................................................................................111
8.1.2 Modes of Operation ........................................................................................................111
8.1.3 Block Diagram ................................................................................................................111
8.2 External Signal Description ..........................................................................................................112
8.3 Register Definition ........................................................................................................................112
8.3.1 KBI Status and Control Register (KBISC) .....................................................................112
MC9S08SV16 MCU Series Reference Manual, Rev. 2
14 Freescale Semiconductor
8.3.2 KBI Pin Enable Register (KBIPE) ..................................................................................113
8.3.3 KBI Edge Select Register (KBIES) ................................................................................113
8.4 Functional Description ..................................................................................................................114
8.4.1 Edge Only Sensitivity .....................................................................................................114
8.4.2 Edge and Level Sensitivity .............................................................................................114
8.4.3 KBI Pullup/Pulldown Resistors ......................................................................................115
8.4.4 KBI Initialization ............................................................................................................115
Chapter 9
Internal Clock Source (S08ICSV3)
9.1 Introduction ...................................................................................................................................117
9.1.1 Features ...........................................................................................................................119
9.1.2 Block Diagram ................................................................................................................119
9.1.3 Modes of Operation ........................................................................................................120
9.2 External Signal Description ..........................................................................................................121
9.3 Register Definition ........................................................................................................................121
9.3.1 ICS Control Register 1 (ICSC1) .....................................................................................122
9.3.2 ICS Control Register 2 (ICSC2) .....................................................................................123
9.3.3 ICS Trim Register (ICSTRM) .........................................................................................124
9.3.4 ICS Status and Control (ICSSC) .....................................................................................124
9.4 Functional Description ..................................................................................................................126
9.4.1 Operational Modes ..........................................................................................................126
9.4.2 Mode Switching ..............................................................................................................128
9.4.3 Bus Frequency Divider ...................................................................................................129
9.4.4 Low Power Bit Usage .....................................................................................................129
9.4.5 DCO Maximum Frequency with 32.768 kHz Oscillator ................................................129
9.4.6 Internal Reference Clock ................................................................................................129
9.4.7 External Reference Clock ...............................................................................................130
9.4.8 Fixed Frequency Clock ...................................................................................................130
9.4.9 Local Clock .....................................................................................................................130
Chapter 10
Interrupt Priority Controller (S08IPCV1)
10.1 Introduction ...................................................................................................................................131
10.1.1 Features ...........................................................................................................................133
10.1.2 Modes of Operation .......................................................................................................133
10.1.3 Block Diagram ................................................................................................................133
10.2 External Signal Description ..........................................................................................................134
10.2.1 INTIN[47:0] — Interrupt Source Interrupt Request Input .............................................135
10.2.2 VFETCH — Vector Fetch Indicator from HCS08 CPU .................................................135
10.2.3 IADB[5:0] — Address Bus Input from HCS08 CPU .....................................................135
10.2.4 INTOUT[47:0] — Interrupt Request to HCS08 CPU ....................................................135
10.3 Register Definition ........................................................................................................................135
10.3.1 IPC Status and Control Register (IPCSC) ......................................................................135
10.3.2 Interrupt Priority Mask Pseudo Stack Register (IPMPS) ...............................................136
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 15
10.3.3 Interrupt Level Setting Registers (ILRS0–ILRS11) .......................................................137
10.4 Functional Description ..................................................................................................................138
10.4.1 Interrupt Priority Level Register ....................................................................................138
10.4.2 Interrupt Priority Level Comparator Set .........................................................................138
10.4.3 Interrupt Priority Mask Update and Restore Mechanism ...............................................138
10.4.4 The Integration and Application of the IPC ....................................................................139
10.5 Application Examples ...................................................................................................................140
10.6 Initialization/Application Information ..........................................................................................141
Chapter 11
16-Bit Timer/PWM (S08TPMV3)
11.1 Introduction ...................................................................................................................................143
11.1.1 TPMV3 Differences from Previous Versions .................................................................144
11.1.2 Migrating from TPMV1 ..................................................................................................147
11.1.3 Features ...........................................................................................................................148
11.1.4 Modes of Operation ........................................................................................................148
11.1.5 Block Diagram ................................................................................................................149
11.2 Signal Description .........................................................................................................................151
11.2.1 Detailed Signal Descriptions ..........................................................................................151
11.3 Register Definition ........................................................................................................................154
11.3.1 TPM Status and Control Register (TPMxSC) ................................................................154
11.3.2 TPM-Counter Registers (TPMxCNTH:TPMxCNTL) ....................................................155
11.3.3 TPM Counter Modulo Registers (TPMxMODH:TPMxMODL) ....................................156
11.3.4 TPM Channel n Status and Control Register (TPMxCnSC) ..........................................157
11.3.5 TPM Channel Value Registers (TPMxCnVH:TPMxCnVL) ..........................................158
11.4 Functional Description ..................................................................................................................160
11.4.1 Counter ............................................................................................................................160
11.4.2 Channel Mode Selection .................................................................................................161
11.5 Reset Overview .............................................................................................................................164
11.5.1 General ............................................................................................................................164
11.5.2 Description of Reset Operation .......................................................................................165
11.6 Interrupts .......................................................................................................................................165
11.6.1 General ............................................................................................................................165
11.6.2 Description of Interrupt Operation .................................................................................165
Chapter 12
16-Bit Modulo Timer (S08MTIM16V1)
12.1 Introduction ...................................................................................................................................167
12.2 Features .........................................................................................................................................169
12.2.1 Block Diagram ................................................................................................................169
12.2.2 Modes of Operation ........................................................................................................169
12.3 External Signal Description ..........................................................................................................170
12.3.1 TCLK — External Clock Source Input into MTIM16 ...................................................170
12.4 Register Definition ........................................................................................................................170
12.4.1 MTIM16 Status and Control Register (MTIMSC) .........................................................171
MC9S08SV16 MCU Series Reference Manual, Rev. 2
16 Freescale Semiconductor
12.4.2 MTIM16 Clock Configuration Register (MTIMCLK) ...................................................172
12.4.3 MTIM16 Counter Register High/Low (MTIMCNTH:L) ...............................................173
12.4.4 MTIM16 Modulo Register High/Low (MTIMMODH/MTIMMODL) ..........................174
12.5 Functional Description ..................................................................................................................175
12.5.1 MTIM16 Operation Example .........................................................................................176
Chapter 13
Real Time Counter (S08RTCV1)
13.1 Introduction ...................................................................................................................................179
13.1.1 Features ...........................................................................................................................181
13.1.2 Modes of Operation ........................................................................................................181
13.1.3 Block Diagram ................................................................................................................182
13.2 External Signal Description ..........................................................................................................182
13.3 Register Definition ........................................................................................................................182
13.3.1 RTC Status and Control Register (RTCSC) ....................................................................183
13.3.2 RTC Counter Register (RTCCNT) ..................................................................................184
13.3.3 RTC Modulo Register (RTCMOD) ................................................................................184
13.4 Functional Description ..................................................................................................................184
13.4.1 RTC Operation Example .................................................................................................185
13.5 Initialization/Application Information ..........................................................................................186
Chapter 14
Analog-to-Digital Converter (S08ADC12V1)
14.1 Introduction ...................................................................................................................................189
14.1.1 ADC Channel Assignments ............................................................................................189
14.1.2 Alternate Clock ...............................................................................................................190
14.1.3 Hardware Trigger ............................................................................................................190
14.1.4 Temperature Sensor ........................................................................................................190
14.1.5 Features ...........................................................................................................................192
14.1.6 ADC Module Block Diagram .........................................................................................192
14.2 External Signal Description ..........................................................................................................193
14.2.1 Analog Power (V
DDA
) ....................................................................................................194
14.2.2 Analog Ground (V
SSA
) ...................................................................................................194
14.2.3 Voltage Reference High (V
REFH
) ...................................................................................194
14.2.4 Voltage Reference Low (V
REFL
) ....................................................................................194
14.2.5 Analog Channel Inputs (ADx) ........................................................................................194
14.3 Register Definition ........................................................................................................................194
14.3.1 Status and Control Register 1 (ADCSC1) ......................................................................194
14.3.2 Status and Control Register 2 (ADCSC2) ......................................................................196
14.3.3 Data Result High Register (ADCRH) .............................................................................197
14.3.4 Data Result Low Register (ADCRL) ..............................................................................197
14.3.5 Compare Value High Register (ADCCVH) ....................................................................198
14.3.6 Compare Value Low Register (ADCCVL) .....................................................................198
14.3.7 Configuration Register (ADCCFG) ................................................................................198
14.3.8 Pin Control 1 Register (APCTL1) ..................................................................................200
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 17
14.3.9 Pin Control 2 Register (APCTL2) ..................................................................................201
14.3.10Pin Control 3 Register (APCTL3) ..................................................................................202
14.4 Functional Description ..................................................................................................................203
14.4.1 Clock Select and Divide Control ....................................................................................203
14.4.2 Input Select and Pin Control ...........................................................................................204
14.4.3 Hardware Trigger ............................................................................................................204
14.4.4 Conversion Control .........................................................................................................204
14.4.5 Automatic Compare Function .........................................................................................207
14.4.6 MCU Wait Mode Operation ............................................................................................208
14.4.7 MCU Stop3 Mode Operation ..........................................................................................208
14.4.8 MCU Stop2 Mode Operation ..........................................................................................209
14.5 Initialization Information ..............................................................................................................209
14.5.1 ADC Module Initialization Example .............................................................................209
14.6 Application Information ................................................................................................................211
14.6.1 External Pins and Routing ..............................................................................................211
14.6.2 Sources of Error ..............................................................................................................213
Chapter 15
Analog Comparator (S08ACMPV3)
15.1 Introduction ...................................................................................................................................217
15.1.1 Features ...........................................................................................................................219
15.1.2 Modes of Operation ........................................................................................................219
15.2 Block Diagram ..............................................................................................................................219
15.3 External Signal Description ..........................................................................................................221
15.4 Memory Map and Register Definition ..........................................................................................221
15.4.1 Memory Map (Register Summary) .................................................................................221
15.4.2 Register Descriptions ......................................................................................................221
15.5 Functional Description ..................................................................................................................223
Chapter 16
Serial Communications Interface (S08SCIV4)
16.1 Introduction ...................................................................................................................................225
16.1.1 Features ...........................................................................................................................227
16.1.2 Modes of Operation ........................................................................................................227
16.1.3 Block Diagram ................................................................................................................227
16.2 Register Definition ........................................................................................................................230
16.2.1 SCI Baud Rate Registers (SCIBDH, SCIBDL) ..............................................................230
16.2.2 SCI Control Register 1 (SCIC1) .....................................................................................231
16.2.3 SCI Control Register 2 (SCIC2) .....................................................................................232
16.2.4 SCI Status Register 1 (SCIS1) ........................................................................................233
16.2.5 SCI Status Register 2 (SCIS2) ........................................................................................235
16.2.6 SCI Control Register 3 (SCIC3) .....................................................................................236
16.2.7 SCI Data Register (SCID) ...............................................................................................237
16.3 Functional Description ..................................................................................................................237
16.3.1 Baud Rate Generation .....................................................................................................237
MC9S08SV16 MCU Series Reference Manual, Rev. 2
18 Freescale Semiconductor
16.3.2 Transmitter Functional Description ................................................................................238
16.3.3 Receiver Functional Description ....................................................................................239
16.3.4 Interrupts and Status Flags ..............................................................................................241
16.3.5 Additional SCI Functions ...............................................................................................242
Chapter 17
Serial Pheripherals Interface (S08SPIV4)
17.1 Introduction ...................................................................................................................................245
17.1.1 Features ...........................................................................................................................247
17.1.2 Block Diagrams ..............................................................................................................247
17.1.3 SPI Baud Rate Generation ..............................................................................................249
17.2 External Signal Description ..........................................................................................................250
17.2.1 SPSCK — SPI Serial Clock ............................................................................................250
17.2.2 MOSI — Master Data Out, Slave Data In ......................................................................250
17.2.3 MISO — Master Data In, Slave Data Out ......................................................................250
17.2.4 SS — Slave Select ..........................................................................................................250
17.3 Modes of Operation .......................................................................................................................251
17.3.1 SPI in Stop Modes ..........................................................................................................251
17.4 Register Definition ........................................................................................................................251
17.4.1 SPI Control Register 1 (SPIC1) ......................................................................................251
17.4.2 SPI Control Register 2 (SPIC2) ......................................................................................252
17.4.3 SPI Baud Rate Register (SPIBR) ....................................................................................253
17.4.4 SPI Status Register (SPIS) ..............................................................................................254
17.4.5 SPI Data Register (SPID) ...............................................................................................255
17.5 Functional Description ..................................................................................................................256
17.5.1 General ............................................................................................................................256
17.5.2 Master Mode ...................................................................................................................256
17.5.3 Slave Mode .....................................................................................................................257
17.5.4 SPI Clock Formats ..........................................................................................................258
17.5.5 Special Features ..............................................................................................................260
17.5.6 SPI Interrupts ..................................................................................................................262
17.5.7 Mode Fault Detection .....................................................................................................262
Chapter 18
Inter-Integrated Circuit (S08IICV2)
18.1 Introduction ...................................................................................................................................263
18.1.1 Features ...........................................................................................................................265
18.1.2 Modes of Operation ........................................................................................................265
18.1.3 Block Diagram ................................................................................................................265
18.2 External Signal Description ..........................................................................................................266
18.2.1 SCL — Serial Clock Line ...............................................................................................266
18.2.2 SDA — Serial Data Line ................................................................................................266
18.3 Register Definition ........................................................................................................................266
18.3.1 IIC Address Register (IICA) ...........................................................................................267
18.3.2 IIC Frequency Divider Register (IICF) ..........................................................................267
MC9S08SV16 MCU Series Reference Manual, Rev. 2
Freescale Semiconductor 19
18.3.3 IIC Control Register (IICC1) ..........................................................................................270
18.3.4 IIC Status Register (IICS) ...............................................................................................270
18.3.5 IIC Data I/O Register (IICD) ..........................................................................................271
18.3.6 IIC Control Register 2 (IICC2) .......................................................................................272
18.4 Functional Description ..................................................................................................................273
18.4.1 IIC Protocol .....................................................................................................................273
18.4.2 10-bit Address .................................................................................................................276
18.4.3 General Call Address ......................................................................................................277
18.5 Resets ............................................................................................................................................277
18.6 Interrupts .......................................................................................................................................277
18.6.1 Byte Transfer Interrupt ....................................................................................................277
18.6.2 Address Detect Interrupt .................................................................................................278
18.6.3 Arbitration Lost Interrupt ................................................................................................278
18.7 Initialization/Application Information ..........................................................................................279
Chapter 19
Development Support
19.1 Introduction ...................................................................................................................................281
19.1.1 Features ...........................................................................................................................282
19.2 Background Debug Controller (BDC) ..........................................................................................282
19.2.1 BKGD Pin Description ...................................................................................................283
19.2.2 Communication Details ..................................................................................................284
19.2.3 BDC Commands .............................................................................................................287
19.2.4 BDC Hardware Breakpoint .............................................................................................290
19.3 On-Chip Debug System (DBG) ....................................................................................................291
19.3.1 Comparators A and B .....................................................................................................291
19.3.2 Bus Capture Information and FIFO Operation ...............................................................291
19.3.3 Change-of-Flow Information ..........................................................................................292
19.3.4 Tag vs. Force Breakpoints and Triggers .........................................................................292
19.3.5 Trigger Modes .................................................................................................................293
19.3.6 Hardware Breakpoints ....................................................................................................295
19.4 Register Definition ........................................................................................................................295
19.4.1 BDC Registers and Control Bits .....................................................................................295
19.4.2 System Background Debug Force Reset Register (SBDFR) ..........................................297
19.4.3 DBG Registers and Control Bits .....................................................................................298
MC9S08SV16 MCU Series Reference Manual, Rev. 2
20 Freescale Semiconductor
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304

NXP S08SV Reference guide

Type
Reference guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI