The TWR-K64F120M microcontroller module is designed
to work in either a standalone mode or as part of the
Freescale Tower System, a modular development platform
that enables rapid prototyping and tool reuse through
reconfigurable hardware. Take your design to the next level
and begin constructing your Tower System today by visiting
www.freescale.com/tower for additional Tower System
microcontroller modules and compatible peripherals. For
TWR-K64F120M-specific information and updates visit
•Dual-role USB interface with Micro-AB USB connector
•General purpose Tower Plugin (TWRPI) socket
TWR-K64F120M Tower Module, Rev. B
2Freescale Semiconductor
Page 3
Get to know the TWR-K64F120M
VBAT Options
50 MHz OSCEnable/Disable
RegulatorOptionSelector
General-purpose
TWRPI Plug-in
Accelerometer
K64 JTAG
SW1
1588
SW3
LEDs
VBAT Options
50 MHz OSC
Enable/Disable
Regulator Option
Selector
Board Power
Indicator
Potentiometer
K64 Micro-USB
RESET
OpenSDA
Debug
Power/OpenSDA
Mini-USB
•On-board debug circuit: MK20DX128VM5 open (OpenSDA) with virtual serial port
•Three axis accelerometer (MMA8451Q)
•Four user controllable LEDs
•Two user pushbutton switches for GPIO interrupts
•One user pushbutton switch for MK64FN1M0VMD12 or MK20DX128VFM5 reset
•One Potentiometer
•Independent, battery-operated power supply for Real Time Clock (RTC) and tamper detection
modules
•SD card slot
4Get to know the TWR-K64F120M
Figure 1. Front side of TWR-K64F120M module (TWRPI devices not shown)
Freescale Semiconductor3
TWR-K64F120M Tower Module, Rev. B
Page 4
Reference Documents
SD Card
Receptacle
Potentiometer
Battery Receptacle
Figure 2. Back side of TWR-K64F120M
5Reference Documents
The documents listed below should be referenced for more information on the Kinetis family, Tower
System, and MCU Modules. These can be found in the documentation section of
http://www.freescale.com/kinetis
•TWR-K64F120M-SCH: Schematics
•TWR-K64F120M-PWA: Design Package
•K64P144M120SF5RM: Reference Manual
•Tower Configuration Tool
•Tower Mechanical Drawing
6Hardware description
The TWR-K64F120M is a Tower MCU Module featuring the MK64FN1M0VMD12—a Kinetis
microcontroller in a 144 MAPBGA featuring a USB 2.0 full speed on-the-go (OTG) controller, a 10/100
Ethernet MAC with IEEE1588, hardware encryption, and tamper detection coupled with a secure real-time
clock on an independent battery supply. It is intended for use in the Freescale Tower System but can also
operate alone. The on-board OpenSDA debug circuit provides a Serial Debug interface and a power supply
input through a single mini-USB connector.
4Freescale Semiconductor
TWR-K64F120M Tower Module, Rev. B
Page 5
6.1Block Diagram
The block diagram of the TWR-K64F120M board is presented in Figure 3:
Hardware description
Figure 3. Block diagram
6.2Microntroller
The TWR-K64F120M features the MK64FN1M0VMD12 MCU. This 120 MHz microcontroller is part of
the Kinetis K6x family and is implemented in a 144 MAPBGA package. The following table notes some
of the features of the MK64FN1M0VMD12 MCU.
Table 1. Features of MK64FN1M0VMD12
FeatureDescription
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 six internal modules and sixteen pins as wake-up sources
in low-leakage stop (LLS)/very low-leakage stop (VLLS) modes
– Low-power timer for continual system operation in reduced power states
Flash and SRAM– 1024KB flash featuring fast access times, high reliability, and four levels of security protection
– 256 KB of SRAM
– No user or system intervention to complete programming and erase functions and full operation
down to 1.71 V
Freescale Semiconductor5
TWR-K64F120M Tower Module, Rev. B
Page 6
Hardware description
Table 1. Features of MK64FN1M0VMD12
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
– Three high-speed comparators providing fast and accurate motor overcurrent
protection by driving PWMs to a safe state
– Optional analog voltage reference provides an accurate reference to
analog blocks
– Two 12-bit DACs
Performance– 120MHz ARM CortexM4 core with DSP instruction set, single cycle MAC, and single instruction
multiple data (SIMD) extensions
– Up to four channel DMA for peripheral and memory servicing with reduced CPU loading and
faster system throughput
– Cross bar switch enables concurrent multi-master bus accesses, increasing bus bandwidth
– Independent flash banks allowing concurrent code execution and firmware updating with no
performance degradation or complex coding routines
Timing and Control– Four FlexTimers with a total of 12 channels
– Hardware dead-time insertion and quadrature decoding for motor control
– Carrier modulator timer for infrared waveform generation in remote control applications
– Four-channel 32-bit periodic interrupt timer provides time base for RTOS task scheduler or
trigger source for ADC conversion and programmable delay block
– One low power timer
– One independent real time clock
Connectivity and
Communications
Reliability, Safety and
Security
– Full-Speed USB Device/Host/On-The-Go with device charge detect capability
– Optimized charging current/time for portable USB devices, enabling longer battery life
– USB low-voltage regulator supplies up to 120 mA off chip at 3.3 volts to power external
components from 5volt input
– Six UARTs:
One UART supports RS232 with flow control, RS485, and ISO7816
Five UARTs support RS232 with flow control and RS485
– One Inter-IC Sound (I2S) serial interface for audio system interfacing
– Three DSPI modules and two I2C modules
– One Ethernet module with 1588
– A multi-function external bus interface (FlexBUS) controller capable of interfacing to slave-only
devices.
– A secured digital host controller (SDHC)
– One FlexCAN module
– Hardware Encryption co-processor for secure data transfer and storage. Faster than software
implementations and with minimal CPU loading. Supports a wide variety of algorithms - DES,
3DES, AES, MD5, SHA-1, SHA-256
– System security and tamper detection with secure real-time clock (RTC) and independent battery
supply. Secure key storage with internal/external tamper detection for unsecured flash,
temperature, clock, and supply voltage variations and physical attack detection
– Memory protection unit provides memory protection for all masters on the cross bar switch,
increasing software reliability
– 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 timeout occurs
– Included in Freescale’s product longevity
6Freescale Semiconductor
TWR-K64F120M Tower Module, Rev. B
Page 7
Hardware description
6.3Clocking
The Kinetis MCUs start 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 a 50 MHz. A 50 MHz Oscillator is the default external source for the MCG oscillator
inputs (XTAL/EXTAL).
A 32.768 KHz crystal is connected to the RTC oscillator inputs by default.
By populating isolation resistors, other external clock sources for the MK64FN1M0VMD12 can be used,
including the CLKIN0 signal that can be provided by either pin B24 on primary TWR-ELEV or pin 20 of
TWRPI connector J3.
6.4System Power
When installed into a Tower System, the TWR-K64F120M can be powered from either an on-board source
or from another source in the assembled Tower System.
In standalone operation, the main power source (5.0 V) for the TWR-K64F120M module is derived from
either the OpenSDA USB mini-B connector (J2) or the MK64FN1M0VMD12 USB micro-AB connector
(J17). Two low dropout regulators provide 3.3 V and 1.8 V supplies from the 5.0 V input voltage.
Additionally, the 3.3 V regulator built into the MK64FN1M0VMD12 MCU can be selected to power the
3.3 V bus. All the user selectable options can be configured using two headers, J18, J19, and J29. Refer to
sheet 4 and 5 of the TWR-K64F120M schematics for more details.
6.5DryIce and RTC VBAT
The DryIce tamper detection module and the Real Time Clock (RTC) module on the
MK64FN1M0VMD12 have two modes of operation: system powerup and system powerdown. During
system powerdown, the tamper detection module and the RTC are powered from the backup power supply
(VBAT) and electrically isolated from the rest of the MCU. The TWR-K64F120M provides a battery
receptacle for a coin cell battery that can be used as the VBAT supply. The receptacle can accept common
20mm diameter 3 V lithium coin cell batteries.
6.6Debug Interface
There are two debug interface options available: the on-board OpenSDA circuit and an external ARM
JTAG connector. The ARM JTAG connector (J5) is a standard 2x10pin connector, with one pin keyed, to
allow an external debugger access to the JTAG interface of the MK64FN1M0VMD12. Alternatively, the
on-board OpenSDA debug interface can be used to access the debug interface of the
MK64FN1M0VMD12.
6.7OpenSDA
An on-board MK20DX128VFM5 based Open-Standard serial and debug adapter (OpenSDA) circuit
provides a JTAG debug interface to the MK64FN1M0VMD12. A standard USB A male to mini-B male
cable (provided) can be used for debugging via the USB connector (J2). The OpenSDA interface also
provides a USB to serial bridge. Drivers for the OpenSDA interface are provided in the P&E Micro
Freescale Semiconductor7
TWR-K64F120M Tower Module, Rev. B
Page 8
Hardware description
OpenSDA Tower Toolkit. These drivers and more utilities can be found online at
http://www.pemicro.com/opensda.
6.8Cortex Debug Connector
The Cortex Debug connector is a 20pin (0.05") connector providing access to the SWD, JTAG, EzPort
signals available on the K64 device. The pinout and K64 pin connections to the debug connector (J5) are
shown in the following table.
An MMA8451Q digital accelerometer is connected to the MK64FN1M0VMD12 MCU through an I2C
interface (I2C1) and GPIO/IRQ signals (PTA6 and PTA8).
8Freescale Semiconductor
TWR-K64F120M Tower Module, Rev. B
Page 9
Hardware description
6.10Potentiometer, Pushbuttons, LEDs
The TWR-K64F120M also features:
•A potentiometer connected to an ADC input signal (ADC1_SE18).
•Two pushbutton switches (SW1 and SW3 connected to PTC6 and PTA4, respectively)
•Four user controllable LEDs connected to GPIO signals (optionally isolated using jumpers):
— Yellow/Green LED (D5) to PTE6
— Yellow LED (D6) to PTE7
— Orange LED (D7) to PTE8
— Blue LED (D9) to PTE9
6.11General Purpose Tower Plug-in (TWRPI) Socket
The TWR-K64F120M features a socket (J3 and J4) that can accept a variety of different Tower Plugin
modules featuring sensors, RF transceivers, and other peripherals. The General Purpose TWRPI socket
provides access to I2C, SPI, IRQs, GPIOs, timers, analog conversion signals, TWRPI ID signals, reset,
and voltage supplies. The pinout for the TWRPI Socket is defined in Tab le 3.
Table 3. General Purpose TWRPI Socket Pinout
J4J3
PinDescriptionPinDescription
15 V VCC1GND
23.3 V VCC2GND
3GND3I2C: SCL
43.3 V VDDA4I2C: SDA
5VSS (Analog GND)5GND
6VSS (Analog GND)6GND
7VSS (Analog GND)7GND
8ADC: Analog 08GND
9ADC: Analog 19SPI: MISO
10VSS (Analog GND)10SPI: MOSI
11VSS (Analog GND)11SPI: SS
12ADC: Analog 212SPI: CLK
13VSS (Analog GND)13GND
14VSS (Analog GND)14GND
15GND15GPIO: GPIO0/IRQ
16GND16GPIO:GPIO1/IRQ
17ADC: TWRPI ID 017UART: UART_RX or GPIO: GPIO2
Freescale Semiconductor9
TWR-K64F120M Tower Module, Rev. B
Page 10
Hardware description
Table 3. General Purpose TWRPI Socket Pinout
18ADC: TWRPI ID 118UART: UART_TX or GPIO: GPIO3
19GND19UART: UART_CTS or GPIO: GPIO4/Timer
20Reset20UART: UART_RTS or GPIO: GPIO5/Timer
6.12USB
The MK64FN1M0VMD12 features a fullspeed/lowspeed USB module with OTG/Host/Device capability
and built-in transceiver. The TWR K64F120M routes the USB D+ and D signals from the
MK64FN1M0VMD12 MCU directly to the on-board microUSB connector (J17).
A power supply switch with an enable input signal and overcurrent flag output signal is used to supply
power to the USB connector when the MK64FN1M0VMD12 is operating in host mode. Port pin PTC8 is
connected to the flag output signal and port pin PTC9 is used to drive the enable signal. Both PTC8 and
PTC9 port pins can be isolated with jumpers (J23 and J26, respectively) if needed.
6.13Secure Digital Card Slot
A Secure Digital (SD) card slot is available on the TWR-K64F120M connected to the SD Host Controller
(SDHC) signals of the MCU. This slot will accept standard format SD memory cards. See the following
table for the SDHC signal connection details.
The device features a multi-function external bus interface called Flexbus, which is capable of interfacing
to slave-only devices.. The FlexBus interface is not used directly on the TWR-K64F120M. Instead, a
subset of the FlexBus signals are connected to the Primary Connector on the TWR-ELEV so that the
external bus can access devices on Tower peripheral modules. Refer to sheet 8 of the TWR-K64F120M
schematic for more detail.
6.15Ethernet and 1588
The MK64FN10MVDC12 features a 10/100 Mbps Ethernet MAC with MII and RMII interfaces. The
TWR-K64F120M routes MII/RMII interface signals from the K64 MCU to the Primary Connector which
allows a connection to an external Etherent PHY that can be found on some Tower peripheral modules.
When the K64 Ethernet MAC is operating in RMII mode, synchronization of the MCU clock and the 50
MHz RMII transfer clock is important. The MCU input clock must be kept in phase with the 50 MHz clock
supplied to the external PHY. Therefore, the TWR-K64F120M provides the option (see Table 5, Ethernet
operation jumper settings) to clock the MCU from an external clock from CLKIN0 pin on the Primary
Connector. The Tower peripheral module implementing the RMII PHY device should drive a 50 MHz
clock on the CLKIN0 pin that is kept in phase with the clock supplied to the RMII PHY.
The TWR-SER1 module that comes as part of the TWR-K64F120M-KIT provides a 10/100 Ethernet PHY
that can operate in either MII or RMII mode. By default, the PHY is boot strapped to operate in MII mode;
therefore, jumper configuration changes may be required. Table shows the settings for proper
interoperability between the Ethernet interface on the TWR-SER and the TWR-K64F120M.
Table 5. Ethernet operation jumper settings
Tower ModuleJumperSetting
TWR-K64F120MJ32ON
—J33OFF
TWR-SERJ23-4
—J32-3
—J119-10
6.16TWR-K64F120M Jumper Options and Headers
The following is a list of all the jumper options on the TWR-K64F120M. The default installed jumper
settings are indicated by white text on a black background.
OptionJumperSettingDescription
Freescale Semiconductor11
Table 6. Jumper options and headers
TWR-K64F120M Tower Module, Rev. B
Page 12
Hardware description
Table 6. Jumper options and headers
50MHz Clock OSC powerJ331-2Enable V_BRD power supply to 50MHz OSC
J321-2Disable V_BRD power supply to 50MHz OSC
JTAG Board Power Selection J14ONConnect 5V output (P5V_TRG_USB)
to JTAG port (supports powering board from
JTAG pod supporting 5V supply output)
OFFDisconnect OSJTAG 5V output
(P5V_TRG_USB) from JTAG port
UART4_TXJ36ONConnect PTE24 as UART4_TX to Secondary TWR_ELEV
OFFDisconnect PTE24 as UART4_TX to Secondary TWR_ELEV
UART4_RXJ27ONConnect PTE25 as UART4_RX to Secondary TWR_ELEV
OFFDisconnect PTE25 as UART4_RX to Secondary TWR_ELEV
SDHC_WP / UART4_RTS_BJ34ONConnect PTE27 as UART4_RTS_B to Secondary TWR_ELEV
or as SDHC_WP to SD card slot as write protect signal
OFFDisconnect PTE27 as UART4_RTS_B to Secondary
TWR_ELEV or as SDHC_WP to SD card slot as write protect
signal
GPIO3_ELEVJ35
ONConnect PTE28 as General Purpose IO to TWR_ELEV
OFFDisconnect PTE28 as General Purpose IO to TWR_ELEV
UART_CTS / RTC_CLKOUT/
1588_CLKIN
J31ONConnect PTE26 as UART_CTS to Secondary TWR_ELEV or
as RTC_CLKOUT to primary TWR_ELEV or as Clock input for
1588
OFFDisconnect PTE26 as UART_CTS to Secondary TWR_ELEV
or as RTC_CLKOUT to primary TWR_ELEV or as Clock input
for 1588
TAMPER0J21
ONConnect Tamper0 signal to test point
OFF
K64 VREG IN SelectorJ191-2VBUS Signal on micro_USB connector J17 connects to
K64_VREGIN to allow standalone USB operation
2-3VBUS signal from TWR ELEV connector connects to
K64_VREGIN to allow USB operation with complete Tower
System
3.3 V Voltage Regulator Input
Selector
J18
1-2Output of USB power switch controlled by the VTRG_EN
signal from the K20 MCU. Provides input to 3.3V regulator.
2-3Output of USB power from primary elevator Pin A57 to 3.3V
regulator.
5-6Output of USB power from K64 VREGIN to 3.3 regulator
12Freescale Semiconductor
TWR-K64F120M Tower Module, Rev. B
Page 13
Hardware description
Table 6. Jumper options and headers
Board Power SelectorJ291-2Connect K20 USB regulator output (VOUT_3V3) to on-board
supply (V_BRD)
3-4Connect K64 USB regulator output (VOUT_3V3) to on-board
supply (V_BRD)
5-6Connect 3.3V on-board regulator output (P3V3) to on-board
supply (V_BRD)
7-8Connect 1.8 V on-board regulator output (P1V8) to on-board
supply (V_BRD)
MCU Power connectionJ28ONConnect on-board 3.3V or 1.8V supply (V_BRD) to MCU VDD
OFFDisconnect on-board 3.3V or 1.8V supply (V_BRD) to MCU
VDD
MCU Power VDDA for current
measurement
J22
ONConnect MCU_PWR (3.3V or 1.8V) to VDDA and VREFH
OFFDisconnect MCU_PWR (3.3V or 1.8V) to VDDA and VREFH
VBAT Power SourceJ201-2Connect VBAT to on-board 3.3 V or 1.8 V supply
2-3Connect VBAT to the higher voltage between MCU supply
(MCU_PWR) or coin cell supply (VBATD)
Accelerometer IRQ ConnectionJ7ONConnect PTA8 to INT2 pin of accelerometer
J8ONConnect PTA6 to INT1 pin of accelerometer
OFFDisconnect PTA6 and/or PTA8 from INT1 and/or INT2 of
accelerometer
External Pull down on SDHC D3J13ONExternal 10K ohm Pull down on SDHC_D3
OFFNo pull down on SDHC_D3
LED connectionsJ301-2Connect PTE6 to Yellow/Green LED (D5)
3-4Connect PTE7 to Yellow LED (D6)
5-6Connect PTE8 to Orange LED (D7)
7-8Connect PTE9 to Blue LED (D8)
5V power selectionJ381-2Connect 5V power from OpenSDA (mini USB) to power switch
MIC2026
2-3Connect 5V power from Elevator to power switch MIC2016
Micro USB power enableJ26
Micro USB overcurrent flagJ23
Micro USB ID selectionJ25
Freescale Semiconductor13
ONConnect PTC9 to USB power enable on power switch
MIC2026
OFFDisconnect PTC9 from USB power enable on power switch
MIC2026
ONConnect PTC8 to overcurrent flag on power switch MIC2026
OFFDisconnect PTC8 from overcurrent flag on power switch
MIC2026
ONUSB Host / Device ID selection is controlled by PTE12
OFFNo ID selection USB Host / Device
TWR-K64F120M Tower Module, Rev. B
Page 14
Useful links
Table 6. Jumper options and headers
Potentiometer connectionJ24ONConnect potentiometer to ADC1_SE18
OFFDisconnect potentiometer from ADC1_SE18
General Purpose TWRPI
V_BRD power enable
GPIO RESET_OUT_B connectionJ1
Target MCU UART1_RX output
selection
Target MCU UART1_TX output
selection
SWD_CLK_TGTMCU output
selection
Reset selection for SW2 Reset buttonJ16
J6ONConnect on-board 1.8 V or 3.3 V supply (V_BRD) to TWRPI
J101-2Connect MCU’s UART1_RX to OpenSDA virtual COM RX port
J151-2Connect MCU’s UART1_TX to OpenSDA virtual COM TX port
J39ONEnable the SWD_CLK_TGTMCU connection between the
3V power (GPT_VBRD)
OFFDisconnect fromboard 1.8 V or 3.3 V supply (V_BRD) to
TWRPI 3V power (GPT_VBRD)
1-2Connect PTB7 to RESET_OUT_B signal
2-3RESET_OUT_B signal resets the target MCU
2-3Connect MCU’s UART1_RX to primary Elevator (A41)
UART0_RX
2-3Connect MCU’s UART1_RX to primary Elevator (A42)
UART0_RX
OpenSDA and target MCU
OFFIsolate the SWD_CLK_TGTMCU connection between the
OpenSDA and target MCU
1-2Connect the reset button to target MCU before level shifter
2-3Connect the reset button to target MCU without passing
through level shifter
7Useful links
www.freescale.com/twr-k64f120m
www.iar.com/freescale
www.pemicro.com
www.pemicro.com/opensda
www.freescale.com/codewarrior
www.segger.com
www.segger.com/jlinkflashdownload.html
TWR-K64F120M Tower Module, Rev. B
14Freescale Semiconductor
Page 15
Useful links
Freescale Semiconductor15
TWR-K64F120M Tower Module, Rev. B
Page 16
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 “typicals,” 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/SalesTermsandConditions.
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Tower is a trademark of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners.