This Freescale Freedom board is based on the K64FN1M0VLL2 which is a 120MHz device from the performance and integration K64 family with Cortex-M4 core, Ethernet and USB. This K64 device has 1M Flash and 256k SRAM and is in an 100 pin LQFP package, whereby the K64 is also available in 144 pin LQFP/MAPBGA or 121 pin XFBGA and its memory ranges from 512k...1M Flash with 256k SRAM. There is a 50MHz ocillator on the board for clocking the part from the Ethernet PHY. The K64 supports crystal-less FS USB device based on its internal 48MHz IRC48M oscillator and USB clock recovery.

Full details and documentation for this board can be obtained from the Freescale web site: FRDM-K64F

To configure the µTasker project for this board simply enable the define FRDM_K64F in the project's config.h file. The compiler needs to be set to build for Cortex M4 (and not Cortex M0+) and the linker script K_1M_256.ld should be selected [K_1M_256_BM.ld for downloadable version] {the linker script extension may vary for different compilers, whereby *.ld is valid for GCC}

FRDM-K64F Binaries

Here are some binary files that can be loaded to the board. These were built using the µTasker applications (serial loader and V1.4 application) and can be simply generated using the supported compilers/IDEs [these were built using GCC], built using different configuration options or modified to suit specific requirements or hardware derived from this board :

  • uTaskerSerialBoot_FRDM-K64F_KBOOT_HID_UART_MSD_SDHC.bin KBOOT compatible USB-HID loader with composite USB-MSD loading, as well as KBOOT UART loading on UART 0 at 57'600 Baud, or from an inserted SD card [23.9k] allowing applications to be loaded at link address 0x8080 (using Freescale's KBOOT USB connection, or KBOOT UART at 57'600 Baud or USB-MSD when the board appears as upload hard disk or as a file on the SD card). When operating, the orange LED blinks at 5Hz. To force the loader, reset the board with push button SW2 held down. To disable the watchdog, reset the board with push button SW3 held down.
    This can be loaded using the FRDM-K64F's USB-MSD (OpenSDA) boot loader. Note that the loader limits application sizes to 130k - it can be built without limits using the µTasker project. The USB device operation uses the crystal-less USB mode.
    The serial interface used is connected to the OpenSDA's USB virtual COM port.
    When forcing the boot loader, hold the switch for about 5s; this ensures that the application is not started once the SD card check has completed.
  • uTaskerV1.4.8_FRDM-K64F_8080.bin FRDM-K64F application with command-line menu on the UART 0 (via the OpenSDA's USB virtual COM port connection at 115'200 Baud) with various menu items. Output from the on-board accelerometer can be viewed in the I2C menu. The USB device is USB-MSD and so the board appears as a hard drive to the PC when the SD card is inserted into the socket on the board. Files can then be read and written to the SD card from the PC and also worked with via the DOS-like command line interface in the disk-interface sub-menu.
    The processor runs at 120MHz and the USB device makes use of the crystal-less mode. [61k].
    Linked to 0x8080, this binary image can be loaded with drag-and-drop onto the upload disk that appears when the serial loader is operating or using the KBOOT loader's USB or UART connections. When the application is running, the yellow LED blinks at 2.5Hz.
    Low power modes can be set in the application menu and wakeup from the low-leakage power mode (LLS) is achieved by pressing SW2, which temporarily allows the processor to run and respond with a message before automatically returning to the low-leakage power mode. Push button switch SW3 can be used to wake the processor back to its fully operational state. More details of this operation can be found in Low-Leakage Wakeup (LLWU) Support.
    Note that Ethernet is not included in this application because it doesn't allow the low-leakage mode to be used. A version with Ethernet is further below.
  • software.bin The same FRDM-K64F application that can be copied to the SD card and will be loaded to the procesor when the board starts (the name is required for it to be recognised - see the Serial Loader User's Guide for more details).
  • uTaskerV1.4.8_FRDM-K64F.bin The same FRDM-K64F application as stand-alone software that can be loaded using the FRDM-K64F's USB-MSD (OpenSDA) boot loader [62.1k].

  • The following versions are including Ethernet application (TELNET, FTP server, Web server etc. - default IP that can be configured on the command line interface) - the operation is otherwise the same as as the application above, apart from the fact that the low-leakage power modes cannot be used.
  • uTaskerV1.4.8_FRDM-K64F_LAN_8080.bin [104k]
  • software_LAN.bin (rename to software.bin for SD card loading) [104k]
  • uTaskerV1.4.8_FRDM-K64F_LAN.bin [105k]
The Web server will first look for a start page on the SD card called "index.htm" in a director called "web". If the SD card is not inserted, or the directory/file not exist it will fall back to using files from the µFileSystem in internal Flash. The following set of internal web pages can be loaded to the board by executing the file "Copy_all.bat". This will open an FTP connection to the board (edit the IP address in the file if a different IP address is used) and automatically copy the list of files in "ftp.txt". Alternatively the copy can be performed manually with an FTP client. After loading, the web server will work with these files rather than showing a 404 error when there is no content.

Serial Boot Loader with Ethernet Web Server, USB-MSD, KBOOT-USB-HID, UART SREC

The following µTasker serial loader version is configured to include Ethernet web server loading operation instead of SD card loading. When the FRDM-K64F is set to the serial loader mode it includes a web server that is contactable on the fixed address IP Once connected from the browser of your choice it displays whether application software is loaded or not, giving the capability to delete an exiting application and upload binary files linked to the address 0x8080 (see application above). Details of the web server loader operation and passwords to perform application erases and execute a mass erase are included in the µTasker Serial Loader User's Guide.
This serial loader configuration also supports USB-MSD, KBOOT compatible USD-HID and KBOOT UART (57'600 Baud) modes.

USB-CDC with 5 UARTs

The following µTasker V1.4 application configures for a 5 USB-CDC interface composite device by enabling USB-CDC and setting the define for USB_CDC_COUNT to 5, the maximum number of usable UARTs on the FRDM-K64F. The first interface (0) is connected to the command line shell (as is UART0 - the UART connected to the OpenSDA virtual COM port connection) but can be commanded to a USB-UART0 bridge in the USB menu. The other 4 USB-CDC interfaces perform dedicated USB-UART bridges as follows:
CDC Interface 1 - UART 1 (UART1_TX = PTC4 [J2-4], UART1_RX = PTC3 [J1-16])
CDC Interface 2 - UART 2 (UART2_TX = PTD3 [J2-10], UART2_RX = PTD2 [J2-8])
CDC Interface 3 - UART 3 (UART3_TX = PTB11 [J4-8], UART3_RX = PTB10 [J4-6])
CDC Interface 4 - UART 4 (UART4_TX = PTC15 [J199-4], UART4_RX = PTC14 [J199-3] - Bluetooth connector)

USB-MSD with SD card, internal Flash disk and external SPI-Flash disk

The following µTasker V1.4 application configures for a USB-MSD device with SD card support (USB_INTERFACE, USE_USB_MSD and SDCARD_SUPPORT). This enables the utFAT on the SD card and makes it accessible from a USB host, with support for the interface in the disk interface menu as disk D. Additionally, the define FLASH_FAT is enabled to add a second disk using the K64F's internal Flash (last 512k) which an be accessed at the disk menu as disk E and also appears as a second hard drive to the USB host. Finally, the define SPI_FLASH_FAT is enabled to add an external SPI Flash which can be accessed at the disk menu as disk F and appears as third hard drive to the USB host.
In case there is no SPI Flash attached it doesn't disturb the overall operation since the USB host knows that the medium is "not inserted".
In order to add an SPI Flash the AT45DB161E should be used and connected as follows:
  • SPI0_PSC0 - PTD0 - AT45DB161E CS
  • SPI0_SCK - PTD1 - AT45DB161E CLK
  • SPI0_SOUT - PTD2 - AT45DB161E DIN
  • SPI0_SIN - PTD3 - AT45DB161E DOUT

FRDM-K64F nRF24L01+ and LCD

This application shows the FRDM-K64F using the Nordic Semiconductor 2.4GHz wireless transceiver nRF24L01+ as either master (primary Tx) or slave to another device. It initialises the transceiver on channel 15 at 1Mb/s with auto-ack enabled. Then messages are sent out once every 5s so that they can be received by other devices on the channel with the same configuration and echoed responses are displayed on the UART (OpenSDA virtual COM). As slave it will display receptions on its UART output and echoes modified data back to the master.

Use together with another FRDM-K64F as master/slave pair or any other of the Kinetis boards with a binary available for this configuration.

To build for this configuration the nRF24L01P+ interface is enabled by the define nRF24L01_INTERFACE in config.h.

The FRDM-K64F has a socket (may need mounting) which allows the nRF24L01+ module to be directly connected to the board.

The default mode is master (primary Tx). To set slave mode connect the input PTB19 (J1-3) to GND at reset.

Furthermore the FRDM-K64F drives a 2 x 16 character LCD in 4-bit mode, connected on the following ports:

  • LCD 4-bit data bus - PTC10, PTC9, PTC8, PTC7
  • LCD RS control - PTC0
  • LCD_WR - PTC1
  • LCD_EN - PTC2
  • LCD_Backlight - PTC5

To add the LCD operation the define SUPPORT_LCD is enabled with the options #define LCD_LINES 2 and #define LCD_CHARACTERS 16, whereby a range of 1 x 8 to 4 x 40 is supported. The simulation of this configuration is shown in the screen shot below and an executable is provided - this requires no installation and can be started by extracting and simply executing the file uTaskerV1.4.8_FRDM-K64F_RF_LCD.exe. It is worth noting that the simulator adapts itself to the chosen display and optionally supports Cyrillic fonts. For more information about using a character LCD see the LCD User's Guide.

Emulated FAT Operation

The following µTasker V1.4 application configures for a USB-MSD device as emulated FAT for linear data. It uses (USB_INTERFACE, USE_USB_MSD and FAT_EMULATION). This enables the FAT emulation and makes the device accessible from a USB host. The application is discussed in the document µTasker - FAT Emulation and allows viewing data files in binary and formatted formats. For example, for retrieving sampled data from linear internal or external SPI Flash to a .csv file for direct import into a processing program. A typical data view of the .cvs formatted view is shown below:

Emulated FAT Operation together with SD card

The following µTasker V1.4 application configures for a USB-MSD device as emulated FAT for linear data and at the same time with an SD card - both appear as hard drives to a PC host. It uses (USB_INTERFACE, USE_USB_MSD, SDCARD_SUPPORT and FAT_EMULATION). This enables the FAT emulation and SD card with complete utFAT. The emulated FAT part of the application is discussed in the document µTasker - FAT Emulation and allows viewing data files in binary and formatted formats. For example, for retrieving sampled data from linear internal or external SPI Flash to a .csv file for direct import into a processing program. See the .cvs formatted view above as example. The SD card operation is equivalent to a memory tick. Since the application contains utFAT and a DOS-like command line interface, the emulated FAT can also be seen via it (use "disk e" to switch to it instead of the SD card (disk D) and view the emulated files with the "dir" command):

Kinetis Flash SWAP Block Loading Application

The following µTasker Serial Loader application configures for a USB-MSD device with two hard-drives as emulated FAT retrieving, deleting and loading firmware to the Flash Swap Block (second half of Flash) with a PC host. It uses USB_INTERFACE, USB_MSD_DEVICE_LOADER, SERIAL_INTERFACE, FAT_EMULATION and MEMORY_SWAP.
One hard drive (named ACTIVE_SW) shows the present content in the main flash, where the program is operating (write-protected) and the other (named UPLOAD_DISK) shows the firmware stored in the swap block if it is present. By deleting any existing swap block code file and loading a new one, followed by a hard-drive "Eject" command, the two software versions are swapped by using the chip's swap mechanism. After a reset the new software runs and the previous software version is backed up in the swap memory. The two software version can then be switched again by repeating the eject command or else by commanding a swap on the UART interface (command "SW").
The UART operates at 57'600 Baud and supports the S-REC loader, whereby the loaded code is also written to the swap block so that it can then be exchanged by executing the "SW" command.

The two hard-drives appear similar to in the following image:

It is to be noted that this loading technique requires the present application to be able to load the new firmware since there is no dedicated boot loader installed (or needed). The application is thus linked as a standalone code.

For more technical notes about the Swap Block mechanism and development of this application see Development of Swap in FRDM_K64.
  • Standalone versions for loading with USB-MSD (binary files) or via UART (S-Rec files). The first firmware can be loaded using the FRDM-K64F's OpenSDA MSD loader [21k applications]


The following µTasker application was build for USB Host mode of operation, supporting the USB-MSD class. This allows memory sticks to be connected, which can then be read, directories and files created, renamed, deleted etc. In addition it contains lower-level analysis functions allowing the files to be analysed (file objects and occupied clusters) and the phsyical sectors to be viewed.

The project was built with defines USB_INTERFACE to enable USB, USB_HOST_SUPPORT to enable host mode, and USB_MSD_HOST to enable USB-MSD class host support. USB-MSD host automatically includes utFAT so that FAT formatted memory sticks can be worked with.
Note that the jumper J21 needs to be set so that the FRDM-K64F supplies the USB 5V power to the connector.


The following µTasker application allows experimenting with MQTT. It is an MQTT client with the ability to connect to an MQTT broker (eg. in the Internet) to subscribe to topics, publish messages and display received topic publications.
See the video showing how to use its command line interface (on OpenSDA VCOM port at 115'200 Baud, on USB-CDC or Telnet): The MQTT User's Manual can be found at uTasker_MQTT.pdf.

Return to the Kinetis landing page

µTasker Kinetis FRDM-K64F support. Copyright (c) 2004..2018 M.J.Butcher Consulting