FRDM-K22F

This Freescale tower board is based on the K22FN512VLH12 which is a 120MHz device from the performance and integration K22 family with Cortex-M4 core and USB. This K22 device has 512k Flash and 128k SRAM and is in an 64 pin LQFP , whereby the K22 is also available in 80, 121 or 144 pin housings and its memory ranges from 128k...1M Flash with 24k...128k SRAM (100MHz and 120MHz parts). There is an 8MHz crystal on the board for clocking the part. The K22 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-K22F

To configure the µTasker project for this board simply enable the define FRDM_K22F 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_512_128.ld should be selected [K_512_128_BM.ld for downloadable version] {the linker script extension may vary for different compilers, whereby *.ld is valid for GCC}

FRDM-K22F 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-K22F_KBOOT_HID_UART_MSD.bin KBOOT compatible USB-HID loader with composite USB-MSD loading, as well as KBOOT UART loading on UART 1 at 57'600 Baud [16.4k] 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). When operating, the green 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-K22F's USB-MSD (OpenSDA) boot loader. Note that the loader limits application sizes to 70k - it can be built without limits using the µTasker project. The USB device operation uses the crystal-less USB mode.
  • uTaskerV1.4.8_BM_FRDM-K22F_8080.bin FRDM-K22F application with command-line menu on the virtual COM connection (115'200 Baud) with various menu items (as well as on UART1), including the ability to switch to USB-UART-1 bridge mode with end-to-end flow control. Output from the on-board accelerometer can be viewed in the I2C menu. Low power modes can be set in the application menu (when LLS has been entered, pressing the push button SW2 will wake and return to the fully functional mode - more details of this operation can be found in Low-Leakage Wakeup (LLWU) Support). The USB device is a composite USB-CDC with three interfaces, whereby the first is connected to the command line shell (in the USB menu it is possible to command a bridging mode to UART1). The second performs full-time USB-UART bridging to UART0 (Tx = PTA15, Rx = PTA14). The third performs full-time USB-UART bridging to UART2 (Tx = PTD7, Rx = PTD6). Drivers that can be used for this device are available below. The processor runs at 120MHz and the USB device makes use of the crystal-less mode. [40.0k].
    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 green LED blinks at 2.5Hz.
  • uTaskerV1.4.8_FRDM-K22F.bin The same FRDM-K22F application as stand-alone software that can be loaded using the FRDM-K22F's USB-MSD (OpenSDA) boot loader [41.0k].

  • uTaskerFreescaleMultiVirtualCOM.inf USB CDC installation file for 32-bit windows (usable for 1..6 USB-CDC composite interfaces).
  • uTaskerFreescaleMultiVirtualCOM_64bit.inf USB CDC installation file for 64-bit windows (usable for 1..6 USB-CDC composite interfaces). See the following for a guide to installing unsigned drivers on Windows 8.1

FRDM-K22F nRF24L01+

This application shows the FRDM-K22F 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-K22F 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-K22F 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 PTA13 (J1-3) to GND at reset.


USB-MSU with FAT in 352k of internal Flash and composite USB-CDC with 4 UARTs

The following µTasker V1.4 application configures for a 4 USB-CDC interface composite device by enabling USB-CDC and setting the define for USB_CDC_COUNT to 4, the maximum number of available UARTs (3 UARTs and 1 LPUART) in the K22. The first interface (0) is connected to the command line shell (as is UART1) but can be commanded to a USB-UART1 bridge in the USB menu. The other 3 USB-CDC interfaces perform dedicated USB-UART bridges as follows:
CDC Interface 1 - UART 0 (UART0_TX = PTD7 on connector J2-10/UART0_RX = PTD6 on connector J2-8)
CDC Interface 2 - UART 2 (UART02TX = PTD3 on connector J1-4/UART2_RX = PTD2 on connector J1-2)
CDC Interface 3 - LPUART 0 (LPUART0_TX = PTC4 on connector J24-9/LPUART0_RX = PTC3 on connector J1-14)

All UARTs (including the LPUART) operate with DMA on their transmission side. For additional details about how the UARTs and LPUARTs are referenced in the µTasker project see µTasker UART/LPUART interface.

Furthermore the USB composite device includes USB-MSD with a FAT in 352k of its internal Flash. The flash drive can be formatted by a PC host when connected via USB and is seen as a 352k disk. Usually it will format it as FAT12 which gives a usable space of 332k due to the FAT12 overhead.

The application is configured with USB_INTERFACE to enable USB and USE_USB_MSD to enable the USB-MSD operation. The define FLASH_FAT is used instead of SDCARD_SUPPORT to specify that internal flash is used (the SD-card could be used in parallel with the SDCARD_SUPPORT define) and the following defines to control the location and size of the Flash area dedicated to the FAT:
#define INTERNAL_FLASH_FAT_SIZE (352 * 1024) // size of the flash area used as disk
#define FAT_FLASH_MANAGEMENT_ADDRESS (160 * 1024) // physical address where the used flash starts


USB-MSU with emulated FAT, Keyboard and RAW HID Composite

The following µTasker V1.4 application configures for a composite device consisting of USB-MSD based on emulated FAT (USE_USB_MSD and FAT_EMULATION), with USB Keyboard (USE_USB_HID_KEYBOARD) and RAW HID (USE_USB_HID_RAW).

For details of FAT emulation see µTasker - FAT Emulation.
For details of testing keyboard operation see µTasker USB Device Configuration and Keyboard Testing.


Return to the Kinetis landing page


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