NXP FRDM-K22FN512 Freedom Board for Kinetis K22F Hardware User Guide
- June 11, 2024
- NXP
Table of Contents
- Introduction
- FRDM-K22F Hardware Overview
- FRDM-K22F Hardware Description
- Microcontroller
- Clocking
- Universal Serial Bus (USB)
- Secure Digital Card
- Accelerometer and Magnetometer
- RGB LED
- Serial Port
- Reset
- Push Button Switches
- Input/output Connectors
- Arduino Compatibility
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
FRDM-K22FN512 Freedom Board for Kinetis K22F Hardware
User Guide
Introduction
The Freescale Freedom development platform is a set of software and hardware
tools for evaluation and development. It is ideal for rapid prototyping of
microcontroller-based applications. The Freescale Freedom K22 hardware, FRDM-
K22F, is a simple yet sophisticated design featuring a Kinetis K series
microcontroller built on the ARM®
Cortex ® -M4 core which features a floating point unit (FPU).
FRDM-K22F can be used to evaluate the K22FN512, K22FN256, and K22FN128 Kinetis
K series devices. The FRDM-K22F board features the MK22FN512VLH12 MCU, which
boasts a maximum operation frequency of 120 MHz, 512 KB of flash, a 128 KB
RAM, a full-speed USB controller with available crystal-less operation, and
analog and digital peripherals. The FRDM-K22F hardware is form-factor
compatible with the Arduino TM R3 pin layout, providing a broad range of
expansion board options. The onboard interface includes a six-axis digital
accelerometer and magnetometer, an RGB LED, and sufficient ootprint to add an
optional Bluetooth module (for use over UART), an RF module (for use over
SPI), and an SDHC slot (for use over SPI).
The FRDM-K22F platform features OpenSDAv2, the Freescale open-source hardware
embedded serial and debug adapter running an open-source bootloader. This
circuit offers several options for serial communication, flash programming,
and run-control debugging. OpenSDAv2 is an mbed™ HDK-compatible debug
interface preloaded with the open-source CMSIS-DAP Interface firmware (mbed
interface) for rapid prototyping and product development, with a focus on
connected Internet of Things devices.
FRDM-K22F Hardware Overview
The features of the FRDM-K22F hardware are as follows:
-
MK22FN512VLH12 MCU—120 MHz, 512 KB flash memory, 128 KB RAM, low-power, and crystal-less USB in 64 LQFP package)
-
Dual role USB interface with USB connector
-
RGB LED
-
FXOS8700CQ—accelerometer and magnetometer
-
Two user push buttons
-
Flexible power supply option—OpenSDAv2 USB, K22F USB, or external source
-
Easy access to MCU input/output through Arduino R3 compatible I/O connectors
-
Programmable OpenSDAv2 debug circuit supporting the CMSIS-DAP interface software that provides:
— Mass storage device (MSD) flash programming interface
— CMSIS-DAP debug interface over a USB HID connection providing run-control debugging and compatibility with IDE tools
— Virtual serial port interface -
Optional microSD card slot for operation over SPI
-
Optional header for add-on RF module: nRF24L01+ Nordic 2.4 GHz radio
-
Optional header for add-on Bluetooth module: JY-MCU BT board V1.05 BT
Figure 1 shows the block diagram of the FRDM-K22F design. The primary components and their placement on the hardware assembly are explained in Figure 2.
FRDM-K22F Hardware Description
FRDM-K22F Hardware Description
3.1 Power supply
There are multiple power supply options on the FRDM-K22F board. It can be
powered from either of the USB connectors, the VIN pin on the I/O header, DC
jack (optional; not populated), or an off board 1.71–3.6 V supply from the 3.3
V pin on the I/O header. The USB, DC jack, and VIN supplies are regulated
onboard using a 3.3 V linear regulator to produce the main power supply. A
direct voltage supply to the K22F MCU is also available via J15. Table 1
provides the operational details and requirements for the power supplies.
Table 1. FRDM-K22F power requirements
Supply Source| Valid Range| OpenSDAv2 Operational?|
Regulated Onboard?
---|---|---|---
OpenSDAvs USB| 5 V| Yes| Yes
K22F USB| 5 V| No| Yes
P5-9V_VIN pin| 5 V–9 V| No| Yes
3.3 V header (J15)| 1.71 V–3.6 V| No| No
DC jack (not populated)| 5 V–9 V| No| Yes
NOTE
The OpenSDAv2 circuit is only operational when a USB cable is connected and
supplies power to the OpenSDAv2 USB. However, protection circuitry is in place
to enable multiple sources to be powered at once. Table 2. FRDM-K22F power supplies
Power Supply Name | Description |
---|---|
P5-9V VIN | Power supply from the VIN pin of the I/O headers (J25 pin 16). A |
Schottky diode provides back-drive protection.
DC JACK| Power supplied from the DC Jack (J23; not populated). A Schottky
diode provides back-drive protection.
P3V3 VREG| Regulated 3.3 V supply. Sources power to the P3V3 supply rail
through a back-drive protection Schottky diodel.
P3V3 K22F| K22F MCU voltage supply. Header J15 provides a convenient means for
energy consumption measurements2.
P3V3 SDA| OpenSDAv2 circuit voltage supply.
P5V USB| Nominal 5 V supplied to the I/O headers (J25 pin10).
- By default, the linear regulator (U16) is a 3.3 V output regulator. This is a common footprint that enables the user to modify the assembly to use an alternative device, such as a 1.8 V output regulator. The K22F microcontroller has an operating range of 1.71 V to 3.6 V.
- The P3V3_K22F rail is connected with two resistors, R62 and R63. To measure the energy consumption of the K22F MCU, the trace between J15 pins 1 and 2 must be first cut. A current probe or shunt resistor and voltage meter can then be applied to measure the energy consumption on these rails.
3.2 Serial and Debug Adapter version 2 (OpenSDAv2)
OpenSDAv2 is a serial and debug adapter circuit which includes an open-source
hardware design, an open-source bootloader, and debug interface software. It
bridges serial and debug communications between a USB host and an embedded
target processor as shown in Figure 4. The hardware circuit is based on a
Freescale Kinetics K20 family microcontroller (MCU) with 128 KB of embedded
flash and an integrated USB controller. OpenSDAv2 comes preloaded with the
CMSIS-DAP bootloader—an open-source mass storage device (MSD) bootloader, and
the CMSIS-DAP interface firmware (a.k.a. med interface), which provides an MSD
flash programming interface, a virtual serial port interface, and a CMSIS-DAP
debug protocol interface. For more information on the OpenSDAv2 software, see
mbed.org and https://github.com/mbedmicro/CMSIS-DAP.
OpenSDAv2 is managed by a Kinetis K20 MCU built on the ARM
Cortex-M4 core. The OpenSDAv2 circuit includes a status LED (D1) and a push
button (SW1). The push button asserts the Reset signal to the K22F target MCU.
It can also be used to place the OpenSDAv2 circuit into bootloader mode. SPI
and GPIO signals provide an interface to either the SWD debug port or the K20.
Additionally, signal connections are available to implement a UART serial
channel. The OpenSDAv2 circuit receives power when the USB connector J5 is
plugged into a USB host.
3.2.1 Debug interface
Signals with SPI and GPIO capability are used to connect directly to the SWD
of the K22F. These signals are also brought out to a standard 10-pin (0.05”)
Cortex debug connector (J11). It is possible to isolate the K22F MCU from the
OpenSDAv2 circuit and use J11 to connect to an off-board MCU. To accomplish
this, cut the trace on the bottom side of the PCB that connects J7 pin 2 to
J11 pin 4. This will disconnect the SWD_CLK pin to the K22F so that it will
not interfere with communication to an off-board MCU connected to J7.The J11
header is populated by default. A mating cable, such as a Samtec FFSD IDC
cable, can then be used to connect from the OpenSDAv2 of the FRDM-K22F to an
off-board SWD connector.
3.2.2 Virtual serial port
A serial port connection is available between the OpenSDAv2 MCU and pins PTE0
and PTE1 of the K22F.
Microcontroller
The FRDM-K22F features the MK22FN512VLH12 MCU. This 120 MHz microcontroller is
part of the Kinetis K2x family and is implemented in a 64 LQFP package. The
FRDM-K22F board also supports the MK22FN256 and MK22FN128 MCUs. Table 3
describes some of the features of the MK22FN512VLH12 MCU that is populated on
this board.
Table 3. Features of the MK22FN512VLH12
Feature | Description |
---|---|
Ultra-low power | •11 low-power modes with power and clock gating for optimal |
peripheral activity and recovery times
•Full memory and analog operation down to 1.71 V for extended battery life
•Low-leakage wake-up unit with up to three internal modules and 16 pins as
wake-up sources in low-leakage stop (LLS) and very low-leakage stop (VLLS)
modes
•Low-power timer for continual system operation in reduced power states
Flash and SRAM| •512-KB flash featuring fast access times, high reliability,
and four levels of security protection
•128 KB of SRAM
•No user or system intervention to complete programming and erase functions,
and full operation down to 1.71 V
•Flash access control to protect proprietary software
•Pre-programmed Kinetis flash loader for one-time, in-system factory
programming
Mixed-signal capability| •High-speed 16-bit ADC with configurable resolution
•Single or differential output modes for improved noise rejection
•500-ns conversion time achievable with programmable delay block triggering
•Two high-speed comparators providing fast and accurate motor over-current
protection by driving PWMs to a safe state
•Optional analog voltage reference provides an accurate reference to analog
blocks and replaces external voltage references to reduce system cost
Feature| Description
---|---
Performance| •120-MHz ARM Cortex-M4 core with DSP and FPU instruction set,
single cycle MAC, and single instruction multiple data (SIMD) extensions
•Up to 16 channel DMA for peripheral and memory servicing with reduced CPU
loading and faster system throughput
•Crossbar switch enables concurrent multi-master bus accesses, increasing bus
bandwidth
Timing and control| •Up to four FlexTimers (FTM) with a total of 20 channels
•Hardware dead-time insertion and quadrature decoding for motor control
•Four-channel 32-bit periodic interrupt timer (PIT) provides time base for
RTOS task
scheduler, or trigger source for ADC conversion and programmable delay block
Connectivity and communications| •Full-Speed USB Device/Host/On-The-Go
•USB low-voltage regulator2 that supplies up to 120 mA off-chip at 3.3 volts
to power external components from 5-volt input
•Three UARTs:
— one UART that supports RS232 with flow control, RS485, and IS07816
— two UARTs that support RS232 with flow control and RS485
•One low-power UART (LPUART)
•One Inter-IC Sound (I2S) serial interface for audio system interfacing
•Two DSPI modules and two I2C modules
Reliability, safety and security| •Cyclic redundancy check (CRC) engine
validates memory contents and communication data, increasing system
reliability
•Independently-clocked COP guards against clock skew or code runaway for fail-
safe applications such as the IEC 60730 safety standard for household
appliances
•External watchdog monitor drives output pin to safe state for external
components in the event that a watchdog time-out occurs
- The MCU populated on the FRDM-K22F comes pre-programmed with an out-of-box demo, so the flash loader is not present. To find out more information about the flash loader and how to restore it, visit freescale.com/kboot.
- Not available on K22FN128 devices.
Clocking
The Kinetis K22F MCU starts up from an internal digitally-controlled
oscillator (DCO). Software can enable the main external oscillator
(EXTAL0/XTAL0) if desired. The external oscillator/resonator can range from
32.768 kHz up to 32 MHz. The default external source for the MCG oscillator
inputs (EXTAL) is an 8 MHz crystal.Note that, unlike the MK22FN512VLH12
and MK22FN256VLH12 MCUs, the MK22FN128VLH10 MCU does not feature a Phase-
Locked Loop (PLL).
By default, the 32.768 KHz crystal is connected to the K22F MCU’s RTC
oscillator inputs.![NXP FRDM-K22FN512 Freedom Board for Kinetis K22F Hardware
- crystal for RTC](https://manuals.plus/wp-content/uploads/2023/05/NXP-FRDM- K22FN512-Freedom-Board-for-Kinetis-K22F-Hardware-crystal-for-RTC.jpg)
Universal Serial Bus (USB)
The MK22FN512VLH12 MCU features a full-speed/low-speed USB module with on-the-
go/host/device capability and built-in transceiver. The FRDM-K22F board routes
the USB D+ and D signals from the MK22FN512VLH12 MCU directly to the onboard
micro USB connector (J16).
Universal Serial Bus (USB)
When the FRDM-K22F board is operating in USB host mode, J22 must be shunted to
supply 5 V power to VBUS (J16 pin 1). The source of 5 V power can be the
OpenSDAv2 USB port (J5), pin 10 of the J25 I/O header, or P5-9V_VIN DC-DC
converter of J26.Note that, unlike the MK22FN512xxx12 and MK22FN256xxx12 MCUs, the
MK22FN128xxx10 MCU does not feature a USB voltage regulator. When evaluating
the MK22FN128VLH10 device on the FRDM-K22F board, 3 V power must be applied to
the USBVDD pin (which powers the USB transceiver on the MK22FN128 device) of
the MCU by populating R83. See Figure 10.
Secure Digital Card
An optional micro secure digital (SD) card slot is supported on the FRDM-K22F. This slot, which will accept micro format SD memory cards, is connected to the SPI signals of the MCU. The SD card detect pin is an open switch that shorts with VDD when the card is inserted. Table 4 describes the SPI signal connection details of micro SD card.Table 4. Micro SD card socket connection over SPI
Pin | Function | FRDM-K22F Connection |
---|---|---|
1 | DAT2 | No connect |
2 | CD/DAT3 | PTC4/LLWU P8/SPIO PCSO/UART1 TX/FTMO CH3/FB AD11/CMP1 OUT/LPUARTO |
TX
3| CMD| PTD2/LLWU_P13/ SPIO SOUT/UART2 RX/FTM3 CH2/FB AD4/LPUARTO RX/12C0 SCL
4| VDD| 3.3 V board supply (P3V3)
5| CLK| PTD1/ADCO SEb/SPIO SCK/ UART2 CTS b/FTM3 CH1/FB CSO b/LPUARTO CTS b
6| VSS| Ground
7| DATO| PTD3/SPIO SIN/UART2 TX/FTM3 CH3/FB AD3/LPUARTO TX/12C0 SDA
8| DAT1| No connect
Table 4. Micro SD card socket connection over SPI (continued)
Pin | Function | FRDM-K22F Connection |
---|---|---|
G1 | SWITCH | PTB16/SPI1 SOUT/UARTO RX/FTM CLKINO/FB AD17/EWM IN |
S1-S4 | S1 .S2.S3.S4 | Shield ground |
Accelerometer and Magnetometer
A Freescale FXOS8700CQ low-power, six-axis Extrinsic sensor is interfaced
through an I2 C bus and two GPIO signals, as shown in Table 5. By default, the
I2 C address is 0x1C (pull-up on SA0 and pull-down on SA1).
Table 5. Accelerometer and magnetometer signals connection
FXOS8700Q | K22F Connection |
---|---|
SCL | PTB2/ADCO SE12/12C0 SCL/UARTO RTS b/FTMO FLT3 |
SDA | PTB3/ADCO SE13/12C0 SDA/ UARTO CTS b/FTMO FLTO |
INT1 | PTDO/LLWU_P12/SPIO_PCSO/UART2_RTS_b/ |
FTM3 CHO/FB ALE/FB CS1 b/FB TS b LPUARTO RTS b
INT2| PTD1/ADCO SE5b/SPIO SCK/UART2 CTS b/FTM3 CH1/ FB CSO b/L—PUARTO CIS b
RGB LED
An RGB LED is connected through GPIO pins. Signal connections are shown in
Table 6.
Table 6. LED signal connection
RGB LED | K22F Connection |
---|---|
RED | PTA1/UARTO RX/FTMO CH6/JTAG TDI/EZP DI |
GREEN | PTA2/UARTO TX/ FTMO CH7/JTAG TDO/TRACE SWO/EZP DO |
BLUE | PTD5/SPIO PCS2/UARTO CTS b/FTMO CH5/FB AD1/ EWM OUT b/SPI1 SCK |
Serial Port
The primary serial port interface signals are PTE1 UART1_RX and PTE0 UART1_TX.
These signals are
connected to the OpenSDAv2 circuit.
Reset
The Reset signal on the K20 is connected externally to a push button, SW1, and also to the OpenSDAv2 circuit. The reset button can be used to force an external reset event on the target MCU. The reset button can also be used to force the OpenSDAv2 circuit into boot loader mode. For more details, see Section 3.2, “Serial and Debug Adapter version 2 (OpenSDAv2)”.
Push Button Switches
Two push buttons, SW2 and SW3, are available on the FRDM-K22F board. SW2 is
connected to PTC1 and SW3 is connected to PTB17. Besides the general purpose
input/output functions, SW2 can be also be used as a low-leakage wakeup (LLWU)
source.
Table 7. Push button switch connections
Switch | K22F Connection |
---|---|
SW2 | PTC1/LLWU_P6/ADC0_SE15/SPI0_PCS3/UART1_RTS_b/FTM0_CH0/FB_AD13/ I2S0_TXD0/ |
LPUART0_RTS_b
SW3| PTB17/SPI1_SIN/UART0_TX/FTM_CLKIN1/FB_AD16/EWMOUT
Debug
The debug interface on the MK22FN512VDC12 MCU is a serial wire debug (SWD)
port with trace output capability. There are two debug interfaces on the FRDM-
K22F: an onboard OpenSDAv2 circuit (J5) and a K22F direct SWD connection via a
10-pin header (J11). To use an external debugger, such as J-Link on J11, you
may need to disconnect the OpenSDAv2 SWD circuit from the K22F by removing
jumpers J13 and J10.
Add-On Modules
14.1 RF module
An optional header (J6) on the FRDM-K22F supports communication with a 2.4 GHz
nRF24L01+ Nordic radio module over SPI. Alternatively, any SPI-based device or
module can be used with this header. 14.2 Bluetooth module
An optional header (J3) on the FRDM-K22F supports communication with an add-on
Bluetooth interface, such as the JY-MCU BT V1.05 BT wireless Bluetooth module,
over a UART.
Alternatively, any serial (SCI) module can be used with this connector. Note
that the serial signals are 3 V levels and do not conform to RS-232 logic
levels, so a level shifter (like a Maxim DS3232) should be used with RS-232
devices.
Input/output Connectors
The MK22FN512VLH12 microcontroller is packaged in a 64-pin LQFP. Some pins are
used in onboard circuitry, but some are directly connected to one of the four
I/O headers (J1, J2, J24, and J25).
The pins on the K22F microcontroller are named for their general purpose
input/output (GPIO) port pin function. For example, the first pin on Port A is
referred as PTA1. The name assigned to the I/O connector pin corresponds to
the GPIO pin of the K22F.
Arduino Compatibility
Arduino Compatibility
The I/O headers on the FRDM-K22F board are arranged to enable compatibility
with peripheral boards (known as shields) that connect to Arduino and Arduino-
compatible microcontroller boards. The outer rows of pins (even numbered pins)
on the headers share the same mechanical spacing and placement with the I/O
headers on the Arduino Revision 3 (R3) standard.
References
The following references are available on www.freescale.com/FRDM-
K22F:
-
FRDM-K22F Quick Start Guide
-
FRDM-K22F Schematic, FRDM-K22F-SCH
-
FRDM-K22F Design Package
The following reference is available on www.freescale.com/kboot: -
Kinetics Flashloader
18 Revision History
Table 8. Revision history
Revision Number | Date | Substantial Changes |
---|---|---|
0 | Jul-14 | Initial release |
How to Reach Us:
Home Page:freescale.com
Web Support: freescale.com/support
Information in this document is provided solely to enable system and software
implementers to use Freescale products. There are no express or implied
copyright licenses granted hereunder to design or fabricate any integrated
circuits based on the information in this document.
Freescale reserves the right to make changes without further notice to any
products herein. Freescale makes no warranty, representation, or guarantee
regarding the suitability of its products for any particular purpose, nor does
Freescale assume any liability arising out of the application or use of any
product or circuit, and specifically disclaims any and all liability,
including without limitation consequential or incidental damages. “Typical”
parameters that may be provided in Freescale data sheets and/or specifications
can and do vary in different applications, and actual performance may vary
over time. All operating parameters, including “typical,” must be validated
for each customer application by customer’s technical experts. Freescale does
not convey any license under its patent rights nor the rights of others.
Freescale sells products pursuant to standard terms and conditions of sale,
which can be found at the following address: freescale.com/Sales Terms and
Conditions.
Freescale, the Freescale logo, and Kinetics are trademarks of Freescale
Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Extrinsic is a trademark of
Freescale Semiconductor, Inc. All other product or service names are the
property of their respective owners. ARM and Cortex are registered
trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere.
med is a trademark of ARM immitted (or its subsidiaries) in the EU and/or
elsewhere. All rights reserved. © 2014 Freescale Semiconductor, Inc.
Document Number: FRDMK22FUG
Rev. 0 07/2014
Downloaded from Arrow.com.
References
- Automotive, IoT & Industrial Solutions | NXP Semiconductors
- Free open source IoT OS and development tools from Arm | Mbed
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>