FRDM-KL27Z

This Freescale Freedom board is based on the KL27Z64VLH4 which is a 48MHz device from the ultra-low-power KL family with Cortex-M0+ core and USB. This KL27 device has 64k Flash and 16k SRAM and is in a 64 pin LQFP package, whereby the KL27 is also available in 32 or 48 pin QFN, 36 pin XFBGA or 68 pin MAPBGA) and its memory ranges from 32k ..256k Flash and 8k ..32k SRAM. There is a 32kHz crystal on the board for clocking the part.

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

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

FRDM-KL27Z 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-KL27Z_KBOOT_HID_UART_MSD.bin KBOOT compatible USB-HID loader with composite USB-MSD loading, as well as KBOOT UART loading on UART 0 at 57'600 Baud [17.0k] allowing applications to be loaded at link address 0x6080 (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 the push button switch SW1 held down. To disable the watchdog reset the board with with push button switch SW2 held down. This can be loaded using the FRDM_KL27Z's USB-MSD (OpenSDA) boot loader. Note that the loader limits application sizes to 38k - it can be built without limits using the µTasker project.
  • uTaskerV1.4.8_BM_FRDM-KL27Z_6080.bin FRDM-KL27ZM application with command-line menu on the virtual COM connection (115'200 Baud) with various menu items (as well as on LPUART0), including the ability to switch to USB-LPUART-0 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. The USB device is a composite USB-CDC with 3 interfaces plus HID mouse. Mouse movement in the left and right directions can be tested by using the two push buttons SW1 and SW2.
    • USB-CDC interface 0 - LPUART 0 - connected to the OpenSDA virtual COM interface on the FRDM-KL27Z
    • USB-CDC interface 1 - LPUART 1 - Rx = PTE1 connected to J3-3 / Tx = PTE0 connected to J3-1
    • USB-CDC interface 2 - UART 2 - Rx = PTD2 connected to J1-5 / Tx = PTD3 connected to J1-7
    Drivers that can be used for this device are available below. The processor runs at 48MHz [35.3k].
    Linked to 0x6080, 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-KL27Z.bin The same FRDM-KL27Z application as stand-alone software that can be loaded using the FRDM-KL27Z's USB-MSD (OpenSDA) boot loader [36.3 k].

  • uTaskerFreescaleMultiVirtualCOMx3.inf CDC installation file for 3 CDC interfaces plus mouse - 32-bit windows.
  • uTaskerFreescaleMultiVirtualCOMx3_64bit.inf CDC installation file for 3 CDC interfaces plus mouse - 64-bit windows.
    See the following for a guide to installing unsigned drivers on Windows 8.1


USB-MSD with SD card

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.
An SD card can be connected using the following pins of the FRDM-KL27Z:
  • SPI0_SCK = PTC5 (J2-12)
  • SPI0_MISO = PTC7 (J2-10)
  • SPI0_MOSI = PTC6 (J2-8)
  • SPI0_CS = PTC4 (J2-6)

The following image shows the FRDM-KL27Z being simulated together with an SD card. An executable is provided which requires no installation and can be started by extracting and simply executing the file uTaskerV1.4.8_FRDM-KL27Z_SD.exe.

The device's UART can be connected to using a virtual loop back device to COM4 and then the SD card can be viewed, formatted, directories and files created, renamed, deleted etc. in the utFAT Disk menu (DOS-like interface).



For Full details of the utFAT used as disk interface see: utFAT2.0



Emulated FAT

The following µTasker V1.4 application shows emulated FAT in operation, meaning that it appears as a hard drive to a PC host and allows viewing linear data content. The application is discussed in the document µTasker - FAT Emulation, although this configuration doesn't use a large area of the internal flash for data storage and formatted viewing (due to smaller size of Flash in the KL27) but instead allows a raw display of its entire internal Flash memory and a snap-shot of its internal RAM.
To achieve this configuration it uses:
- USB_INTERFACE to enable USB device
- USE_USB_CDC with #define USB_CDC_COUNT 1 to add a USB-CDC interface
- USE_USB_MSD and FAT_EMULATION for the USB-MSD interface with emulated FAT
The USB device operation uses the crystal-less USB mode.

When connected to a PC the USB device enumerates as a USB-MSD and USB-CDC composite device, which requires no installation on Windows 10 but the following drivers need to be used with older operating systems

Very Low Power RUN Mode Reference

The following µTasker V1.4 application shows the board being clocked from its internal LIRC (8MHz) oscillator with system clock set to 4MHz and bus/flash to 1MHz in order to be able to use VLPR (and VLPW [Very Low Power WAIT Mode]) modes. It was configured by setting the defines RUN_FROM_LIRC to configure the basic clock mode, #define SYSTEM_CLOCK_DIVIDE 2 to obtain 4MHz system/core speed, #define BUS_CLOCK_DIVIDE 4 for 1MHz bus/flash in order to respect the maximum VLPR mode frequencies.

The LUART is set to 19'200Baud so that an accurate speed can be obtained from the available clocks, whereby the LPUART is also driven from the LIRC (controlled by LPUART_MCGIRCLK).

The Timer module (TPM0 channel 2) is configured to generate a 1kHz 20% PWM signal on PTC3 (J2-15) and the TPM also clocked from LIRC (controlled by TPM_CLOCKED_FROM_MCGIRCLK)).

By using the low power commands in the administration menu (on the LPUART's command line interface) the operating mode [including VLPR and VLPW] can be dynamically changed to observe the effect on current consumption and behavior - including the PWM signal that remains available in certain modes. For a description of using the command see the section "Testing Low Power Mode and Wakeup Sources" at the LLWU discussion



Timer UART Message Transmission

The following µTasker V1.4 application shows the board generating regular messages on its LPUART1 output (PTE0 - J3-1). This uses the UART_TIMED_TRANSMISSION_MODE as described in the UART user's document. This allows defining DMA driven UART output with a very accurately defined inter-character space, generated with a PIT timer's DMA trigger for zero-overhead operation.

The KL27 runs at 48MHz (from its 48MHZ internal clock) with 24MHz bus/Flash clocks. It appears as a USB-CDC device (using crystal-less mode) and has a command line menu on this and its LPUART0 on the OpenSDA VCOM interface. Various further functions can be used in the menus.


Return to the Kinetis landing page


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