Upload
others
View
32
Download
0
Embed Size (px)
Citation preview
KV10 Sub-Family Reference ManualSupports: MKV10Z32VLC7, MKV10Z32VFM7, MKV10Z32VLF7,
MKV10Z16VLC7, MKV10Z16VFM7, MKV10Z16VLF7
Document Number: KV10P48M75RMRev. 4, February 2014
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
2 Freescale Semiconductor, Inc.
Contents
Section number Title Page
Chapter 1About This Document
1.1 Overview.......................................................................................................................................................................37
1.1.1 Purpose.........................................................................................................................................................37
1.1.2 Audience......................................................................................................................................................37
1.2 Conventions..................................................................................................................................................................37
1.2.1 Numbering systems......................................................................................................................................37
1.2.2 Typographic notation...................................................................................................................................38
1.2.3 Special terms................................................................................................................................................38
Chapter 2Introduction
2.1 Overview.......................................................................................................................................................................39
2.2 Module Functional Categories......................................................................................................................................39
2.2.1 ARM Cortex-M0+ Core Modules................................................................................................................40
2.2.2 System Modules...........................................................................................................................................41
2.2.3 Memories and Memory Interfaces...............................................................................................................42
2.2.4 Clocks...........................................................................................................................................................42
2.2.5 Security and Integrity modules....................................................................................................................42
2.2.6 Analog modules...........................................................................................................................................42
2.2.7 Timer modules.............................................................................................................................................43
2.2.8 Communication interfaces...........................................................................................................................44
2.2.9 Human-machine interfaces..........................................................................................................................44
2.3 Orderable part numbers.................................................................................................................................................44
Chapter 3Chip Configuration
3.1 Introduction...................................................................................................................................................................47
3.2 Module to Module Interconnects..................................................................................................................................47
3.2.1 Module to Module interconnections............................................................................................................47
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 3
Section number Title Page
3.3 Core Modules................................................................................................................................................................52
3.3.1 ARM Cortex-M0+ Core Configuration.......................................................................................................52
3.3.2 Nested Vectored Interrupt Controller (NVIC) Configuration......................................................................55
3.3.3 Asynchronous wake-up interrupt controller (AWIC) configuration............................................................59
3.4 System Modules............................................................................................................................................................60
3.4.1 SIM Configuration.......................................................................................................................................60
3.4.2 System Mode Controller (SMC) Configuration...........................................................................................61
3.4.3 PMC Configuration......................................................................................................................................62
3.4.4 Low-Leakage Wake-up Unit (LLWU) Configuration.................................................................................62
3.4.5 MMDVSQ Configuration............................................................................................................................64
3.4.6 MCM Configuration....................................................................................................................................65
3.4.7 Crossbar-Light Switch Configuration..........................................................................................................65
3.4.8 Peripheral Bridge Configuration..................................................................................................................67
3.4.9 DMA request multiplexer configuration......................................................................................................68
3.4.10 DMA Controller Configuration...................................................................................................................71
3.4.11 External Watchdog Monitor (EWM) Configuration....................................................................................71
3.4.12 Watchdog Configuration..............................................................................................................................73
3.5 Clock Modules..............................................................................................................................................................74
3.5.1 MCG Configuration.....................................................................................................................................74
3.5.2 OSC Configuration......................................................................................................................................75
3.6 Memories and Memory Interfaces................................................................................................................................76
3.6.1 Flash Memory Configuration.......................................................................................................................76
3.6.2 Flash Memory Controller Configuration.....................................................................................................78
3.6.3 SRAM Configuration...................................................................................................................................79
3.7 Security.........................................................................................................................................................................81
3.7.1 CRC Configuration......................................................................................................................................81
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
4 Freescale Semiconductor, Inc.
Section number Title Page
3.8 Analog...........................................................................................................................................................................82
3.8.1 16-bit SAR ADC Configuration..................................................................................................................82
3.8.2 CMP Configuration......................................................................................................................................86
3.8.3 12-bit DAC Configuration...........................................................................................................................89
3.9 Timers...........................................................................................................................................................................90
3.9.1 FlexTimer Configuration.............................................................................................................................90
3.9.2 Low-power timer configuration...................................................................................................................98
3.9.3 PDB Configuration......................................................................................................................................100
3.10 Communication interfaces............................................................................................................................................103
3.10.1 SPI configuration.........................................................................................................................................103
3.10.2 I2C Configuration........................................................................................................................................106
3.10.3 UART Configuration...................................................................................................................................107
3.11 Human-machine interfaces (HMI)................................................................................................................................109
3.11.1 GPIO Configuration.....................................................................................................................................109
Chapter 4Memory Map
4.1 Introduction...................................................................................................................................................................111
4.2 System memory map.....................................................................................................................................................111
4.3 Flash Memory Map.......................................................................................................................................................112
4.3.1 Alternate Non-Volatile IRC User Trim Description....................................................................................112
4.4 SRAM memory map.....................................................................................................................................................113
4.5 Bit Manipulation Engine...............................................................................................................................................113
4.6 Peripheral bridge (AIPS-Lite) memory map.................................................................................................................114
4.6.1 Read-after-write sequence and required serialization of memory operations..............................................114
4.6.2 Peripheral Bridge (AIPS-Lite) Memory Map..............................................................................................115
4.6.3 Modules Restricted Access in User Mode...................................................................................................118
4.7 Private Peripheral Bus (PPB) memory map..................................................................................................................118
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 5
Section number Title Page
Chapter 5Clock Distribution
5.1 Introduction...................................................................................................................................................................121
5.2 Programming model......................................................................................................................................................121
5.3 High-level device clocking diagram.............................................................................................................................121
5.4 Clock definitions...........................................................................................................................................................122
5.4.1 Device clock summary.................................................................................................................................123
5.5 Internal clocking requirements.....................................................................................................................................124
5.5.1 Clock divider values after reset....................................................................................................................125
5.5.2 VLPR mode clocking...................................................................................................................................125
5.6 Clock Gating.................................................................................................................................................................126
5.7 Module clocks...............................................................................................................................................................126
5.7.1 PMC 1-kHz LPO clock................................................................................................................................127
5.7.2 LPTMR clocking..........................................................................................................................................128
5.7.3 Flex Timer (FTM) clocking.........................................................................................................................128
5.7.4 UART clocking............................................................................................................................................129
5.7.5 SPI clocking.................................................................................................................................................130
5.7.6 ADC clocking..............................................................................................................................................131
Chapter 6Reset and Boot
6.1 Introduction...................................................................................................................................................................133
6.2 Reset..............................................................................................................................................................................133
6.2.1 Power-on reset (POR)..................................................................................................................................134
6.2.2 System reset sources....................................................................................................................................134
6.2.3 MCU Resets.................................................................................................................................................137
6.2.4 Reset Pin .....................................................................................................................................................138
6.2.5 Debug resets.................................................................................................................................................139
6.3 Boot...............................................................................................................................................................................140
6.3.1 Boot sources.................................................................................................................................................140
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
6 Freescale Semiconductor, Inc.
Section number Title Page
6.3.2 FOPT boot options.......................................................................................................................................140
6.3.3 Boot sequence..............................................................................................................................................141
Chapter 7Power Management
7.1 Introduction...................................................................................................................................................................143
7.2 Clocking Modes............................................................................................................................................................143
7.2.1 Partial Stop...................................................................................................................................................143
7.2.2 DMA Wakeup..............................................................................................................................................144
7.2.3 Compute Operation......................................................................................................................................145
7.2.4 Peripheral Doze............................................................................................................................................146
7.2.5 Clock Gating................................................................................................................................................147
7.3 Power modes.................................................................................................................................................................147
7.4 Entering and exiting power modes...............................................................................................................................149
7.5 Module Operation in Low Power Modes......................................................................................................................149
Chapter 8Security
8.1 Introduction...................................................................................................................................................................153
8.2 Flash Security...............................................................................................................................................................153
8.3 Security Interactions with other Modules.....................................................................................................................153
8.3.1 Security Interactions with Debug.................................................................................................................154
Chapter 9Debug
9.1 Introduction...................................................................................................................................................................155
9.2 Debug Port Pin Descriptions.........................................................................................................................................155
9.3 SWD status and control registers..................................................................................................................................156
9.3.1 MDM-AP Control Register..........................................................................................................................157
9.3.2 MDM-AP Status Register............................................................................................................................158
9.4 Debug Resets................................................................................................................................................................160
9.5 Micro Trace Buffer (MTB)...........................................................................................................................................160
9.6 Debug in Low-Power Modes........................................................................................................................................161
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 7
Section number Title Page
9.7 Debug & Security.........................................................................................................................................................162
Chapter 10Signal Multiplexing and Signal Descriptions
10.1 Introduction...................................................................................................................................................................163
10.2 Signal Multiplexing Integration....................................................................................................................................163
10.2.1 Port control and interrupt module features..................................................................................................164
10.2.2 Clock gating.................................................................................................................................................165
10.2.3 Signal multiplexing constraints....................................................................................................................165
10.3 Pinout............................................................................................................................................................................165
10.3.1 Signal Multiplexing and Pin Assignments...................................................................................................165
10.3.2 KV10 Pinouts...............................................................................................................................................168
10.4 Module Signal Description Tables................................................................................................................................170
10.4.1 Core Modules...............................................................................................................................................170
10.4.2 System Modules...........................................................................................................................................171
10.4.3 Clock Modules.............................................................................................................................................171
10.4.4 Memories and Memory Interfaces...............................................................................................................171
10.4.5 Analog..........................................................................................................................................................171
10.4.6 Timer Modules.............................................................................................................................................173
10.4.7 Communication Interfaces...........................................................................................................................174
10.4.8 Human-Machine Interfaces (HMI)..............................................................................................................175
Chapter 11Port Control and Interrupts (PORT)
11.1 Introduction...................................................................................................................................................................177
11.2 Overview.......................................................................................................................................................................177
11.2.1 Features........................................................................................................................................................177
11.2.2 Modes of operation......................................................................................................................................178
11.3 External signal description............................................................................................................................................179
11.4 Detailed signal description............................................................................................................................................179
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
8 Freescale Semiconductor, Inc.
Section number Title Page
11.5 Memory map and register definition.............................................................................................................................179
11.5.1 Pin Control Register n (PORTx_PCRn).......................................................................................................185
11.5.2 Global Pin Control Low Register (PORTx_GPCLR)..................................................................................187
11.5.3 Global Pin Control High Register (PORTx_GPCHR).................................................................................188
11.5.4 Interrupt Status Flag Register (PORTx_ISFR)............................................................................................188
11.6 Functional description...................................................................................................................................................189
11.6.1 Pin control....................................................................................................................................................189
11.6.2 Global pin control........................................................................................................................................190
11.6.3 External interrupts........................................................................................................................................190
Chapter 12System Integration Module (SIM)
12.1 Introduction...................................................................................................................................................................193
12.1.1 Features........................................................................................................................................................193
12.2 Memory map and register definition.............................................................................................................................194
12.2.1 System Options Register 1 (SIM_SOPT1)..................................................................................................195
12.2.2 System Options Register 2 (SIM_SOPT2)..................................................................................................196
12.2.3 System Options Register 4 (SIM_SOPT4)..................................................................................................197
12.2.4 System Options Register 5 (SIM_SOPT5)..................................................................................................200
12.2.5 System Options Register 7 (SIM_SOPT7)..................................................................................................202
12.2.6 System Options Register 8 (SIM_SOPT8)..................................................................................................205
12.2.7 System Device Identification Register (SIM_SDID)...................................................................................208
12.2.8 System Clock Gating Control Register 4 (SIM_SCGC4)............................................................................209
12.2.9 System Clock Gating Control Register 5 (SIM_SCGC5)............................................................................211
12.2.10 System Clock Gating Control Register 6 (SIM_SCGC6)............................................................................212
12.2.11 System Clock Gating Control Register 7 (SIM_SCGC7)............................................................................214
12.2.12 System Clock Divider Register 1 (SIM_CLKDIV1)...................................................................................215
12.2.13 Flash Configuration Register 1 (SIM_FCFG1)...........................................................................................217
12.2.14 Flash Configuration Register 2 (SIM_FCFG2)...........................................................................................218
12.2.15 Unique Identification Register Mid-High (SIM_UIDMH)..........................................................................219
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 9
Section number Title Page
12.2.16 Unique Identification Register Mid Low (SIM_UIDML)...........................................................................219
12.2.17 Unique Identification Register Low (SIM_UIDL)......................................................................................220
12.2.18 WDOG Control Register (SIM_WDOGCTRL)..........................................................................................220
12.3 Functional description...................................................................................................................................................221
Chapter 13System Mode Controller (SMC)
13.1 Introduction...................................................................................................................................................................223
13.2 Modes of operation.......................................................................................................................................................223
13.3 Memory map and register descriptions.........................................................................................................................225
13.3.1 Power Mode Protection register (SMC_PMPROT).....................................................................................226
13.3.2 Power Mode Control register (SMC_PMCTRL).........................................................................................227
13.3.3 Stop Control Register (SMC_STOPCTRL).................................................................................................228
13.3.4 Power Mode Status register (SMC_PMSTAT)...........................................................................................230
13.4 Functional description...................................................................................................................................................230
13.4.1 Power mode transitions................................................................................................................................230
13.4.2 Power mode entry/exit sequencing..............................................................................................................233
13.4.3 Run modes....................................................................................................................................................235
13.4.4 Wait modes..................................................................................................................................................236
13.4.5 Stop modes...................................................................................................................................................237
13.4.6 Debug in low power modes.........................................................................................................................239
Chapter 14Power Management Controller (PMC)
14.1 Introduction...................................................................................................................................................................241
14.2 Features.........................................................................................................................................................................241
14.3 Low-voltage detect (LVD) system................................................................................................................................241
14.3.1 LVD reset operation.....................................................................................................................................242
14.3.2 LVD interrupt operation...............................................................................................................................242
14.3.3 Low-voltage warning (LVW) interrupt operation.......................................................................................242
14.4 I/O retention..................................................................................................................................................................243
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
10 Freescale Semiconductor, Inc.
Section number Title Page
14.5 Memory map and register descriptions.........................................................................................................................243
14.5.1 Low Voltage Detect Status And Control 1 register (PMC_LVDSC1)........................................................244
14.5.2 Low Voltage Detect Status And Control 2 register (PMC_LVDSC2)........................................................245
14.5.3 Regulator Status And Control register (PMC_REGSC)..............................................................................246
Chapter 15Low-Leakage Wakeup Unit (LLWU)
15.1 Introduction...................................................................................................................................................................249
15.1.1 Features........................................................................................................................................................249
15.1.2 Modes of operation......................................................................................................................................250
15.1.3 Block diagram..............................................................................................................................................250
15.2 LLWU signal descriptions............................................................................................................................................251
15.3 Memory map/register definition...................................................................................................................................252
15.3.1 LLWU Pin Enable 1 register (LLWU_PE1)................................................................................................253
15.3.2 LLWU Pin Enable 2 register (LLWU_PE2)................................................................................................254
15.3.3 LLWU Pin Enable 3 register (LLWU_PE3)................................................................................................255
15.3.4 LLWU Pin Enable 4 register (LLWU_PE4)................................................................................................256
15.3.5 LLWU Module Enable register (LLWU_ME)............................................................................................257
15.3.6 LLWU Flag 1 register (LLWU_F1).............................................................................................................259
15.3.7 LLWU Flag 2 register (LLWU_F2).............................................................................................................260
15.3.8 LLWU Flag 3 register (LLWU_F3).............................................................................................................262
15.3.9 LLWU Pin Filter 1 register (LLWU_FILT1)..............................................................................................264
15.3.10 LLWU Pin Filter 2 register (LLWU_FILT2)..............................................................................................265
15.4 Functional description...................................................................................................................................................266
15.4.1 VLLS modes................................................................................................................................................266
15.4.2 Initialization.................................................................................................................................................266
Chapter 16Reset Control Module (RCM)
16.1 Introduction...................................................................................................................................................................269
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 11
Section number Title Page
16.2 Reset memory map and register descriptions...............................................................................................................269
16.2.1 System Reset Status Register 0 (RCM_SRS0)............................................................................................270
16.2.2 System Reset Status Register 1 (RCM_SRS1)............................................................................................271
16.2.3 Reset Pin Filter Control register (RCM_RPFC)..........................................................................................272
16.2.4 Reset Pin Filter Width register (RCM_RPFW)...........................................................................................273
16.2.5 Force Mode Register (RCM_FM)................................................................................................................275
16.2.6 Mode Register (RCM_MR).........................................................................................................................275
Chapter 17Bit Manipulation Engine (BME)
17.1 Introduction...................................................................................................................................................................277
17.1.1 Overview......................................................................................................................................................278
17.1.2 Features........................................................................................................................................................278
17.1.3 Modes of operation......................................................................................................................................279
17.2 Memory map and register definition.............................................................................................................................279
17.3 Functional description...................................................................................................................................................279
17.3.1 BME decorated stores..................................................................................................................................280
17.3.2 BME decorated loads...................................................................................................................................287
17.3.3 Additional details on decorated addresses and GPIO accesses....................................................................293
17.4 Application information................................................................................................................................................294
Chapter 18Memory-Mapped Divide and Square Root (MMDVSQ)
18.1 Introduction...................................................................................................................................................................297
18.1.1 Features........................................................................................................................................................297
18.1.2 Block diagram..............................................................................................................................................298
18.1.3 Modes of operation......................................................................................................................................299
18.2 External signal description............................................................................................................................................300
18.3 Memory map and register definition.............................................................................................................................300
18.3.1 Dividend Register (MMDVSQ_DEND)......................................................................................................301
18.3.2 Divisor Register (MMDVSQ_DSOR).........................................................................................................301
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
12 Freescale Semiconductor, Inc.
Section number Title Page
18.3.3 Control/Status Register (MMDVSQ_CSR).................................................................................................303
18.3.4 Result Register (MMDVSQ_RES)..............................................................................................................306
18.3.5 Radicand Register (MMDVSQ_RCND).....................................................................................................306
18.4 Functional description...................................................................................................................................................307
18.4.1 Algorithms...................................................................................................................................................307
18.4.2 Execution times............................................................................................................................................310
18.4.3 Software interface........................................................................................................................................312
Chapter 19Miscellaneous Control Module (MCM)
19.1 Introduction...................................................................................................................................................................315
19.1.1 Features........................................................................................................................................................315
19.2 Memory map/register descriptions...............................................................................................................................315
19.2.1 Crossbar Switch (AXBS) Slave Configuration (MCM_PLASC)................................................................316
19.2.2 Crossbar Switch (AXBS) Master Configuration (MCM_PLAMC)............................................................316
19.2.3 Platform Control Register (MCM_PLACR)................................................................................................317
19.2.4 Compute Operation Control Register (MCM_CPO)...................................................................................320
Chapter 20Micro Trace Buffer (MTB)
20.1 Introduction...................................................................................................................................................................323
20.1.1 Overview......................................................................................................................................................323
20.1.2 Features........................................................................................................................................................325
20.1.3 Modes of operation......................................................................................................................................326
20.2 External signal description............................................................................................................................................326
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 13
Section number Title Page
20.3 Memory map and register definition.............................................................................................................................327
20.3.1 MTB_RAM Memory Map...........................................................................................................................328
20.3.2 MTB_DWT Memory Map...........................................................................................................................340
20.3.3 System ROM Memory Map.........................................................................................................................350
Chapter 21Crossbar Switch Lite (AXBS-Lite)
21.1 Introduction...................................................................................................................................................................355
21.1.1 Features........................................................................................................................................................355
21.2 Memory Map / Register Definition...............................................................................................................................356
21.3 Functional Description..................................................................................................................................................356
21.3.1 General operation.........................................................................................................................................356
21.3.2 Arbitration....................................................................................................................................................357
21.4 Initialization/application information...........................................................................................................................359
Chapter 22Peripheral Bridge (AIPS-Lite)
22.1 Introduction...................................................................................................................................................................361
22.1.1 Features........................................................................................................................................................361
22.1.2 General operation.........................................................................................................................................361
22.2 Functional description...................................................................................................................................................362
22.2.1 Access support.............................................................................................................................................362
Chapter 23Direct Memory Access Multiplexer (DMAMUX)
23.1 Introduction...................................................................................................................................................................363
23.1.1 Overview......................................................................................................................................................363
23.1.2 Features........................................................................................................................................................364
23.1.3 Modes of operation......................................................................................................................................364
23.2 External signal description............................................................................................................................................365
23.3 Memory map/register definition...................................................................................................................................365
23.3.1 Channel Configuration register (DMAMUX_CHCFGn)............................................................................365
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
14 Freescale Semiconductor, Inc.
Section number Title Page
23.4 Functional description...................................................................................................................................................366
23.4.1 Always-enabled DMA sources....................................................................................................................366
23.5 Initialization/application information...........................................................................................................................367
23.5.1 Reset.............................................................................................................................................................368
23.5.2 Enabling and configuring sources................................................................................................................368
Chapter 24Enhanced Direct Memory Access (eDMA)
24.1 Introduction...................................................................................................................................................................371
24.1.1 eDMA system block diagram......................................................................................................................371
24.1.2 Block parts...................................................................................................................................................372
24.1.3 Features........................................................................................................................................................373
24.2 Modes of operation.......................................................................................................................................................375
24.3 Memory map/register definition...................................................................................................................................375
24.3.1 Control Register (DMA_CR).......................................................................................................................380
24.3.2 Error Status Register (DMA_ES)................................................................................................................382
24.3.3 Enable Request Register (DMA_ERQ).......................................................................................................384
24.3.4 Enable Error Interrupt Register (DMA_EEI)...............................................................................................385
24.3.5 Clear Enable Error Interrupt Register (DMA_CEEI)..................................................................................386
24.3.6 Set Enable Error Interrupt Register (DMA_SEEI)......................................................................................387
24.3.7 Clear Enable Request Register (DMA_CERQ)...........................................................................................388
24.3.8 Set Enable Request Register (DMA_SERQ)...............................................................................................389
24.3.9 Clear DONE Status Bit Register (DMA_CDNE)........................................................................................390
24.3.10 Set START Bit Register (DMA_SSRT)......................................................................................................391
24.3.11 Clear Error Register (DMA_CERR)............................................................................................................392
24.3.12 Clear Interrupt Request Register (DMA_CINT).........................................................................................393
24.3.13 Interrupt Request Register (DMA_INT)......................................................................................................394
24.3.14 Error Register (DMA_ERR)........................................................................................................................395
24.3.15 Hardware Request Status Register (DMA_HRS)........................................................................................396
24.3.16 Enable Asynchronous Request in Stop Register (DMA_EARS).................................................................398
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 15
Section number Title Page
24.3.17 Channel n Priority Register (DMA_DCHPRIn)..........................................................................................399
24.3.18 TCD Source Address (DMA_TCDn_SADDR)...........................................................................................400
24.3.19 TCD Signed Source Address Offset (DMA_TCDn_SOFF)........................................................................400
24.3.20 TCD Transfer Attributes (DMA_TCDn_ATTR).........................................................................................401
24.3.21 TCD Minor Byte Count (Minor Loop Disabled) (DMA_TCDn_NBYTES_MLNO).................................402
24.3.22 TCD Signed Minor Loop Offset (Minor Loop Enabled and Offset Disabled)
(DMA_TCDn_NBYTES_MLOFFNO).......................................................................................................402
24.3.23 TCD Signed Minor Loop Offset (Minor Loop and Offset Enabled)
(DMA_TCDn_NBYTES_MLOFFYES).....................................................................................................404
24.3.24 TCD Last Source Address Adjustment (DMA_TCDn_SLAST).................................................................405
24.3.25 TCD Destination Address (DMA_TCDn_DADDR)...................................................................................405
24.3.26 TCD Signed Destination Address Offset (DMA_TCDn_DOFF)................................................................406
24.3.27 TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)
(DMA_TCDn_CITER_ELINKYES)...........................................................................................................406
24.3.28 TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)
(DMA_TCDn_CITER_ELINKNO)............................................................................................................408
24.3.29 TCD Last Destination Address Adjustment/Scatter Gather Address (DMA_TCDn_DLASTSGA)..........409
24.3.30 TCD Control and Status (DMA_TCDn_CSR)............................................................................................409
24.3.31 TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)
(DMA_TCDn_BITER_ELINKYES)...........................................................................................................412
24.3.32 TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)
(DMA_TCDn_BITER_ELINKNO)............................................................................................................413
24.4 Functional description...................................................................................................................................................414
24.4.1 eDMA basic data flow.................................................................................................................................414
24.4.2 Fault reporting and handling........................................................................................................................417
24.4.3 Channel preemption.....................................................................................................................................418
24.4.4 Performance.................................................................................................................................................419
24.5 Initialization/application information...........................................................................................................................423
24.5.1 eDMA initialization.....................................................................................................................................423
24.5.2 Programming errors.....................................................................................................................................425
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
16 Freescale Semiconductor, Inc.
Section number Title Page
24.5.3 Arbitration mode considerations..................................................................................................................426
24.5.4 Performing DMA transfers (examples)........................................................................................................426
24.5.5 Monitoring transfer descriptor status...........................................................................................................430
24.5.6 Channel Linking...........................................................................................................................................432
24.5.7 Dynamic programming................................................................................................................................433
Chapter 25External Watchdog Monitor (EWM)
25.1 Introduction...................................................................................................................................................................437
25.1.1 Features........................................................................................................................................................437
25.1.2 Modes of Operation.....................................................................................................................................438
25.1.3 Block Diagram.............................................................................................................................................439
25.2 EWM Signal Descriptions............................................................................................................................................439
25.3 Memory Map/Register Definition.................................................................................................................................440
25.3.1 Control Register (EWM_CTRL).................................................................................................................440
25.3.2 Service Register (EWM_SERV)..................................................................................................................441
25.3.3 Compare Low Register (EWM_CMPL)......................................................................................................441
25.3.4 Compare High Register (EWM_CMPH).....................................................................................................442
25.3.5 Clock Control Register (EWM_CLKCTRL)...............................................................................................443
25.3.6 Clock Prescaler Register (EWM_CLKPRESCALER)................................................................................443
25.4 Functional Description..................................................................................................................................................444
25.4.1 The EWM_out Signal..................................................................................................................................444
25.4.2 The EWM_in Signal....................................................................................................................................445
25.4.3 EWM Counter..............................................................................................................................................445
25.4.4 EWM Compare Registers............................................................................................................................446
25.4.5 EWM Refresh Mechanism...........................................................................................................................446
25.4.6 EWM Interrupt.............................................................................................................................................446
25.4.7 Selecting the EWM counter clock...............................................................................................................447
25.4.8 Counter clock prescaler................................................................................................................................447
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 17
Section number Title Page
Chapter 26Watchdog Timer (WDOG)
26.1 Introduction...................................................................................................................................................................449
26.2 Features.........................................................................................................................................................................449
26.3 Functional overview......................................................................................................................................................451
26.3.1 Unlocking and updating the watchdog.........................................................................................................452
26.3.2 Watchdog configuration time (WCT)..........................................................................................................453
26.3.3 Refreshing the watchdog..............................................................................................................................454
26.3.4 Windowed mode of operation......................................................................................................................454
26.3.5 Watchdog disabled mode of operation.........................................................................................................454
26.3.6 Low-power modes of operation...................................................................................................................455
26.3.7 Debug modes of operation...........................................................................................................................455
26.4 Testing the watchdog....................................................................................................................................................456
26.4.1 Quick test.....................................................................................................................................................456
26.4.2 Byte test........................................................................................................................................................457
26.5 Backup reset generator..................................................................................................................................................458
26.6 Generated resets and interrupts.....................................................................................................................................458
26.7 Memory map and register definition.............................................................................................................................459
26.7.1 Watchdog Status and Control Register High (WDOG_STCTRLH)...........................................................460
26.7.2 Watchdog Status and Control Register Low (WDOG_STCTRLL)............................................................461
26.7.3 Watchdog Time-out Value Register High (WDOG_TOVALH).................................................................462
26.7.4 Watchdog Time-out Value Register Low (WDOG_TOVALL)..................................................................462
26.7.5 Watchdog Window Register High (WDOG_WINH)..................................................................................463
26.7.6 Watchdog Window Register Low (WDOG_WINL)...................................................................................463
26.7.7 Watchdog Refresh register (WDOG_REFRESH).......................................................................................464
26.7.8 Watchdog Unlock register (WDOG_UNLOCK).........................................................................................464
26.7.9 Watchdog Timer Output Register High (WDOG_TMROUTH).................................................................464
26.7.10 Watchdog Timer Output Register Low (WDOG_TMROUTL)..................................................................465
26.7.11 Watchdog Reset Count register (WDOG_RSTCNT)..................................................................................465
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
18 Freescale Semiconductor, Inc.
Section number Title Page
26.7.12 Watchdog Prescaler register (WDOG_PRESC)..........................................................................................466
26.8 Watchdog operation with 8-bit access..........................................................................................................................466
26.8.1 General guideline.........................................................................................................................................466
26.8.2 Refresh and unlock operations with 8-bit access.........................................................................................466
26.9 Restrictions on watchdog operation..............................................................................................................................467
Chapter 27Multipurpose Clock Generator (MCG)
27.1 Introduction...................................................................................................................................................................471
27.1.1 Features........................................................................................................................................................471
27.1.2 Modes of Operation.....................................................................................................................................474
27.2 External Signal Description..........................................................................................................................................474
27.3 Memory Map/Register Definition.................................................................................................................................474
27.3.1 MCG Control 1 Register (MCG_C1)...........................................................................................................474
27.3.2 MCG Control 2 Register (MCG_C2)...........................................................................................................475
27.3.3 MCG Control 3 Register (MCG_C3)...........................................................................................................477
27.3.4 MCG Control 4 Register (MCG_C4)...........................................................................................................477
27.3.5 MCG Control 6 Register (MCG_C6)...........................................................................................................479
27.3.6 MCG Status Register (MCG_S)..................................................................................................................479
27.3.7 MCG Status and Control Register (MCG_SC)............................................................................................480
27.3.8 MCG Auto Trim Compare Value High Register (MCG_ATCVH)............................................................482
27.3.9 MCG Auto Trim Compare Value Low Register (MCG_ATCVL)..............................................................482
27.4 Functional description...................................................................................................................................................482
27.4.1 MCG mode state diagram............................................................................................................................482
27.4.2 Low-power bit usage....................................................................................................................................486
27.4.3 MCG Internal Reference Clocks..................................................................................................................486
27.4.4 External Reference Clock............................................................................................................................486
27.4.5 MCG Fixed Frequency Clock .....................................................................................................................487
27.4.6 MCG Auto TRIM (ATM)............................................................................................................................487
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 19
Section number Title Page
27.5 Initialization / Application information........................................................................................................................488
27.5.1 MCG module initialization sequence...........................................................................................................489
27.5.2 Using a 32.768 kHz reference......................................................................................................................491
27.5.3 MCG mode switching..................................................................................................................................492
Chapter 28Oscillator (OSC)
28.1 Introduction...................................................................................................................................................................493
28.2 Features and Modes......................................................................................................................................................493
28.3 Block Diagram..............................................................................................................................................................494
28.4 OSC Signal Descriptions..............................................................................................................................................494
28.5 External Crystal / Resonator Connections....................................................................................................................495
28.6 External Clock Connections.........................................................................................................................................496
28.7 Memory Map/Register Definitions...............................................................................................................................497
28.7.1 OSC Memory Map/Register Definition.......................................................................................................497
28.8 Functional Description..................................................................................................................................................498
28.8.1 OSC module states.......................................................................................................................................498
28.8.2 OSC module modes.....................................................................................................................................500
28.8.3 Counter.........................................................................................................................................................502
28.8.4 Reference clock pin requirements................................................................................................................502
28.9 Reset..............................................................................................................................................................................502
28.10 Low power modes operation.........................................................................................................................................503
28.11 Interrupts.......................................................................................................................................................................503
Chapter 29Flash Memory Controller (FMC)
29.1 Introduction...................................................................................................................................................................505
29.1.1 Overview......................................................................................................................................................505
29.1.2 Features........................................................................................................................................................505
29.2 Modes of operation.......................................................................................................................................................506
29.3 External signal description............................................................................................................................................506
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
20 Freescale Semiconductor, Inc.
Section number Title Page
29.4 Memory map and register descriptions.........................................................................................................................506
29.5 Functional description...................................................................................................................................................506
Chapter 30Flash Memory Module (FTFA)
30.1 Introduction...................................................................................................................................................................509
30.1.1 Features........................................................................................................................................................510
30.1.2 Block Diagram.............................................................................................................................................510
30.1.3 Glossary.......................................................................................................................................................511
30.2 External Signal Description..........................................................................................................................................512
30.3 Memory Map and Registers..........................................................................................................................................512
30.3.1 Flash Configuration Field Description.........................................................................................................512
30.3.2 Program Flash IFR Map...............................................................................................................................513
30.3.3 Register Descriptions...................................................................................................................................513
30.4 Functional Description..................................................................................................................................................522
30.4.1 Flash Protection............................................................................................................................................523
30.4.2 Interrupts......................................................................................................................................................523
30.4.3 Flash Operation in Low-Power Modes........................................................................................................524
30.4.4 Functional Modes of Operation...................................................................................................................525
30.4.5 Flash Reads and Ignored Writes..................................................................................................................525
30.4.6 Read While Write (RWW)...........................................................................................................................525
30.4.7 Flash Program and Erase..............................................................................................................................525
30.4.8 Flash Command Operations.........................................................................................................................525
30.4.9 Margin Read Commands.............................................................................................................................530
30.4.10 Flash Command Description........................................................................................................................531
30.4.11 Security........................................................................................................................................................544
30.4.12 Reset Sequence............................................................................................................................................546
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
Freescale Semiconductor, Inc. 21
Section number Title Page
Chapter 31Cyclic Redundancy Check (CRC)
31.1 Introduction...................................................................................................................................................................547
31.1.1 Features........................................................................................................................................................547
31.1.2 Block diagram..............................................................................................................................................547
31.1.3 Modes of operation......................................................................................................................................548
31.2 Memory map and register descriptions.........................................................................................................................548
31.2.1 CRC Data register (CRC_DATA)...............................................................................................................549
31.2.2 CRC Polynomial register (CRC_GPOLY)..................................................................................................550
31.2.3 CRC Control register (CRC_CTRL)............................................................................................................550
31.3 Functional description...................................................................................................................................................551
31.3.1 CRC initialization/reinitialization................................................................................................................551
31.3.2 CRC calculations..........................................................................................................................................552
31.3.3 Transpose feature.........................................................................................................................................553
31.3.4 CRC result complement...............................................................................................................................555
Chapter 32Analog-to-Digital Converter (ADC)
32.1 Introduction...................................................................................................................................................................557
32.1.1 Features........................................................................................................................................................557
32.1.2 Block diagram..............................................................................................................................................558
32.2 ADC signal descriptions...............................................................................................................................................559
32.2.1 Analog Power (VDDA)...............................................................................................................................560
32.2.2 Analog Ground (VSSA)...............................................................................................................................560
32.2.3 Voltage Reference Select.............................................................................................................................560
32.2.4 Analog Channel Inputs (ADx).....................................................................................................................561
32.2.5 Differential Analog Channel Inputs (DADx)...............................................................................................561
32.3 Memory map and register definitions...........................................................................................................................561
32.3.1 ADC Status and Control Registers 1 (ADCx_SC1n)...................................................................................563
32.3.2 ADC Configuration Register 1 (ADCx_CFG1)...........................................................................................566
KV10 Sub-Family Reference Manual, Rev. 4, February 2014
22 Freescale Semiconductor, Inc.
Section number Title Page
32.3.3 ADC Configuration Register 2 (ADCx_CFG2)...........................................................................................568
32.3.4 ADC Data Result Register (ADCx_Rn).......................................................................................................569
32.3.5 Compare Value Registers (ADCx_CVn).....................................................................................................570
32.3.6 Status and Control Register 2 (ADCx_SC2)................................................................................................571
32.3.7 Status and Control Register 3 (ADCx_SC3)................................................................................................573
32.3.8 ADC Offset Correction Register (ADCx_OFS)...........................................................................................575
32.3.9 ADC Plus-Side Gain Register (ADCx_PG).................................................................................................575
32.3.10 ADC Minus-Side Gain Register (ADCx_MG)............................................................................................576
32.3.11 ADC Plus-Side General Calibration Value Register (ADCx_CLPD).........................................................576
32.3.12 ADC Plus-Side General Calibration Value Register (ADCx_CLPS)..........................................................577
32.3.13 ADC Plus-Side General Calibration Value Register (ADCx_CLP4)..........................................................577
32.3.14 ADC Plus-Side General Calibration Value Register (ADCx_CLP3)..........................................................578
32.3.15 ADC Plus-Side General Calibration Value Register (ADCx_CLP2)..........................................................578
32.3.16 ADC Plus-Side General Calibration Value Register (ADCx_CLP1)..........................................................579
32.3.17 ADC Plus-Side General Calibration Value Register (ADCx_CLP0)..........................................................579
32.3.18 ADC Minus-Side General Calibration Value Register (ADCx_CLMD).....................................................580
32.3.19 ADC Minus-Side General Calibration Value Register (ADCx_CLMS).....................................................580
32.3.20 ADC Minus-Side General Calibration Value Register (ADCx_CLM4).....................................................581
32.3.21 ADC Minus-Side General Calibration Value Register (ADCx_CLM3).....................................................581
32.3.22 ADC Minus-Side General Calibration Value Register (ADCx_CLM2).....................................................582
32.3.23 ADC Minus-Si