Sign In
Upload
Manuals
Brands
Freescale Semiconductor Manuals
Microcontrollers
MK22FN256VLH12
Freescale Semiconductor MK22FN256VLH12 Manuals
Manuals and User Guides for Freescale Semiconductor MK22FN256VLH12. We have
1
Freescale Semiconductor MK22FN256VLH12 manual available for free PDF download: Reference Manual
Freescale Semiconductor MK22FN256VLH12 Reference Manual (1313 pages)
K22F series Sub-Family
Brand:
Freescale Semiconductor
| Category:
Microcontrollers
| Size: 13 MB
Table of Contents
Table of Contents
3
Chapter 1 About this Document
47
Overview
47
Purpose
47
Audience
47
Conventions
47
Numbering Systems
47
Typographic Notation
48
Special Terms
48
Chapter 2 Introduction
49
Overview
49
Module Functional Categories
49
ARM® Cortex®-M4 Core Modules
50
System Modules
51
Memories and Memory Interfaces
52
Clocks
52
Security and Integrity Modules
53
Analog Modules
53
Timer Modules
53
Communication Interfaces
54
Human-Machine Interfaces
55
Orderable Part Numbers
55
Chapter 3 Chip Configuration
57
Introduction
57
Core Modules
57
ARM Cortex-M4 Core Configuration
57
Nested Vectored Interrupt Controller (NVIC) Configuration
59
Asynchronous Wake-Up Interrupt Controller (AWIC) Configuration
65
FPU Configuration
66
JTAG Controller Configuration
66
System Modules
67
SIM Configuration
67
System Mode Controller (SMC) Configuration
68
PMC Configuration
69
Low-Leakage Wake-Up Unit (LLWU) Configuration
69
MCM Configuration
71
Crossbar-Light Switch Configuration
71
Peripheral Bridge Configuration
73
DMA Request Multiplexer Configuration
74
DMA Controller Configuration
77
External Watchdog Monitor (EWM) Configuration
78
Watchdog Configuration
80
Clock Modules
81
MCG Configuration
81
OSC Configuration
83
RTC OSC Configuration
83
Memories and Memory Interfaces
84
Flash Memory Configuration
84
Flash Memory Controller Configuration
87
SRAM Configuration
87
System Register File Configuration
89
VBAT Register File Configuration
90
Ezport Configuration
90
Security
91
CRC Configuration
92
RNG Configuration
92
Analog
93
16-Bit SAR ADC Configuration
93
CMP Configuration
101
12-Bit DAC Configuration
103
VREF Configuration
104
Timers
105
PDB Configuration
105
Flextimer Configuration
108
PIT Configuration
114
Low-Power Timer Configuration
115
RTC Configuration
117
Communication Interfaces
118
Universal Serial Bus (USB) FS Subsystem
118
SPI Configuration
123
I2C Configuration
127
UART Configuration
128
LPUART Configuration
130
I2S Configuration
131
Human-Machine Interfaces
134
GPIO Configuration
134
Chapter 4 Memory Map
137
Introduction
137
System Memory Map
137
Aliased Bit-Band Regions
138
Flash Access Control Introduction
140
Flash Memory Map
140
Alternate Non-Volatile IRC User Trim Description
141
SRAM Memory Map
141
K22F Sub-Family Reference Manual , Rev
141
Peripheral Bridge (AIPS-Lite) Memory Map
141
Read-After-Write Sequence and Required Serialization of Memory Operations
142
Peripheral Bridge 0 (AIPS-Lite 0) Memory Map
142
Private Peripheral Bus (PPB) Memory Map
146
Chapter 5 Clock Distribution
147
Introduction
147
Programming Model
147
High-Level Device Clocking Diagram
147
Clock Definitions
148
Device Clock Summary
149
Internal Clocking Requirements
152
Clock Divider Values after Reset
153
VLPR Mode Clocking
153
Clock Gating
154
Module Clocks
154
PMC 1-Khz LPO Clock
156
IRC 48Mhz Clock
156
WDOG Clocking
157
Debug Trace Clock
157
PORT Digital Filter Clocking
158
LPTMR Clocking
158
RTC_CLKOUT and CLKOUT32K Clocking
159
USB FS OTG Controller Clocking
160
UART Clocking
161
LPUART0 Clocking
161
I2S/SAI Clocking
162
Chapter 6 Reset and Boot
165
Introduction
165
Reset
166
Power-On Reset (POR)
166
System Reset Sources
166
MCU Resets
170
Reset Pin
171
Debug Resets
172
Boot
173
Boot Sources
173
Boot Options
173
FOPT Boot Options
174
Boot Sequence
175
Chapter 7 Power Management
177
Introduction
177
Clocking Modes
177
Partial Stop
177
DMA Wakeup
178
Compute Operation
179
Peripheral Doze
180
Clock Gating
181
Power Modes Description
181
Entering and Exiting Power Modes
183
Power Mode Transitions
184
Power Modes Shutdown Sequencing
185
Flash Program Restrictions
186
Module Operation in Low Power Modes
186
Chapter 8 Security
191
Introduction
191
Flash Security
191
Security Interactions with Other Modules
192
Security Interactions with Ezport
192
Security Interactions with Debug
192
Chapter 9 Debug
193
Introduction
193
References
195
The Debug Port
195
JTAG-To-SWD Change Sequence
196
JTAG-To-Cjtag Change Sequence
196
Debug Port Pin Descriptions
197
System TAP Connection
197
IR Codes
198
JTAG Status and Control Registers
198
MDM-AP Control Register
199
MDM-AP Status Register
201
Debug Resets
202
Ahb-Ap
203
Itm
203
Core Trace Connectivity
204
Tpiu
204
Dwt
204
Debug in Low Power Modes
205
Debug Module State in Low Power Modes
205
Debug & Security
206
Chapter 10 Signal Multiplexing and Signal Descriptions
207
Introduction
207
Signal Multiplexing Integration
207
Port Control and Interrupt Module Features
208
Clock Gating
209
Signal Multiplexing Constraints
209
Pinout
209
K22F Signal Multiplexing and Pin Assignments
209
K22F Pinouts
214
Module Signal Description Tables
218
Core Modules
219
System Modules
219
Clock Modules
220
Memories and Memory Interfaces
220
Analog
220
Timer Modules
222
Communication Interfaces
223
Human-Machine Interfaces (HMI)
226
Chapter 11 Port Control and Interrupts (PORT)
227
Introduction
227
Overview
227
Features
227
Modes of Operation
228
External Signal Description
229
Detailed Signal Description
229
Memory Map and Register Definition
229
Pin Control Register N (Portx_Pcrn)
236
Global Pin Control Low Register (Portx_Gpclr)
238
Global Pin Control High Register (Portx_Gpchr)
239
Interrupt Status Flag Register (Portx_Isfr)
240
Digital Filter Enable Register (Portx_Dfer)
240
Digital Filter Clock Register (Portx_Dfcr)
241
Digital Filter Width Register (Portx_Dfwr)
241
Functional Description
242
Pin Control
242
Global Pin Control
243
External Interrupts
243
Digital Filter
244
Chapter 12 System Integration Module (SIM)
247
Introduction
247
Features
247
Memory Map and Register Definition
248
System Options Register 1 (SIM_SOPT1)
249
SOPT1 Configuration Register (SIM_SOPT1CFG)
251
System Options Register 2 (SIM_SOPT2)
252
System Options Register 4 (SIM_SOPT4)
254
System Options Register 5 (SIM_SOPT5)
257
System Options Register 7 (SIM_SOPT7)
258
System Options Register 8 (SIM_SOPT8)
260
System Device Identification Register (SIM_SDID)
262
System Clock Gating Control Register 4 (SIM_SCGC4)
264
System Clock Gating Control Register 5 (SIM_SCGC5)
266
System Clock Gating Control Register 6 (SIM_SCGC6)
267
System Clock Gating Control Register 7 (SIM_SCGC7)
270
System Clock Divider Register 1 (SIM_CLKDIV1)
271
System Clock Divider Register 2 (SIM_CLKDIV2)
273
Flash Configuration Register 1 (SIM_FCFG1)
274
Flash Configuration Register 2 (SIM_FCFG2)
276
Unique Identification Register High (SIM_UIDH)
277
Unique Identification Register MID-High (SIM_UIDMH)
277
Unique Identification Register MID Low (SIM_UIDML)
278
Unique Identification Register Low (SIM_UIDL)
278
Functional Description
278
Chapter 13 Kinetis Flashloader
279
Chip-Specific Information
279
Introduction
279
Functional Description
281
Memory Maps
281
Kinetis Flashloader
281
Start-Up Process
282
Clock Configuration
283
Flashloader Protocol
284
Flashloader Packet Types
288
Flashloader Command API
295
Flashloader Exit State
314
Peripherals Supported
315
I2C Peripheral
315
SPI Peripheral
316
UART Peripheral
318
USB Peripheral
321
Get/Setproperty Command Properties
323
Property Definitions
324
Kinetis Flashloader Status Error Codes
326
Chapter 14 Reset Control Module (RCM)
329
Introduction
329
Reset Memory Map and Register Descriptions
329
System Reset Status Register 0 (RCM_SRS0)
330
System Reset Status Register 1 (RCM_SRS1)
331
Reset Pin Filter Control Register (RCM_RPFC)
333
Reset Pin Filter Width Register (RCM_RPFW)
334
Mode Register (RCM_MR)
335
Sticky System Reset Status Register 0 (RCM_SSRS0)
336
Sticky System Reset Status Register 1 (RCM_SSRS1)
337
Chapter 15 System Mode Controller (SMC)
339
Introduction
339
Modes of Operation
339
Memory Map and Register Descriptions
341
Power Mode Protection Register (SMC_PMPROT)
342
Power Mode Control Register (SMC_PMCTRL)
343
Stop Control Register (SMC_STOPCTRL)
345
Power Mode Status Register (SMC_PMSTAT)
346
Functional Description
347
Power Mode Transitions
347
Power Mode Entry/Exit Sequencing
350
Run Modes
352
Wait Modes
354
Stop Modes
355
Debug in Low Power Modes
358
Chapter 16 Power Management Controller (PMC)
361
Introduction
361
Features
361
Low-Voltage Detect (LVD) System
361
LVD Reset Operation
362
LVD Interrupt Operation
362
Low-Voltage Warning (LVW) Interrupt Operation
362
I/O Retention
363
Memory Map and Register Descriptions
363
Low Voltage Detect Status and Control 1 Register (PMC_LVDSC1)
364
Low Voltage Detect Status and Control 2 Register (PMC_LVDSC2)
365
Regulator Status and Control Register (PMC_REGSC)
366
Chapter 17 Low-Leakage Wakeup Unit (LLWU)
369
Introduction
369
Features
369
Modes of Operation
370
Block Diagram
371
LLWU Signal Descriptions
372
Memory Map/Register Definition
372
LLWU Pin Enable 1 Register (LLWU_PE1)
373
LLWU Pin Enable 2 Register (LLWU_PE2)
374
LLWU Pin Enable 3 Register (LLWU_PE3)
375
LLWU Pin Enable 4 Register (LLWU_PE4)
376
LLWU Module Enable Register (LLWU_ME)
377
LLWU Flag 1 Register (LLWU_F1)
379
LLWU Flag 2 Register (LLWU_F2)
381
LLWU Flag 3 Register (LLWU_F3)
382
LLWU Pin Filter 1 Register (LLWU_FILT1)
384
LLWU Pin Filter 2 Register (LLWU_FILT2)
385
Functional Description
386
LLS Mode
387
VLLS Modes
387
Initialization
387
Chapter 18 Miscellaneous Control Module (MCM)
389
Introduction
389
Features
389
Memory Map/Register Descriptions
389
Crossbar Switch (AXBS) Slave Configuration (MCM_PLASC)
390
Crossbar Switch (AXBS) Master Configuration (MCM_PLAMC)
390
Crossbar Switch (AXBS) Control Register (MCM_PLACR)
391
Interrupt Status and Control Register (MCM_ISCR)
392
Compute Operation Control Register (MCM_CPO)
395
Functional Description
396
Interrupts
396
Chapter 19 Crossbar Switch Lite (AXBS-Lite)
397
Introduction
397
Features
397
Memory Map / Register Definition
398
Functional Description
398
General Operation
398
Arbitration
399
Initialization/Application Information
400
Chapter 20 Peripheral Bridge (AIPS-Lite)
403
Introduction
403
Features
403
General Operation
403
Functional Description
404
Access Support
404
Chapter 21 Direct Memory Access Multiplexer (DMAMUX)
405
Introduction
405
Overview
405
Features
406
Modes of Operation
406
External Signal Description
407
Memory Map/Register Definition
407
Channel Configuration Register (Dmamux_Chcfgn)
408
Functional Description
409
DMA Channels with Periodic Triggering Capability
409
DMA Channels with no Triggering Capability
411
Always-Enabled DMA Sources
412
Initialization/Application Information
413
Reset
413
Enabling and Configuring Sources
413
Chapter 22 Enhanced Direct Memory Access (Edma)
417
Introduction
417
Edma System Block Diagram
417
Block Parts
418
Features
420
Modes of Operation
421
Memory Map/Register Definition
421
TCD Memory
421
TCD Initialization
422
TCD Structure
423
Reserved Memory and Bit Fields
424
Control Register (DMA_CR)
434
Error Status Register (DMA_ES)
437
Enable Request Register (DMA_ERQ)
439
Enable Error Interrupt Register (DMA_EEI)
441
Clear Enable Error Interrupt Register (DMA_CEEI)
443
Set Enable Error Interrupt Register (DMA_SEEI)
444
Clear Enable Request Register (DMA_CERQ)
445
Set Enable Request Register (DMA_SERQ)
446
Clear DONE Status Bit Register (DMA_CDNE)
447
Set START Bit Register (DMA_SSRT)
448
Clear Error Register (DMA_CERR)
449
Clear Interrupt Request Register (DMA_CINT)
450
Interrupt Request Register (DMA_INT)
451
Error Register (DMA_ERR)
453
Hardware Request Status Register (DMA_HRS)
456
Enable Asynchronous Request in Stop Register (DMA_EARS)
459
Channel N Priority Register (Dma_Dchprin)
461
TCD Source Address (Dma_Tcdn_Saddr)
462
TCD Signed Source Address Offset (Dma_Tcdn_Soff)
462
TCD Transfer Attributes (Dma_Tcdn_Attr)
463
TCD Minor Byte Count (Minor Loop Disabled) (Dma_Tcdn_Nbytes_Mlno)
464
TCD Signed Minor Loop Offset (Minor Loop Enabled and Offset Disabled)
465
TCD Signed Minor Loop Offset (Minor Loop Enabled and Offset Disabled) (Dma_Tcdn_Nbytes_Mloffno)
465
TCD Signed Minor Loop Offset (Minor Loop and Offset Enabled)
466
TCD Signed Minor Loop Offset (Minor Loop and Offset Enabled) (Dma_Tcdn_Nbytes_Mloffyes)
466
TCD Last Source Address Adjustment (Dma_Tcdn_Slast)
467
TCD Destination Address (Dma_Tcdn_Daddr)
468
TCD Signed Destination Address Offset (Dma_Tcdn_Doff)
468
TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled) (Dma_Tcdn_Citer_Elinkyes)
469
TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)
470
TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled) (Dma_Tcdn_Citer_Elinkno)
470
TCD Last Destination Address Adjustment/Scatter Gather Address (Dma_Tcdn_Dlastsga)
471
TCD Control and Status (Dma_Tcdn_Csr)
472
TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)
474
TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled) (Dma_Tcdn_Biter_Elinkyes)
474
TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)
475
TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled) (Dma_Tcdn_Biter_Elinkno)
475
Functional Description
476
Edma Basic Data Flow
476
Fault Reporting and Handling
479
Channel Preemption
481
Performance
481
Initialization/Application Information
486
Edma Initialization
486
Programming Errors
488
Arbitration Mode Considerations
488
Performing DMA Transfers
489
Monitoring Transfer Descriptor Status
493
Channel Linking
495
Dynamic Programming
496
Chapter 23 External Watchdog Monitor (EWM)
501
Introduction
501
Features
501
Modes of Operation
502
Block Diagram
503
EWM Signal Descriptions
504
Memory Map/Register Definition
504
Control Register (EWM_CTRL)
504
Service Register (EWM_SERV)
505
Compare Low Register (EWM_CMPL)
505
Compare High Register (EWM_CMPH)
506
Clock Prescaler Register (EWM_CLKPRESCALER)
507
Functional Description
507
The Ewm_Out Signal
507
The Ewm_In Signal
508
EWM Counter
509
EWM Compare Registers
509
EWM Refresh Mechanism
509
EWM Interrupt
510
Counter Clock Prescaler
510
Chapter 24 Watchdog Timer (WDOG)
511
Introduction
511
Features
511
Functional Overview
513
Unlocking and Updating the Watchdog
514
Watchdog Configuration Time (WCT)
515
Refreshing the Watchdog
516
Windowed Mode of Operation
516
Watchdog Disabled Mode of Operation
516
Debug Modes of Operation
517
Testing the Watchdog
517
Quick Test
518
Byte Test
518
Backup Reset Generator
519
Generated Resets and Interrupts
520
Memory Map and Register Definition
520
Watchdog Status and Control Register High (WDOG_STCTRLH)
521
Watchdog Status and Control Register Low (WDOG_STCTRLL)
523
Watchdog Time-Out Value Register High (WDOG_TOVALH)
523
Watchdog Time-Out Value Register Low (WDOG_TOVALL)
524
Watchdog Window Register High (WDOG_WINH)
524
Watchdog Window Register Low (WDOG_WINL)
525
Watchdog Refresh Register (WDOG_REFRESH)
525
Watchdog Unlock Register (WDOG_UNLOCK)
525
Watchdog Timer Output Register High (WDOG_TMROUTH)
526
Watchdog Timer Output Register Low (WDOG_TMROUTL)
526
Watchdog Reset Count Register (WDOG_RSTCNT)
527
Watchdog Prescaler Register (WDOG_PRESC)
527
Watchdog Operation with 8-Bit Access
527
General Guideline
527
Refresh and Unlock Operations with 8-Bit Access
528
Restrictions on Watchdog Operation
529
Chapter 25 Multipurpose Clock Generator (MCG)
531
Introduction
531
Features
531
Modes of Operation
535
External Signal Description
535
Memory Map/Register Definition
535
MCG Control 1 Register (MCG_C1)
536
MCG Control 2 Register (MCG_C2)
537
MCG Control 3 Register (MCG_C3)
538
MCG Control 4 Register (MCG_C4)
539
MCG Control 5 Register (MCG_C5)
540
MCG Control 6 Register (MCG_C6)
541
MCG Status Register (MCG_S)
543
MCG Status and Control Register (MCG_SC)
544
MCG Auto Trim Compare Value High Register (MCG_ATCVH)
546
MCG Auto Trim Compare Value Low Register (MCG_ATCVL)
546
MCG Control 7 Register (MCG_C7)
546
MCG Control 8 Register (MCG_C8)
547
Functional Description
548
MCG Mode State Diagram
548
Low-Power Bit Usage
553
MCG Internal Reference Clocks
553
External Reference Clock
554
MCG Fixed Frequency Clock
554
MCG PLL Clock
555
MCG Auto TRIM (ATM)
555
Initialization / Application Information
556
MCG Module Initialization Sequence
556
Using a 32.768 Khz Reference
559
MCG Mode Switching
559
Chapter 26 Oscillator (OSC)
569
Introduction
569
Features and Modes
569
Block Diagram
570
OSC Signal Descriptions
570
External Crystal / Resonator Connections
571
External Clock Connections
572
Memory Map/Register Definitions
573
OSC Memory Map/Register Definition
573
Functional Description
575
OSC Module States
575
OSC Module Modes
577
Counter
579
Reference Clock Pin Requirements
579
Reset
579
Low Power Modes Operation
580
Interrupts
580
Chapter 27 RTC Oscillator (OSC32K)
581
Introduction
581
Features and Modes
581
Block Diagram
581
RTC Signal Descriptions
582
EXTAL32 - Oscillator Input
582
XTAL32 - Oscillator Output
582
External Crystal Connections
583
Memory Map/Register Descriptions
583
Functional Description
583
Reset Overview
584
Interrupts
584
Chapter 28 Flash Memory Controller (FMC)
585
Introduction
585
Overview
585
Features
586
Modes of Operation
586
External Signal Description
586
Memory Map and Register Descriptions
586
Flash Access Protection Register (FMC_PFAPR)
591
Flash Bank 0 Control Register (FMC_PFB0CR)
595
Flash Bank 1 Control Register (FMC_PFB1CR)
598
Cache Tag Storage (Fmc_Tagvdw0Sn)
600
Cache Tag Storage (Fmc_Tagvdw1Sn)
601
Cache Tag Storage (Fmc_Tagvdw2Sn)
602
Cache Tag Storage (Fmc_Tagvdw3Sn)
603
Cache Data Storage (Upper Word) (Fmc_Dataw0Snu)
603
Cache Data Storage (Lower Word) (Fmc_Dataw0Snl)
604
Cache Data Storage (Upper Word) (Fmc_Dataw1Snu)
604
Cache Data Storage (Lower Word) (Fmc_Dataw1Snl)
605
Cache Data Storage (Upper Word) (Fmc_Dataw2Snu)
605
Cache Data Storage (Lower Word) (Fmc_Dataw2Snl)
606
Cache Data Storage (Upper Word) (Fmc_Dataw3Snu)
606
Cache Data Storage (Lower Word) (Fmc_Dataw3Snl)
607
Functional Description
607
Default Configuration
607
Configuration Options
608
Speculative Reads
609
Initialization and Application Information
609
Chapter 29 Flash Memory Module (FTFA)
611
Introduction
611
Features
612
Block Diagram
612
Glossary
613
External Signal Description
614
Memory Map and Registers
614
Flash Configuration Field Description
615
Program Flash IFR Map
615
Register Descriptions
616
Functional Description
630
Flash Protection
630
Flash Access Protection
631
Interrupts
632
Flash Operation in Low-Power Modes
633
Functional Modes of Operation
633
Flash Reads and Ignored Writes
633
Read While Write (RWW)
634
Flash Program and Erase
634
Flash Command Operations
634
Margin Read Commands
638
Flash Command Description
639
Security
653
Reset Sequence
655
Overview
657
Chapter 30
658
Block Diagram
658
Features
658
Modes of Operation
658
External Signal Descriptions
659
Ezport Clock (EZP_CK)
659
Ezport Chip Select (EZP_CS)
660
Ezport Serial Data in (EZP_D)
660
Ezport Serial Data out (EZP_Q)
660
Command Definition
660
Command Descriptions
661
Flash Memory Map for Ezport Access
668
Chapter 31 Cyclic Redundancy Check (CRC)
671
Introduction
671
Features
671
Block Diagram
671
Modes of Operation
672
Memory Map and Register Descriptions
672
CRC Data Register (CRC_DATA)
673
CRC Polynomial Register (CRC_GPOLY)
674
CRC Control Register (CRC_CTRL)
674
Functional Description
675
CRC Initialization/Reinitialization
675
CRC Calculations
676
Transpose Feature
677
CRC Result Complement
679
Chapter 32 Random Number Generator Accelerator (RNGA)
681
Introduction
681
Overview
681
Modes of Operation
682
Entering Normal Mode
682
Entering Sleep Mode
682
Memory Map and Register Definition
683
RNGA Control Register (RNG_CR)
683
RNGA Status Register (RNG_SR)
685
RNGA Entropy Register (RNG_ER)
687
RNGA Output Register (RNG_OR)
687
Functional Description
688
Output (OR) Register
688
Core Engine / Control Logic
688
Initialization/Application Information
689
Chapter 33 Analog-To-Digital Converter (ADC)
691
Introduction
691
Features
691
Block Diagram
692
ADC Signal Descriptions
693
Analog Power (VDDA)
694
Analog Ground (VSSA)
694
Voltage Reference Select
694
Analog Channel Inputs (Adx)
695
Differential Analog Channel Inputs (Dadx)
695
Memory Map and Register Definitions
695
ADC Status and Control Registers 1 (Adcx_Sc1N)
697
ADC Configuration Register 1 (Adcx_Cfg1)
700
ADC Configuration Register 2 (Adcx_Cfg2)
702
ADC Data Result Register (Adcx_Rn)
703
Compare Value Registers (Adcx_Cvn)
704
Status and Control Register 2 (Adcx_Sc2)
705
Status and Control Register 3 (Adcx_Sc3)
707
ADC Offset Correction Register (Adcx_Ofs)
709
ADC Plus-Side Gain Register (Adcx_Pg)
709
ADC Minus-Side Gain Register (Adcx_Mg)
710
ADC Plus-Side General Calibration Value Register (Adcx_Clpd)
710
ADC Plus-Side General Calibration Value Register (Adcx_Clps)
711
ADC Plus-Side General Calibration Value Register (Adcx_Clp4)
711
ADC Plus-Side General Calibration Value Register (Adcx_Clp3)
712
ADC Plus-Side General Calibration Value Register (Adcx_Clp2)
712
ADC Plus-Side General Calibration Value Register (Adcx_Clp1)
713
ADC Plus-Side General Calibration Value Register (Adcx_Clp0)
713
ADC Minus-Side General Calibration Value Register (Adcx_Clmd)
714
ADC Minus-Side General Calibration Value Register (Adcx_Clms)
714
ADC Minus-Side General Calibration Value Register (Adcx_Clm4)
715
ADC Minus-Side General Calibration Value Register (Adcx_Clm3)
715
ADC Minus-Side General Calibration Value Register (Adcx_Clm2)
716
ADC Minus-Side General Calibration Value Register (Adcx_Clm1)
716
ADC Minus-Side General Calibration Value Register (Adcx_Clm0)
717
Functional Description
717
Clock Select and Divide Control
718
Voltage Reference Selection
719
Hardware Trigger and Channel Selects
719
Conversion Control
720
Automatic Compare Function
728
Calibration Function
729
User-Defined Offset Function
731
Temperature Sensor
732
MCU Wait Mode Operation
733
MCU Normal Stop Mode Operation
733
MCU Low-Power Stop Mode Operation
734
Initialization Information
735
ADC Module Initialization Example
735
Application Information
737
External Pins and Routing
737
Sources of Error
739
Chapter 34 Comparator (CMP)
745
Introduction
745
CMP Features
745
6-Bit DAC Key Features
746
ANMUX Key Features
746
CMP, DAC and ANMUX Diagram
747
CMP Block Diagram
748
Memory Map/Register Definitions
750
CMP Control Register 0 (Cmpx_Cr0)
750
CMP Control Register 1 (Cmpx_Cr1)
751
CMP Filter Period Register (Cmpx_Fpr)
753
CMP Status and Control Register (Cmpx_Scr)
753
DAC Control Register (Cmpx_Daccr)
754
MUX Control Register (Cmpx_Muxcr)
755
Functional Description
756
CMP Functional Modes
756
Power Modes
765
Startup and Operation
766
Low-Pass Filter
767
CMP Interrupts
769
DMA Support
769
CMP Asynchronous DMA Support
770
Digital-To-Analog Converter
771
DAC Functional Description
771
Voltage Reference Source Select
771
DAC Resets
772
DAC Clocks
772
DAC Interrupts
772
Chapter 35 12-Bit Digital-To-Analog Converter (DAC)
773
Introduction
773
Features
773
Block Diagram
773
Memory Map/Register Definition
774
DAC Data Low Register (Dacx_Datnl)
776
DAC Data High Register (Dacx_Datnh)
776
DAC Status Register (Dacx_Sr)
777
DAC Control Register (Dacx_C0)
778
DAC Control Register 1 (Dacx_C1)
779
DAC Control Register 2 (Dacx_C2)
780
Functional Description
780
DAC Data Buffer Operation
780
DMA Operation
782
Resets
782
Low-Power Mode Operation
782
Chapter 36 Voltage Reference (VREFV1)
785
Introduction
785
Overview
786
Features
786
Modes of Operation
787
VREF Signal Descriptions
787
Memory Map and Register Definition
788
VREF Trim Register (VREF_TRM)
788
VREF Status and Control Register (VREF_SC)
789
Functional Description
790
Voltage Reference Disabled, SC[VREFEN] = 0
791
Voltage Reference Enabled, SC[VREFEN] = 1
791
Internal Voltage Regulator
792
Initialization/Application Information
793
Introduction
795
Features
795
Implementation
796
Chapter 37 Programmable Delay Block (PDB)
797
Back-To-Back Acknowledgment Connections
797
DAC External Trigger Input Connections
797
Block Diagram
797
Modes of Operation
799
PDB Signal Descriptions
799
Memory Map and Register Definition
799
Status and Control Register (Pdbx_Sc)
801
Modulus Register (Pdbx_Mod)
803
Counter Register (Pdbx_Cnt)
804
Interrupt Delay Register (Pdbx_Idly)
804
Channel N Control Register 1 (Pdbx_Chnc1)
805
Channel N Status Register (Pdbx_Chns)
806
Channel N Delay 0 Register (Pdbx_Chndly0)
806
Channel N Delay 1 Register (Pdbx_Chndly1)
807
DAC Interval Trigger N Control Register (Pdbx_Dacintcn)
807
DAC Interval N Register (Pdbx_Dacintn)
808
Pulse-Out N Enable Register (Pdbx_Poen)
808
Pulse-Out N Delay Register (Pdbx_Pondly)
809
Functional Description
809
PDB Pre-Trigger and Trigger Outputs
809
PDB Trigger Input Source Selection
811
Pulse-Out's
811
Updating the Delay Registers
812
Interrupts
813
Dma
813
Application Information
814
Impact of Using the Prescaler and Multiplication Factor on Timing Resolution
814
Introduction
815
Flextimer Philosophy
815
Features
816
Chapter 38 Flextimer Module (FTM)
817
Modes of Operation
817
Block Diagram
818
FTM Signal Descriptions
820
Memory Map and Register Definition
820
Memory Map
820
Register Descriptions
821
Status and Control (Ftmx_Sc)
826
Counter (Ftmx_Cnt)
827
Modulo (Ftmx_Mod)
828
Channel (N) Status and Control (Ftmx_Cnsc)
829
Channel (N) Value (Ftmx_Cnv)
832
Counter Initial Value (Ftmx_Cntin)
832
Capture and Compare Status (Ftmx_Status)
833
Features Mode Selection (Ftmx_Mode)
835
Synchronization (Ftmx_Sync)
837
Initial State for Channels Output (Ftmx_Outinit)
839
Output Mask (Ftmx_Outmask)
840
Function for Linked Channels (Ftmx_Combine)
842
Deadtime Insertion Control (Ftmx_Deadtime)
847
FTM External Trigger (Ftmx_Exttrig)
848
Channels Polarity (Ftmx_Pol)
850
Fault Mode Status (Ftmx_Fms)
852
Input Capture Filter Control (Ftmx_Filter)
854
Fault Control (Ftmx_Fltctrl)
855
Quadrature Decoder Control and Status (Ftmx_Qdctrl)
858
Configuration (Ftmx_Conf)
860
FTM Fault Input Polarity (Ftmx_Fltpol)
861
Synchronization Configuration (Ftmx_Synconf)
862
FTM Inverting Control (Ftmx_Invctrl)
864
FTM Software Output Control (Ftmx_Swoctrl)
865
FTM PWM Load (Ftmx_Pwmload)
868
Functional Description
869
Clock Source
870
Prescaler
871
Counter
871
Input Capture Mode
877
Output Compare Mode
880
Edge-Aligned PWM (EPWM) Mode
881
Center-Aligned PWM (CPWM) Mode
883
Combine Mode
885
Complementary Mode
892
Registers Updated from Write Buffers
893
PWM Synchronization
895
Inverting
911
Software Output Control
912
Deadtime Insertion
914
Output Mask
917
Fault Control
918
Polarity Control
921
Initialization
922
Features Priority
922
Channel Trigger Output
923
Initialization Trigger
924
Capture Test Mode
926
Dma
927
Dual Edge Capture Mode
928
Quadrature Decoder Mode
935
BDM Mode
940
Intermediate Load
941
Global Time Base (GTB)
943
Reset Overview
945
FTM Interrupts
946
Timer Overflow Interrupt
947
Channel (N) Interrupt
947
Fault Interrupt
947
Initialization Procedure
947
Chapter 39 Periodic Interrupt Timer (PIT)
949
Introduction
949
Block Diagram
949
Features
950
Signal Description
950
Memory Map/Register Description
951
PIT Module Control Register (PIT_MCR)
951
Timer Load Value Register (Pit_Ldvaln)
953
Current Timer Value Register (Pit_Cvaln)
953
Timer Control Register (Pit_Tctrln)
954
Timer Flag Register (Pit_Tflgn)
954
Functional Description
955
General Operation
955
Interrupts
957
Chained Timers
957
Initialization and Application Information
957
Example Configuration for Chained Timers
958
Chapter 40 Low-Power Timer (LPTMR)
961
Introduction
961
Features
961
Modes of Operation
961
LPTMR Signal Descriptions
962
Detailed Signal Descriptions
962
Memory Map and Register Definition
962
Low Power Timer Control Status Register (Lptmrx_Csr)
963
Low Power Timer Prescale Register (Lptmrx_Psr)
964
Low Power Timer Compare Register (Lptmrx_Cmr)
966
Low Power Timer Counter Register (Lptmrx_Cnr)
966
Functional Description
967
LPTMR Power and Reset
967
LPTMR Clocking
967
LPTMR Prescaler/Glitch Filter
967
LPTMR Compare
969
LPTMR Counter
969
LPTMR Hardware Trigger
970
LPTMR Interrupt
970
Chapter 41 Real Time Clock (RTC)
971
Introduction
971
Features
971
Modes of Operation
971
RTC Signal Descriptions
972
Register Definition
973
RTC Time Seconds Register (RTC_TSR)
973
RTC Time Prescaler Register (RTC_TPR)
974
RTC Time Alarm Register (RTC_TAR)
974
RTC Time Compensation Register (RTC_TCR)
975
RTC Control Register (RTC_CR)
976
RTC Status Register (RTC_SR)
978
RTC Lock Register (RTC_LR)
979
RTC Interrupt Enable Register (RTC_IER)
980
RTC Write Access Register (RTC_WAR)
981
RTC Read Access Register (RTC_RAR)
982
Functional Description
984
Power, Clocking, and Reset
984
Time Counter
985
Compensation
986
Time Alarm
986
Update Mode
987
Register Lock
987
Access Control
987
Interrupt
987
Chapter 42 Universal Serial Bus Full Speed OTG Controller (USBFSOTG)
989
Introduction
989
Usb
989
USB On-The-Go
990
USBFS Features
991
Functional Description
991
Data Structures
991
Programmers Interface
992
Buffer Descriptor Table
992
RX Vs. TX as a USB Target Device or USB Host
993
Addressing BDT Entries
994
Buffer Descriptors (Bds)
994
USB Transaction
997
Memory Map/Register Definitions
999
Peripheral ID Register (Usbx_Perid)
1001
Peripheral ID Complement Register (Usbx_Idcomp)
1002
Peripheral Revision Register (Usbx_Rev)
1002
Peripheral Additional Info Register (Usbx_Addinfo)
1003
OTG Interrupt Status Register (Usbx_Otgistat)
1003
OTG Interrupt Control Register (Usbx_Otgicr)
1004
OTG Status Register (Usbx_Otgstat)
1005
OTG Control Register (Usbx_Otgctl)
1006
Interrupt Status Register (Usbx_Istat)
1007
Interrupt Enable Register (Usbx_Inten)
1008
Error Interrupt Status Register (Usbx_Errstat)
1009
Error Interrupt Enable Register (Usbx_Erren)
1010
Status Register (Usbx_Stat)
1012
Control Register (Usbx_Ctl)
1013
Address Register (Usbx_Addr)
1014
BDT Page Register 1 (Usbx_Bdtpage1)
1015
Frame Number Register Low (Usbx_Frmnuml)
1015
Frame Number Register High (Usbx_Frmnumh)
1016
Token Register (Usbx_Token)
1016
SOF Threshold Register (Usbx_Softhld)
1017
BDT Page Register 2 (Usbx_Bdtpage2)
1018
BDT Page Register 3 (Usbx_Bdtpage3)
1018
Endpoint Control Register (Usbx_Endptn)
1019
USB Control Register (Usbx_Usbctrl)
1020
USB OTG Observe Register (Usbx_Observe)
1021
USB OTG Control Register (Usbx_Control)
1021
USB Transceiver Control Register 0 (Usbx_Usbtrc0)
1022
Frame Adjust Register (Usbx_Usbfrmadjust)
1023
USB Clock Recovery Control (Usbx_Clk_Recover_Ctrl)
1024
IRC48M Oscillator Enable Register (Usbx_Clk_Recover_Irc_En)
1025
Clock Recovery Combined Interrupt Enable (Usbx_Clk_Recover_Int_En)
1026
Clock Recovery Separated Interrupt Status (Usbx_Clk_Recover_Int_Status)
1026
OTG and Host Mode Operation
1027
Host Mode Operation Examples
1028
On-The-Go Operation
1031
OTG Dual Role a Device Operation
1031
OTG Dual Role B Device Operation
1033
Device Mode IRC48 Operation
1034
Chapter 43 Serial Peripheral Interface (SPI)
1041
Introduction
1041
Block Diagram
1041
Features
1042
Interface Configurations
1044
Modes of Operation
1044
Module Signal Descriptions
1046
PCS0/SS-Peripheral Chip Select/Slave Select
1046
PCS1-PCS3-Peripheral Chip Selects 1-3
1047
PCS4-Peripheral Chip Select 4
1047
PCS5/PCSS-Peripheral Chip Select 5/Peripheral Chip Select Strobe
1047
SCK-Serial Clock
1047
SIN-Serial Input
1047
SOUT-Serial Output
1048
Memory Map/Register Definition
1048
Module Configuration Register (Spix_Mcr)
1050
Transfer Count Register (Spix_Tcr)
1053
Clock and Transfer Attributes Register (in Master Mode) (Spix_Ctarn)
1053
Clock and Transfer Attributes Register (in Slave Mode) (Spix_Ctarn_Slave)
1058
Status Register (Spix_Sr)
1060
Dma/Interrupt Request Select and Enable Register (Spix_Rser)
1063
PUSH TX FIFO Register in Master Mode (Spix_Pushr)
1065
PUSH TX FIFO Register in Slave Mode (Spix_Pushr_Slave)
1066
POP RX FIFO Register (Spix_Popr)
1067
Transmit FIFO Registers (Spix_Txfrn)
1068
Receive FIFO Registers (Spix_Rxfrn)
1068
Functional Description
1069
Start and Stop of Module Transfers
1070
Serial Peripheral Interface (SPI) Configuration
1070
Module Baud Rate and Clock Delay Generation
1074
Transfer Formats
1078
Continuous Serial Communications Clock
1083
Slave Mode Operation Constraints
1084
Interrupts/Dma Requests
1085
Power Saving Features
1087
Initialization/Application Information
1088
How to Manage Queues
1088
Switching Master and Slave Mode
1089
Initializing Module in Master/Slave Modes
1090
Baud Rate Settings
1090
Delay Settings
1091
Calculation of FIFO Pointer Addresses
1091
Chapter 45 Inter-Integrated Circuit (I2C)
1095
Introduction
1095
Features
1095
Modes of Operation
1096
Block Diagram
1096
I2C Signal Descriptions
1097
Memory Map/Register Definition
1098
I2C Address Register 1 (I2Cx_A1)
1099
I2C Frequency Divider Register (I2Cx_F)
1099
I2C Control Register 1 (I2Cx_C1)
1100
I2C Status Register (I2Cx_S)
1102
I2C Data I/O Register (I2Cx_D)
1104
I2C Control Register 2 (I2Cx_C2)
1104
I2C Programmable Input Glitch Filter Register (I2Cx_Flt)
1105
I2C Range Address Register (I2Cx_Ra)
1107
I2C Smbus Control and Status Register (I2Cx_Smb)
1107
I2C Address Register 2 (I2Cx_A2)
1109
I2C SCL Low Timeout Register High (I2Cx_Slth)
1109
I2C SCL Low Timeout Register Low (I2Cx_Sltl)
1110
Functional Description
1110
I2C Protocol
1110
10-Bit Address
1115
Address Matching
1117
System Management Bus Specification
1118
Resets
1120
Interrupts
1120
Programmable Input Glitch Filter
1123
Address Matching Wake-Up
1123
DMA Support
1124
Initialization/Application Information
1125
Modes of Operation
1131
UART Signal Descriptions
1132
Detailed Signal Descriptions
1132
Memory Map and Registers
1133
UART Baud Rate Registers: High (Uartx_Bdh)
1138
UART Baud Rate Registers: Low (Uartx_Bdl)
1139
UART Control Register 1 (Uartx_C1)
1140
UART Control Register 2 (Uartx_C2)
1141
UART Status Register 1 (Uartx_S1)
1143
UART Status Register 2 (Uartx_S2)
1146
UART Control Register 3 (Uartx_C3)
1148
UART Data Register (Uartx_D)
1149
UART Match Address Registers 1 (Uartx_Ma1)
1150
UART Match Address Registers 2 (Uartx_Ma2)
1151
UART Control Register 4 (Uartx_C4)
1151
UART Control Register 5 (Uartx_C5)
1152
UART Extended Data Register (Uartx_Ed)
1153
UART Modem Register (Uartx_Modem)
1154
UART Infrared Register (Uartx_Ir)
1155
UART FIFO Parameters (Uartx_Pfifo)
1156
UART FIFO Control Register (Uartx_Cfifo)
1157
UART FIFO Status Register (Uartx_Sfifo)
1158
UART FIFO Transmit Watermark (Uartx_Twfifo)
1159
UART FIFO Transmit Count (Uartx_Tcfifo)
1160
UART FIFO Receive Watermark (Uartx_Rwfifo)
1160
UART FIFO Receive Count (Uartx_Rcfifo)
1161
UART 7816 Control Register (Uartx_C7816)
1161
UART 7816 Interrupt Enable Register (Uartx_Ie7816)
1163
UART 7816 Interrupt Status Register (Uartx_Is7816)
1164
UART 7816 Wait Parameter Register (Uartx_Wp7816)
1166
UART 7816 Wait N Register (Uartx_Wn7816)
1166
UART 7816 Wait FD Register (Uartx_Wf7816)
1167
UART 7816 Error Threshold Register (Uartx_Et7816)
1167
UART 7816 Transmit Length Register (Uartx_Tl7816)
1168
UART 7816 ATR Duration Timer Register a (Uartx_Ap7816A_T0)
1168
UART 7816 ATR Duration Timer Register B (Uartx_Ap7816B_T0)
1169
UART 7816 Wait Parameter Register a (Uartx_Wp7816A_T0)
1170
UART 7816 Wait Parameter Register a (Uartx_Wp7816A_T1)
1170
UART 7816 Wait Parameter Register B (Uartx_Wp7816B_T0)
1171
UART 7816 Wait Parameter Register B (Uartx_Wp7816B_T1)
1171
UART 7816 Wait and Guard Parameter Register (Uartx_Wgp7816_T1)
1172
UART 7816 Wait Parameter Register C (Uartx_Wp7816C_T1)
1172
Functional Description
1173
Transmitter
1173
Receiver
1179
Baud Rate Generation
1193
Data Format (Non ISO-7816)
1195
Single-Wire Operation
1198
Loop Operation
1199
ISO-7816/Smartcard Support
1199
Infrared Interface
1205
Reset
1206
System Level Interrupt Sources
1206
RXEDGIF Description
1206
DMA Operation
1207
Application Information
1208
Initialization Sequence
1208
Initialization Sequence (Non ISO-7816)
1210
Overrun (OR) Flag Implications
1211
Overrun NACK Considerations
1212
Match Address Registers
1213
Modem Feature
1213
Irda Minimum Pulse Width
1214
Clearing 7816 Wait Timer (WT, BWT, CWT) Interrupts
1214
Legacy and Reverse Compatibility Considerations
1215
Chapter 47 Low Power Universal Asynchronous Receiver/Transmitter (LPUART)
1217
Introduction
1217
Features
1217
Modes of Operation
1218
Signal Descriptions
1218
Block Diagram
1219
Register Definition
1220
LPUART Baud Rate Register (Lpuartx_Baud)
1221
LPUART Status Register (Lpuartx_Stat)
1223
LPUART Control Register (Lpuartx_Ctrl)
1227
LPUART Data Register (Lpuartx_Data)
1232
LPUART Match Address Register (Lpuartx_Match)
1234
LPUART Modem Irda Register (Lpuartx_Modir)
1234
Functional Description
1236
Baud Rate Generation
1236
Transmitter Functional Description
1237
Receiver Functional Description
1240
Additional LPUART Functions
1246
Infrared Interface
1248
Interrupts and Status Flags
1249
Chapter 48 Integrated Interchip Sound (I2S) / Synchronous Audio Interface (SAI)
1251
Introduction
1251
Features
1251
Block Diagram
1252
Modes of Operation
1252
External Signals
1253
Memory Map and Register Definition
1254
SAI Transmit Control Register (I2Sx_Tcsr)
1256
SAI Transmit Configuration 1 Register (I2Sx_Tcr1)
1259
SAI Transmit Configuration 2 Register (I2Sx_Tcr2)
1259
SAI Transmit Configuration 3 Register (I2Sx_Tcr3)
1261
SAI Transmit Configuration 4 Register (I2Sx_Tcr4)
1262
SAI Transmit Configuration 5 Register (I2Sx_Tcr5)
1264
SAI Transmit Data Register (I2Sx_Tdrn)
1264
SAI Transmit FIFO Register (I2Sx_Tfrn)
1265
SAI Transmit Mask Register (I2Sx_Tmr)
1265
SAI Receive Control Register (I2Sx_Rcsr)
1267
SAI Receive Configuration 1 Register (I2Sx_Rcr1)
1270
SAI Receive Configuration 2 Register (I2Sx_Rcr2)
1270
SAI Receive Configuration 3 Register (I2Sx_Rcr3)
1272
SAI Receive Configuration 4 Register (I2Sx_Rcr4)
1273
SAI Receive Configuration 5 Register (I2Sx_Rcr5)
1275
SAI Receive Data Register (I2Sx_Rdrn)
1275
SAI Receive FIFO Register (I2Sx_Rfrn)
1276
SAI Receive Mask Register (I2Sx_Rmr)
1276
SAI MCLK Control Register (I2Sx_Mcr)
1277
SAI MCLK Divide Register (I2Sx_Mdr)
1278
Functional Description
1279
SAI Clocking
1279
SAI Resets
1281
Synchronous Modes
1282
Frame Sync Configuration
1282
Data FIFO
1283
Word Mask Register
1286
Interrupts and DMA Requests
1286
Introduction
1289
Features
1289
Modes of Operation
1289
Chapter 49 General-Purpose Input/Output (GPIO)
1290
GPIO Signal Descriptions
1290
Memory Map and Register Definition
1291
Port Data Output Register (Gpiox_Pdor)
1293
Port Set Output Register (Gpiox_Psor)
1294
Port Clear Output Register (Gpiox_Pcor)
1294
Port Toggle Output Register (Gpiox_Ptor)
1295
Port Data Input Register (Gpiox_Pdir)
1295
Port Data Direction Register (Gpiox_Pddr)
1296
Functional Description
1296
General-Purpose Input
1296
General-Purpose Output
1296
Chapter 50 JTAG Controller (JTAGC)
1299
Introduction
1299
Block Diagram
1299
Features
1300
Modes of Operation
1300
External Signal Description
1302
TCK-Test Clock Input
1302
TDI-Test Data Input
1302
TDO-Test Data Output
1302
TMS-Test Mode Select
1302
Register Description
1303
Instruction Register
1303
Bypass Register
1303
Device Identification Register
1303
Boundary Scan Register
1304
Functional Description
1305
JTAGC Reset Configuration
1305
IEEE 1149.1-2001 (JTAG) Test Access Port
1305
TAP Controller State Machine
1305
JTAGC Block Instructions
1307
Boundary Scan
1310
Initialization/Application Information
1310
Advertisement
Advertisement
Related Products
Freescale Semiconductor MK22FN256VDC12
Freescale Semiconductor MK22FN256VLL12
Freescale Semiconductor MK22FN256VMP12
Freescale Semiconductor MKE02Z64VLC2
Freescale Semiconductor MKE02Z64VLC2R
Freescale Semiconductor MKE02Z16VLC2R
Freescale Semiconductor MKE02Z32VQH2R
Freescale Semiconductor MKE02Z64VQH2R
Freescale Semiconductor MKE02Z64VQH2
Freescale Semiconductor MKE02Z32VLH2
Freescale Semiconductor Categories
Motherboard
Computer Hardware
Microcontrollers
Control Unit
Controller
More Freescale Semiconductor Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL