FRDM-K64F
The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.
Overview¶
The Flagship FRDM-K64F has been designed by NXP in collaboration with mbed for prototyping all sorts of devices, especially those requiring optimized size and price points. The board is well sized for connected applications, thanks to its power efficient Kinetis K64F MCU featuring an ARM® Cortex®-M4 core running up to 120MHz and embedding 1024KB Flash, 256KB RAM and lots of peripherals (16-bit ADCs, DAC, Timers) and interfaces (Ethernet, USB Device Crystal-less and Serial). The Kinetis K64 MCU family remains fully software, hardware and development tool compatibility with Kinetis MCU and Freedom board families. It is packaged as a development board including extension headers compatible with Arduino R3 shields and includes a built-in USB Debug and Flash Programmer.
MCU Features¶
- Kinetis MK64FN1M0VLL12 in 100LQFP
- Performance
- ARM® Cortex™-M4 32-bit core with DSP instructions and Floating Point Unit (FPU)
- 120 MHz max CPU frequency
- Memories and memory interfaces
- 1024 KB program flash memory
- 256 KB RAM
- FlexBus external bus interface
- System peripherals
- Multiple low-power modes, low-leakage wake-up unit
- 16-channel DMA controller
- Clocks
- 3x Internal Reference Clocks: 32KHz, 4MHz and 48MHz
- 2x Crystal inputs: 3-32MHz (XTAL0) and 32kHz (XTAL32/RTC)
- PLL and FL
- Analog modules
- 2x 16-bit SAR ADCs up 800ksps (12-bit mode)
- 2x 12-bit DACs
- 3x Analog comparators
- Voltage reference 1.13V
- Communication interfaces
- 1x 10/100 Mbit/s Ethernet MAC controller with MII/RMII interface IEEE1588 capable
- 1x USB 2.0 Full-/Low-Speed Device/Host/OTG controller with embedded 3.3V/120mA Vreg, and USB device Crystal-less operation
- 1x Controller Area Network (CAN) module
- 3x SPI modules
- 3x I2C modules. Support for up to 1 Mbit/s
- 6x UART modules
- 1x Secure Digital Host Controller (SDHC)
- 1x I2S module
- Timers
- 2x 8-channel Flex-Timers (PWM/Motor control)
- 2x 2-channel FlexTimers (PWM/Quad decoder)
- 32-bit PITs and 16-bit low-power timers
- Real-Time Clock (RTC)
- Programmable delay block
- Security and integrity modules
- Hardware CRC and random-number generator modules
- Hardware encryption supporting DES, 3DES, AES, MD5, SHA-1 and SHA-256 algorithms
- Operating Characteristics
- Voltage range: 1.71 to 3.6 V
- Flash write voltage range: 1.71 to 3.6 V
Board Features¶
- Onboard Components
- FXOS8700CQ - 6-axis combo Sensor Accelerometer and Magnetometer
- 2 user push-buttons
- RGB LED
- Connectivity
- USB full-/low-speed On-the-Go/Host/Device controller with on-chip transceiver, 5 V to 3.3 V regulator and micro-USB connector
- Ethernet 10/100 controller with on-board transceiver and RJ45 connector
- up to 5x UARTs, 2x SPIs, 2x I2Cs and 1x CAN connected to Headers (multiplexed peripherals)
- Extensions
- Micro SD-Card Socket
- Headers compatible with Arduino R3 shields (32-pins / outter row)
- Headers for proprietary shields (32-pins / inner row)
- Analog and Digital IOs (multiplexed peripherals)
- up to two ADC 16-bit resolution with 24 Analog I/O Pins connected to Headers
- up to three timers with 18 PWM signals accessible from Headers
- up to six Comparator Inputs or one DAC Output
- up to 40 MCU I/O Pins connected to Headers (3.3v, 4mA each, 400mA max total)
- Board power-supply options (onboard 5 to 3.3V regulator)
- USB Debug 5V
- USB Target 5V
- 5-9V Vin on Arduino headers
- 5V PWR input
- Coin-cell 3.3V
- Integrated OpenSDA USB Debug and Programming adapter
- Several industry standard Debug interfaces (PEmicro, CMSIS-DAP, JLink)
- Drag-n-drop MSD Flash-programming
- Virtual USB to Serial Port
- Form factor: 3.2” x 2.1” / 81mm x 53mm
- Software Development Tools
- mbed HDK & SDK enabled
- Online development tools
- Easy to use C/C++ SDK
- Lots of published libraries and projects
- Alternate Offline options NXP free KDS (compiler toolchain) and KSDK library/examples
- Supplier website: http://www.nxp.com/frdm-k64F
- Status
- Production
Board Block Diagram¶
The graphic below gives an overview of the board features and the connection between the target MCU and the on-board components and connectors
Board Pinout¶
Component Pinout¶
Following figure indicates the Kinetis K64F signal connections with the board components (RGB LED, Motion Sensor) and extension connectors (uSD Card, Bluetooth and RF headers).
Arduino and NXP Header Pinout¶
Freedom board headers enable up to 64-pins and give access to most of the Kinetis K64F signals
- Outer row pins deliver right signals to meet Arduino R3 standard
- Inner row is connected to up to 32 additional Kinetis K64F pins
Important Notes
- SPI Slave - Please note that on this MCU in SPI Slave mode pins labeled MOSI behave as Slave Output and pins labeled MISO behave as Slave Input. The terms MOSI (Master Out Slave In) and MISO (Master In Slave Out) only apply to Master mode.
- PWM - Please note that the MCU does not support periods of 100 ms. Please consult the MCU reference manual for supported periods.
The FRDM-K64F is fully supported in the mbed platform, so it gets access to the free tools and SDK that provides experienced embedded developers with powerful and productive tools for building proof-of-concepts. The pinout above shows the commonly used interfaces and their locations. Note that all the numbered pins (PT_XX) can also be used as DigitalIn and DigitalOut interfaces.
Pin names¶
PC Configuration¶
Your mbed Microcontroller can appear on your computer as a serial port. On Mac and Linux, this will happen by default. For Windows, you need to install a driver:
Windows
See Windows-serial-configuration for full details about setting up Windows for serial communication with your mbed Microcontroller
From a host PC to communicate with mbed you will need a terminal application
. This allows the mbed Microcontroller to print to your PC screen, and for you to send characters back to your mbed.
- Terminals - Using Terminal applications to communicate between the Host PC and the mbed Micrcontroller
Some terminal programs (e.g. TeraTerm) list the available serial ports by name. However, if you do need to know the identity of the serial port so that you can attach a terminal or an application to it:
Debug Interface Firmware Update¶
A new interface firmware image is necessary to mbed-enable NXP FRDM boards
The latest Arm Mbed DAPLink interface firmware for FRDM-K64F is available at (click the image):
Step by step firmware upgrade instructions
Source: https://github.com/ARMmbed/DAPLink
Get Started with mbed¶
First board connection¶
Use the USB lead to connect your mbed to a PC. The status light will come on, indicating it has power. After a few seconds of activity, the PC will recognise the mbed Microcontroller as a standard USB drive.
Windows XP example | Mac OS X example |
Connect to mbed¶
Go to the new USB Drive, and click MBED.HTM to open it in a web browser.
If you do not have an mbed account, choose "Signup", and create your mbed Account. Otherwise, log in with your normal username and password.
This will give you access to the website, tools, libraries and documentation.
Flash a project binary¶
1. Download a (.bin) to the FRDM Platform¶
Download the appropriate "Hello World!" binary:
- NXP FRDM-K64F: HelloWorld_K64F.bin
Note: the source code for this program will be seen in the next section.
Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB disk. The Status LED will flash as the PC writes the file to the Microcontroller disk.
2. Press the Reset Button¶
When the Reset Button in pressed, the newest program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens.
When the program is has been loaded onto the microcontroller, it will then start it running.
3. Run Hello World!¶
The Microcontroller is now running the program; flashing LED1 forever! If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart.
4. Flash a new precompiled program¶
It is the newest program on the mbed Microcontroller that is run after reset. We can therefore download a new program or overwrite an existing one to update the program that will run.
Open existing Project¶
1. Import the Program to your mbed compiler¶
Select Import As Program
Choose Import Name of your preference
Click on Import
Import programmbed_blinky
The example program for mbed pin-compatible platforms
2. Compile the Program¶
In the right panel Program Workspace Select the program you want to compile
Click on Compile in toolbar
If compilation ends successfully, you should see the comment Success! displayed in the Compile Output window available in the bottom and your web browser should download automatically the precompiled binary for the program.
3. Download a (.bin) to the FRDM Platform¶
Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB disk. The Status LED will flash as the PC writes the file to the Microcontroller disk.
4. Press the Reset Button¶
When the Reset Button in pressed, the newest program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens.
When the program is has been loaded onto the microcontroller, it will then start it running.
5. Run the Program¶
The Microcontroller is now running the program; flashing LED1 forever! If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart.
Program Examples
Congratulation, you have successfully compiled your first project example, you will find more program examples for the FRDM-K64F board available on the right panel of this page or at the NXP and FRDM-K64F code repositories
Create new Project¶
Follow the guide to creating your own programs using the online compiler
Technical Doc¶
FRDM-K64F Board¶
Kinetis K64F MCU¶
- Data Sheet
- Reference Manual
- Errata
- AN4470 - Using Low-Power Modes with Kinetis MCUs
- AN5083 - Using DMA for pulse counting
- AN4373 - Cookbook for SAR ADC
- AN4381 - FlexTimer configuration
FXOS8700 Motion Sensor¶
Software Materials¶
FRDM-K64F Interface Firmware / OpenSDA Application¶
K64F Freedom Sensor Libraries and Examples¶
- FXOS8700Q - 6 Axis combination Accelerometer / Magnetometer for eCompass
FXOS8700Q Driver Library and Example program
- eCompass - A basic eCompass using the on board FXOS8700Q
eCompass Library for Cortex M4F and eCompass Example program
- Differential A2D - Library and example to use the 16 Bit Differential A2D on the K64
Differential A2D Library for K64F and Differential A2D Example program
Supported NXP Freedom shields¶
Supported Seeed Studio Grove extension modules¶
SEEED STUDIO has recently launched a new family called GROVE of compact Connectivity and Sensor modules, much cheaper (starting $2.90) and smaller than Arduino shields.Up to now the Seeed Grove portfolio includes more than 100 extension solutions!!
Several Grove adapters are available for the major MCU platforms of the market like Arduino, Rasbperry-Pi... to extend your MCU/MPU board with up to 16 grove analog or digital modules. To connect the Grove modules to the FRDM-K64F, we are going to use the Grove Shield v2 compatible with Arduino board pinout.
The mbed repository for the Grove modules covers today 37x Modules with Program Examples and Libraries, which should be easily ported (automatically) for the FRDM-K64F.
Please find below the list of the Program Examples tested with the FRDM-K64F
Sensors¶
Freedom Grove Temperature and Humidity Sensor Example
Collect the Temperature and Humidity measurements and push them to the PC via the Serial interface (instructions available).
Freedom Grove Light Sensor Example
Collect the Light measurements and push them to the PC via the Serial interface (instructions available).
Freedom Grove Collision Sensor Example
Collect the Collision measurements and push a message to the PC via the Serial interface (instructions available).
Freedom Grove PIR Sensor Example
Collect the Motion detection and push the number of detection since last reset to the PC via the Serial interface (instructions available).
Freedom Grove Alcohol Sensor Example
Display in the hyperterminal the measurements of the alcohol sensor (instructions available).
User Interfaces¶
Freedom Grove Vibration Example
Control a motor to emit vibrations (instructions available).
Freedom Grove Relay Example
Control a Relay using the user push-button from the MCU board (instructions available).
Freedom Grove Joystick Example
Display in the Hyperterminal the position of the Joystick (instructions available).
Freedom Grove 4-digit Display Example
Display on a 4-digit screen a clock example (instructions available).
Supported Mikroelektronika Click extension modules¶
MIKROELEKTRONIKA introduced few years ago a new family called CLICK of compact Connectivity and Sensor modules, much cheaper (starting $5) and smaller than Arduino shields. Up to now the Mikroe Click portfolio includes more than 200 extension solutions!!
Several Click Shields are available for the major MCU platforms of the market like Arduino, Rasbperry-Pi... to extend your MCU/MPU board with up to 16 grove analog or digital modules. To connect the Click modules to the FRDM-K64F, we are going to use the Mikroe FRDM-K64F Click SHIELD compatible with Arduino board pinout.
Please find below the list of the Program Examples tested with the FRDM-K64F
User Interfaces¶
Freedom Click Relay Example
Control two Relays using the user push-buttons from the MCU board (instructions available).
Where to buy¶
You need to log in to post a discussion
Discussion topics
See more related discussion topicsQuestions
5 years, 6 months ago