The ARM Cortex-M0+ on the KL25Z Freedom Board (FRDM-KL25Z) runs up to 48 MHz. For this, the 8 MHz crystal on the board is used. A 48 MHz is required for USB communication, to have the needed oversampling on USB data lines. I have shown in my USB CDC post how such a clock is configured, using the white pre-production board. To my surprise, when I tried the same code on the black production boards, it did not work on the production black boards. Even worse: it worked on some, but not on every board :-(.
Category Archives: Processor Expert
Tutorial: printf() and “Hello World!” with the Freedom KL25Z Board
Sometimes I show to much in a tutorial: only writing something to the UART? Sounds boring, so why not adding tasks, LEDs and a full shell implementation to the mix as in this post? Yes, definitely too much to start with at the beginning :-(. So less is more, and if it is just about the UART. And I promise: it is doable with around 50 lines of application code :shock:.
AND: I admit, this post title is a trap ;-). It is not about printf(). But it *is* about using the UART on the KL25Z Freedom board and to do things like printf(), and even more. Trust me. It is about how to write *and* read from the UART. While I’m using here the Kinetis-L ARM Cortex-M0+ KL25Z Freedom board, it is applicable to any other Kinetis device.
Removal of Processor Expert for a Project
Yes, I’m using Processor Expert *a lot*. But there might be reasons to go without it. Because then I really want to do it the hard-hard-hard core way. Or maybe because I have configured my system, and want to freeze my code. And nothing prevents me to do it ‘my way’.
In any case, it is easy to transform a CodeWarrior Processor Expert project, and then decide to remove that technology from it, and go further with the ‘traditional’ technology.
Tutorial: USB CDC with the KL25Z Freedom Board
Question: What to do on a rainy Sunday?
Answer: Having fun with USB and the KL25Z Freedom board! :-).
In “A shell for the Freedom board” I used the UART-to-USB OpenSDA capability of the KL25Z Freedom board: The KL25Z processor uses the OpenSDA K20 microprocessor as Serial-to-USB converter. But this only works because of the P&E OpenSDA USB CDC (Communication Device Class) implementation. If I create my board without OpenSDA, I need a different approach: I want to do USB CDC with the KL25Z :twisted:.
Processor Expert, gcc C++ and Kinetis-L with MQXLite
The Kinetis-L is a 32bit microprocessor family, based on ARM Cortex M0+. It comes with ARM gcc in CodeWarrior. Although the Kinetis-L does not have much RAM, it is very possible to use gcc with C++, especially as a programmer I keep the limited RAM amount in mind. So I thought I try C++ and Processor Expert for my Kinetis-L KL25Z Freedom board.
If I select C++ as language in the New Bareboard Project Wizard of CodeWarrior, then I cannot select Processor Expert or Device Initialization:
That makes somewhat sense, as Processor Expert creates normal C code and C files, but no C++. Still, what if I need C++? This is doable, but with anything advanced, I need to know exactly what I want and what I do. Here is the ‘How to use C++ with Processor Expert’.
Tutorial: Touching the Freedom KL25Z Board
I have covered several aspects of the Freescale KL25Z Freedom board with a tutorial: LED, Accelerometer and RTOS. One peripheral on the board is missing so far: the touch slider area:
Tutorial: Freedom with FreeRTOS and Kinetis-L
In my earlier tutorials “Enlightning the Freedom KL25Z Board” and “Accelerating the KL25Z Freedom Board” I have not used an RTOS. In this one I’m creating a project from scratch and run it with the open source FreeRTOS operating system, using the FRDM-KL25Z Freedom board. MCU10.3 comes with gcc, and is nicely integrated with Eclipse and CodeWarrior. With this tutorial, it is possible to get an RTOS up and running on a Kinetis device very quickly.
I have a KL25Z which has 128 KByte FLASH and 16 KByte of RAM. What I want to explore is if things could fit as well to the KL0 family where the smallest device has only 8 KByte of FLASH and 1 KByte of RAM. Can this work?
Tutorial: Accelerating the KL25Z Freedom Board
In “Tutorial: Enlightning the Freedom KL25Z Board” I used the RGB LED on the FRDM-KL25Z board. This tutorial extends it to use the MMA8451Q inertial sensor on the board which is connected through I2C to the KL25Z processor:
The goal is show the accelerometer x, y and z-axis on the RGB LED.
Tutorial: Enlightning the Freedom KL25Z Board
The schematics for the Freedom board is now available on the element14 Freedom Board site (you need to log into the element14 community first) as FRDM-KL25Z Schematics (SPF-27556_D).pdf (314.7 K)). So time to write a tutorial how to use the LED on that board.
❗ Note: since this tutorial, the LED component has been simplified. So some of the steps below are much simpler and easer. Please see LED’s for Kinetis, simplified | MCU on Eclipse. I have updated this post with the new instructions and images.
In “FreeRTOS with GCC, Cortex-M0+ and Kinetis KL25Z Freedom Board” and “A Shell for the KL25Z Freedom Board” I have used that board with an RTOS: FreeRTOS. But it is really easy to use that board without an RTOS (‘bare metal’) too. In this tutorial I’m providing step by step instructions to use the RGB LED on the Freedom KL25Z board with Processor Expert and the open source LED component.
FreeRTOS V7.2.0 released
After there was an update to FreeRTOS 7.1.1 in May this year, there is now a new version V7.2.0 available. It comes with smaller fixes and enhancements, see the release notes for a comprehensive list of changes.



