Using the FRDM-KL25Z as a USB Mouse Device

I finally completed my project turning the FRDM-KL25Z board into a USB mouse device :-). The form factor and the capabilities of the Freedom board makes it a great board for implementing it as a ‘custom mouse’. All what I need is the USB stack running on it and have it acting as USB HID Mouse device.

FRDM-KL25Z enumerated as USB HID Mouse Device

FRDM-KL25Z enumerated as USB HID Mouse Device

Continue reading

DIY Free Toolchain for Kinetis: Part 3 – Debugger (GDB Server with P&E and Segger)

This is the third part of a tutorial series how to ‘do-it-yourself’ a tool chain for the Freescale Kinetis microcontroller, with the FRDM-KL25Z as example. The tool chain is using GNU ARM gcc plus Eclipse Kepler release. So far I have the following parts:

List of Tutorials

So far things are very generic. But with debugging it means different hardware, and different hardware connections. And for this connection we need a GDB Server.

GDB Server

Eclipse CDT features a GNU Debugger (GDB), and this is what I want to use here: debugging my microcontroller with GDB inside Eclipse. In order to debug the microcontroller, I need two other things: a GDB Server and a Debug Probe.

GDB with GDB Server

GDB with GDB Server

Continue reading

DIY Free Toolchain for Kinetis: Part 1 – GNU ARM Build Tools

This is the first part of a multi-part tutorial on setting up a free and functional GNU gcc + Eclipse + debugger environment for use with the Freescale FRDM-KL25Z board.

List of Tutorials

In this first part, I’m showing how to install the GNU ARM tool chain to build a ‘blinking LED’ application for the FRDM-KL25Z. With 100% free tools 😉

Blinking Red RGB LED made with free tools

Blinking Red RGB LED made with free tools

Continue reading

Tutorial: Ultra Low Cost 2.4 GHz Wireless Transceiver with the FRDM Board

For my embedded systems lecture I need a wireless connection to the robot we will develop during that course. So far I have SMAC (IEEE802.15.4) and Bluetooth worked out. But that IEEE802.15.4 (ZigBee) is expensive, and the cheap Bluetooth modules are great for robot-to-host connection, but not for swarm robots which need to communicate to each other. Alex Vecchio (see this post) pointed me to a $2.75 (!) wireless module featuring the Nordic Semiconductor nRF24L01+. Exactly what I needed, with an incredible low price :-).

nRF24L01+ Module Detail

nRF24L01+ Module Detail

Continue reading

Hacking the Heating System for Cooling – Geothermal Drilling with extra Benefits

Summer finally has arrived in Switzerland. Yes, I live in a moderate climate zone, but if the outside temperature goes above 28-30° Celsius as these days, then sleeping at night is not that comfortable as it should be in my view. Luckily, I’m in a good constructed house with good insulation, so it takes a few days until it heats up. But I love to keep the temperature below 25° Celsius, especially at night. I do have a heating system which combines geothermal and solar heating. The question is: how can I use it for cooling during hot summer days? The solution: some extra plumbing, a Freescale Tower system and the Freescale FRDM-KL25Z board 🙂

FRDM-KL25Z with Arduino Data Logger Shield

FRDM-KL25Z with Arduino Data Logger Shield controlling Heating/Cooling System

Continue reading

FRDM-KL25Z talks to Android Phone

Ok, I still do not own an Android phone, but I know many readers of this blog do, and there were several questions how to use the FRDM-KL25Z with Android. And here is something exciting I just saw today: Kai Liu posted information how to connect the FRDM-KL25Z with USB OTG (On-The-Go) to Android: FRDM-KL25Z now talks to Android Phone

He published the S19 file so you can try things out. He still needs to organize the sources and decide on how to publish it (I hope it will be available soon).

If you do not own a FRDM-KL25Z RevE, then you need to consider this post about a hardware change: USB host HID demo times out on FRDM-KL25Z with reproduced USB host

Happy Droiding 🙂

USB MSD Host for the FRDM-K20D50M Board

The Freedom boards FRDM-KL25Z RevE and FRDM-K20D50M make it easier to use it as USB Host device, as they come with a special jumper to provide 5V to the USB device, so my earlier ‘hack’ is not needed any more :-). After I had USB MSD Host working for the FRDM-KL25Z, it was much harder to get the USB stack working for the FRDM-K20D50M board, because somehow the example Freescale provided with their USB stack refused to work properly on my board. After debugging it for several nightly hours, I decided to take my working Processor Expert project for KL25Z and added support for the K20. And the good news is: since tonight this is working :-).

FRDM-K20D50M as USB MSD Host

FRDM-K20D50M as USB MSD Host

Continue reading

Low Power with FreeRTOS: Tickless Idle Mode

It took me a while to find the time to upgrade to FreeRTOS V7.4.2, but finally it is done :-). What caused me to move from V7.2 to V7.4 is a low power application on the FRDM-KL25Z board. V7.4 comes with two major new features: Queue Sets and Tickles Idle Mode (see this article). The last one if of interest here.

FreeRTOS runs an IDLE task. This one runs when there is no other active task. That task calls an optional Idle task hook which is a perfect place to put the microcontroller into low power mode:

Task T1 Running

Task T1 Running

Continue reading

Using the FRDM-KL25Z as USB Keyboard

I miss my old DELL laptop. Ok, the new one I received from IT services is not bad. It is faster and has a better screen. But I’m not really happy with the new keyboard. With the previous keyboard I was able to do a ‘PrtnScrn’ with a single key press. With the new one I need to press Fn + PrntScrn. And this is impossible to do with one hand:

Impossible to reach Prnt Scrn

Impossible to reach Fn+Prnt Scrn with one hand!

Yes, I have two hands ;-). But many times I need to do ‘print screen’ while having my other hand on the mouse :-(.What else can I do?

Continue reading

5V Generation from V_IN on the Freedom Board RevE

The Freescale Freedom boards like the FRDM-KL25Z feature an Arduino header so I can stack shields on it. Unfortunately, the Freedom board does not generate 5V if not connected to the USB cable. This makes it not possible to be used with many shields like the Adafruit Motor Shield: such shields expect that the Arduino board is providing 5V through the Arduino header (Pin 10 on J9 on the FRDM-KL25Z). So I had to do hardware changes to generate that 5V if I used my board disconnected from USB, e.g. running from batteries through V_IN (pin16 (P5-9V_IN) on the FRDM-KL25Z.

J22 with Capacitors on FRDM-KL25Z RevE

J22 with Capacitors on FRDM-KL25Z RevE

The good news is that the Rev.E of the Freedom FRDM-KL25Z board has now a header J22 to make things easier:

Continue reading