Kinetis Peripheral Module.pdf
(
1740 KB
)
Pobierz
Freescale Semiconductor
User’s Guide
KQRUG
Rev. 3, 05/2014
Kinetis Peripheral Module
Quick Reference
A Compilation of Demonstration Software for Kinetis Modules
This collection of code examples, useful tips, and quick
reference material has been created to help you speed the
development of your applications. Most chapters in this
document contain examples that can be modified to work
with Kinetis MCU Family members. When you are
developing your application, consult your device data
sheet and reference manual for part-specific information,
such as which features are supported on your device.
Sample code can be found at KINETIS512_SC.zip,
available from http://freescale.com
Information about the ARM core can be found in the help
center at http://ARM.com
The most up-to-date revisions of our documents are on
the Web. Your printed copy may be an earlier revision.
To verify that you have the latest information available,
refer to http://freescale.com
© Freescale Semiconductor, Inc., 2010-2014. All rights reserved.
Revision History
Date
11/2010
Revision
Level
0
Initial release
• Added two new chapters,
Chapter 8: Using the Flash Software Drivers,
and
Chapter 20: Using OPAMP for Kinetis Microcontrollers.
•
Updated
Fig. 13-3, Fig. 13-4
and
Fig. 13-5
of Chapter 13: ENET
Module. Also updated
Section 13.5.1.1: Hardware Implementation,
of the
same chapter.
•
Added a note to
Section 14.4: Example Code,
of Chapter 14: USB
Device Charger Detection (USBDCD) Module, and
Section 15.7: Example
Code,
of Chapter 15: Universal Serial Bus OTG (USBOTG) Module.
• Deleted the sentence “Refer to the full source code for this example in the
ZIP file” from the
Section 7.1.5.2: Module configuration,
of Chapter 7:
Enhanced Direct Memory Access (eDMA) Controller
• Minor editorial changes
• Section 2.1.3.4.1 “Reset_b and NMI_b,” replaced paragraphs with new
which states the requirement to not have capacitance on the NMI-b pin.
Description
Page
Number(s)
N/A
03/2012
1
N/A
08/2012
2
N/A
06/2014
3
28
Kinetis Peripheral Module Quick Reference, Rev. 3
,
05/2014
2
Freescale Semiconductor
Contents
Section number
Title
Chapter 1
General System Setup (Software Considerations)
1.1
Software considerations..................................................................................................................................................15
1.1.1
1.1.2
1.1.3
Overview............................................................................................................................................................15
Code execution...................................................................................................................................................15
Reset and booting...............................................................................................................................................15
1.1.3.1
1.1.3.2
1.1.4
Device state during reset....................................................................................................................16
Device state after reset.......................................................................................................................16
Page
Typical system initialization .............................................................................................................................16
1.1.4.1
Lowest level assembly routines.........................................................................................................16
1.1.4.1.1
Initialize general purpose registers.................................................................................16
1.1.4.1.1.1 Unmask interrupts at ARM core ................................................................17
1.1.4.1.1.2 Branch to start of C initialization code.......................................................17
1.1.4.2
Startup routines..................................................................................................................................17
1.1.4.2.1
1.1.4.2.2
1.1.4.2.3
1.1.4.2.4
1.1.4.2.5
1.1.4.2.6
1.1.4.2.7
Disable watchdog............................................................................................................17
Initialize RAM................................................................................................................17
Enable port clocks...........................................................................................................18
Ramp system clock to selected frequency......................................................................18
Enable pin interrupt.........................................................................................................18
Enable UART for terminal communication....................................................................18
Jump to start of main function for application................................................................19
Chapter 2
General System Setup (Hardware Considerations)
2.1
Hardware considerations.................................................................................................................................................21
2.1.1
2.1.2
Overview............................................................................................................................................................21
Floorplan............................................................................................................................................................21
2.1.2.1
2.1.2.2
Connectors.........................................................................................................................................22
Power domains...................................................................................................................................22
Kinetis Quick Reference User Guide, Rev. 3, 05/2014
Freescale Semiconductor, Inc.
3
Section number
2.1.3
Title
Page
PCB routing considerations...............................................................................................................................23
2.1.3.1
2.1.3.2
2.1.3.3
Power supply routing.........................................................................................................................23
Power supply decoupling and filtering..............................................................................................23
Oscillators..........................................................................................................................................25
2.1.3.3.1
2.1.3.3.2
2.1.3.4
RTC oscillator.................................................................................................................25
MCG oscillator................................................................................................................26
General filtering.................................................................................................................................28
2.1.3.4.1
2.1.3.4.2
2.1.3.4.3
RESET_b and NMI_b.....................................................................................................28
General purpose I/O........................................................................................................28
Analog inputs..................................................................................................................29
2.1.4
2.1.5
PCB layer stack-up.............................................................................................................................................29
Other module hardware considerations..............................................................................................................32
2.1.5.1
2.1.5.2
2.1.5.3
VBAT.................................................................................................................................................32
Voltage reference module..................................................................................................................32
Debug interface..................................................................................................................................32
Chapter 3
Nested Vector Interrupt Controller (NVIC)
3.1
NVIC...............................................................................................................................................................................35
3.1.1
Overview............................................................................................................................................................35
3.1.1.1
3.1.1.2
3.1.2
Introduction .......................................................................................................................................35
Features .............................................................................................................................................35
Configuration examples.....................................................................................................................................36
3.1.2.1
Configuring the NVIC.......................................................................................................................36
3.1.2.1.1
3.1.2.2
Code example and explanation.......................................................................................36
Relocating the vector table.................................................................................................................37
3.1.2.2.1
Code example and explanation.......................................................................................38
3.1.2.3
Disabling priorities.............................................................................................................................38
3.1.2.3.1
Code example and explanation.......................................................................................39
Kinetis Quick Reference User Guide, Rev. 3, 05/2014
4
Freescale Semiconductor, Inc.
Section number
Title
Chapter 4
Clocking System
Page
4.1
Clocking..........................................................................................................................................................................41
4.1.1
4.1.2
4.1.3
Overview............................................................................................................................................................41
Features..............................................................................................................................................................41
Configuration examples.....................................................................................................................................43
4.1.3.1
Transitioning to PLL engaged external mode....................................................................................44
4.1.3.1.1
4.1.3.2
Code example and explanation.......................................................................................44
Transitioning between PLL engaged external mode and bypassed low power internal mode..........45
4.1.3.2.1
Code example and explanation.......................................................................................45
4.1.3.3
Configuring the FLL with the RTC oscillator as a reference............................................................46
4.1.3.3.1
Code example and explanation.......................................................................................46
4.1.4
4.1.5
4.1.6
Clocking system device hardware implementation...........................................................................................47
Layout guidelines for general routing and placement........................................................................................48
References..........................................................................................................................................................48
Chapter 5
Power Management Controller (PMC/MODECTL)
5.1
Using the power management controller........................................................................................................................49
5.1.1
Overview............................................................................................................................................................49
5.1.1.1
5.1.2
Introduction........................................................................................................................................49
Using the low voltage detection system.............................................................................................................49
5.1.2.1
5.1.2.2
5.1.2.3
5.1.2.4
Features..............................................................................................................................................49
Configuration examples.....................................................................................................................50
Interrupt code example and explanation............................................................................................51
Hardware implementation..................................................................................................................51
5.2
Using the mode controller...............................................................................................................................................52
5.2.1
Overview............................................................................................................................................................52
5.2.1.1
5.2.1.2
Introduction........................................................................................................................................52
Features..............................................................................................................................................53
Kinetis Quick Reference User Guide, Rev. 3, 05/2014
Freescale Semiconductor, Inc.
5
Plik z chomika:
Odziom_IM
Inne pliki z tego folderu:
stronki.txt
(0 KB)
K64P144M120SF5RM datashhet.pdf
(13734 KB)
Datasheet_MCU.pdf
(952 KB)
FRDM-K64F_Manual.pdf
(1152 KB)
Kinetis Peripheral Module.pdf
(1740 KB)
Inne foldery tego chomika:
ARM C
Zgłoś jeśli
naruszono regulamin