This Freedom board is based on the KL02Z32VFM4 which is a 48MHz device from the ultra-low-power KL family with Cortex-M0+ core. This KL02 device has 32k Flash and 4k SRAM and is in a 32 pin QFN package, whereby the KL02 is also available in 16 pin QFN, 20 pin WLCSP and 24 pin QFN and its memory ranges from 8k .. 32k Flash and 1k .. 4k SRAM. There is a 32.768kHz crystal on the board for clocking the part.

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

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

FRDM-KL02Z 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-KL02Z_KBOOT_UART.bin KBOOT compatible UART loader [6.4k] allowing applications to be loaded at link address 0x2800 - 57600 Baud. When operating, the green LED blinks at 5Hz. To force the loader reset the board with header J8-3 connected to GND. To disable the watchdog reset the board with header J8-4 connected to GND. This can be loaded using the FRDM-KL02Z's USB-MSD (OpenSDA) boot loader. Note that the loader limits application sizes to 22k - it can be built without limits using the µTasker project.
  • uTaskerV1.4.8_BM_FRDM_KL02Z_2800.bin KL02 application with command-line menu on the virtual COM connection (115200 Baud) and accelerometer operation (activate output in I2C menu). Low power modes can be set in the application menu and the processor runs at 47.97MHz {FLL} [21k]. Linked to 0x2800, it can be loaded using the KBOOT PC tool - 57600 Baud. When the application is running the green LED blinks at 2.5Hz.
  • uTaskerV1.4.8_FRDM_KL02Z.bin The same KL02 application as stand-alone software that can be loaded using the FRDM-KL02Z's USB-MSD (OpenSDA) boot loader [22k].

Software Based RTC (Real Time Clock)

The KL02 is one of the very few Kinetis devices without an inbuilt RTC, but this is no reason to not use a powerful clock functionality in an application that stays powered, even if resets are encountered during use. This application includes a software based RTC with Gregorian calendar (handling day of week, and leap years, etc.) and alarm function which keeps time based on a software timer that runs whenever the processor is in any mode or low power state that is still responding to the software's periodic tick. The second's value is maintained in a RAM area that is not otherwise initialised and so is maintained through software resets and even short power dips.

This functionality is enabled in the µTasker project framework by enabling the define SUPPORT_SW_RTC.

When the board is powered up for the first time it will show a date of 1.1.1970 (start of Unix epoch) and count from there. Using the time interface in the Administrator menu on the OpenSDA serial interface (115'200 Baud) the date and time can be set and then displayed. In the same interface an alarm can be programmed and there is a message when the alarm times out.

This is a session showing the date and time being set and then programming alarms, showing its versatility.

   Admin. menu
up               go to main menu
show_config      Show configuration
save             Save configuration to FLASH
reject           Reset non-saved changes
restore          Restore factory settings
show_time        Display date/time
set_time         Set time hh:mm:ss
set_date         Set Date dd:mm:yyyy
show_alarm       Display alarm d/t
set_alarm        Set alarm (date)(+)[time]
del_alarm        Delete alarm
show_lp          Show low power mode and options
set_lp           [option] Set low power mode
reset            Reset device
last_rst         Reset cause
help             Display menu specific help
quit             Leave command mode  

1:01:1970 00:00:16                      [Note that there is initially no valid date/time set]

#set_date 2:2:2015
New date set
2:02:2015 00:00:34

#set_time 09:35:30
New time set
2:02:2015 09:35:30                      [Both date and time have now been entered]

2:02:2015 09:35:35

2:02:2015 09:35:38                      [Note that the time increments]

#set_alarm +2                           [Alarm set for 2 seconds in the future (+3:45 would be 3 minutes, 45 seconds in the future, etc.]
New alarm set
2:02:2015 09:35:47

#RTC Alarm fired                        [Message when the alarm fired]

set_alarm 9:36:10                       [In this case the alarm is set for an absolute time in the present day -
                                         it can also be set for a day/time with 3:2:15 9:35:45, for example]
New alarm set
2:02:2015 09:36:10

2:02:2015 09:36:02

#RTC Alarm fired                        [The absolute alarm fires]
2:02:2015 09:36:11

The application interface is equivalent to the µTasker RTC interface when working with a real RTC and includes, in addition to the user functions at the menu interface, configurable alarm call-backs every second, every minute, every hour or every day, plus a stop-watch alarm, as well as conversions between local time and UTC.

uTaskerV1.4.8_FRDM-KL02Z_SW-RTC_with_alarm.bin Stand-alone software that can be loaded using the FRDM-KL02's USB-MSD boot loader [23.0k].

Return to the Kinetis landing page

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