Switching Processor Package in Processor Expert

When I create a new project for the KL05Z with Processor Expert, then it shows up as 48 pin LQFP package in the project:

48pin LQFP Package in Components View

48pin LQFP Package in Components View

However, when I look at my board, it has a KL05Z32 in a LQFP package with 32 pins:

FRDM-KL05Z Board

FRDM-KL05Z Board

Continue reading

Advertisements

Freedom Logic Analyzer with Triggers

The first FRDM-KL25Z Freedom Logic Analyzer firmware was missing one important feature: Triggers! But this weekend the firmware has evolved a bit :-).

Triggers

Trigger Settings

Trigger Settings

Continue reading

DAC Example with the Freedom Board

After working on an ADC example, a DAC one was missing. Julio E. Fajardo is a reader of this blog, and he was so kind to send me an example project for the FRDM-KL25Z. The example is able to produce produce different waveforms with the DAC. The project has two examples which they are enabled/disabled in main(). One example waveform the sawtooth:

Sawtooth_FDRM_DAC

Sawtooth_FDRM_DAC

Continue reading

Skipping Breakpoints

The challenge with small microcontroller like the ARM-Cortex-M0+ is that they have very limited debugging resources. As such, the number of hardware break points is very limited (see this post). For example for the KL25Z on the Freedom board, I only have 2 break points available if I want to do stepping:

No more hardware breakpoints available

No more hardware break points available

Continue reading

Be Aware of the Baud Problem

I’m using serial communication in different flavors for my project: with the shell, with OpenSDA USB CDC, to use printf(), and with the Bluetooth module. Processor Expert is a big helper, but as for any software, it is not bug free. And there is a problem with Processor Expert in CodeWarrior for MCU10.3 in respect with Baud settings for a serial interface.

Probing the Bluetooth Module Serial Connection

Probing the Bluetooth Module Serial Connection

Continue reading

Processor Expert Configuration Registers View

In “Using the Reset Button on the Freedom Board as User Button”, I had the problem to find out why a setting did not make it into my generated code. There is the fundamental question: “How does a setting impact my microcontroller register settings?”. There is an answer to that question: The Configuration Registers view:

Configuration Registers View

Configuration Registers View

Continue reading

Using the Reset Button on the Freedom Board as User Button

Processor Expert is a great tool: it lets me configure all the complexities of that ARM Cortex-M0+ core. But today it has fooled me and I lost several hours of my week-end time :-(. I need a user interface like push button for my project. Yes, the FRDM-KL25Z has touch area, but honestly: that kind of stuff never worked out well for me. It is probably just me having it not properly set up. The touch slider is working as in my earlier simple example, but in my other project with more hardware around it, it is working sometimes, sometimes not. Ahrg! I can blame my ignorance, my lack of understand how to configure it properly, or the extra noise by the hardware around it. Result is: I wasted a lot of time, and I give up :-(.

SW1 on the FRDM-KL25Z Board

Reset button on the FRDM-KL25Z Board

Continue reading

Bluetooth with the Freedom Board

I’m working now on a lecture robot project using my Freedom Board. And for this I need a wireless communication. I already have IEEE802.15.4 (SMAC) working, but I wanted to add Bluetooth as a low-cost option. I have found an inexpensive Bluetooth module which is available for only around $4-8 which we use in another university class project. The module is an AT command module: that means the microcontroller communicates with AT serial commands with the module, and the Bluetooth stack itself runs on the module. In a minimal configuration I only need 3.3V, GND, TX and RX plus a CMD (Command) pin:

Bluetooth Module

Bluetooth Module

Continue reading

Tutorial: Using the ARM CMSIS Library

One of the great advantage of using an ARM core as on my FRDM-KL25Z board is that I can leverage a lot of things from the community. And one big thing around ARM is CMSIS (Cortex Microcontroller Software Interface Standard). It is an industry wide software library for the ARM Cortex microcontroller. Using the CMSIS libraries and interfaces will make it easier to port applications within the ARM Cortex family.

CMSIS Version 3 Block Diagram (Source: Arm.com)

CMSIS Version 3 Block Diagram (Source: Arm.com)

Continue reading

Creating and using Libraries with ARM gcc and Eclipse

In ‘A Library with ARM gcc and Eclipse’ I was using the CodeWarrior MCU10.3 beta version to create a library project. At that time I had to do things manually. Now with the final MCU10.3 there is an option in the New Project Wizard which makes things easier:

Library Creation

Library Creation

This will create a library (or better: an archive) with gcc for me. But how to use it from another project?

Continue reading

Tutorial: ADC with the Freedom Board

Unlike other boards from Freescale, the FRDM-KL25Z has no potentiometer or analog components on it. But in many applications an ADC conversion is needed, so here we go with a tutorial reading in an external potentiometer with Eclipse, CodeWarrior and Processor Expert. For this tutorial I have a 10k Ohm linear potentiometer connected to the Freedom board:

Linear potentiometer with the FRDM-KL25Z

Linear potentiometer with the FRDM-KL25Z

Continue reading

Zumo Line Following with FRDM-KL25Z

With the Zumo I have a base platform for cool robotics applications. So why not build a line following robot with this? Especially as Pololu offers a reflectance sensor array for it. The result is: I have a line following robot 🙂

Line Following ZumoBot

Line Following ZumoBot

It turned out that things were not working out of the box with the FRDM-KL25Z board. So if you want to do the same thing, here are some tips how to make it working with the Freedom board.

Continue reading

Tutorial: Printf() with (and without) Processor Expert

In this post I tapped into how to print messages to a console using  the Kinetis/Freedom board. I’m not a fan of printf() for multiple reasons: It is simply a bad thing for embedded systems programming. But as many have asked for it, here is how to say “hello” from the Freedom Board using printf():

Hello World on the Terminal

Hello World on the Terminal

Continue reading

Turning the Freedom Board into a Logic Analyzer

I think the most important tool for a firmware engineer is a Logic Analyzer. I always have one on my desk. Working in different locations, sometimes I forget to carry it with me. And  for sure I would need it. To buy another one to compensate my laziness? Or maybe there is another solution? And here I stumbled over an article about the Logic Sniffer project recently: it is about an open source logic analyzer hardware and firmware project. What a cool idea! Why not using my FRDM-KL25Z Freedom board as a Logic Analyzer? Heck, that would be awesome 🙂

I2C Capture with Decoder

Logic Analyzer with the KL25Z Freedom Board

Continue reading

Eclipse Workspace Tips

Usually, one of the first things I see if I launch Eclipse is this dialog:

Select a Workspace Dialog

Select a Workspace Dialog

Actually, that ‘workspace’ thing is one of the most important things in Eclipse to understand. To mess around it can cause a lot of pain. So I have collected some ‘lessons learned’ around workspaces.

Continue reading