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

Tutorial: IAR + FreeRTOS + Freedom Board

Maybe Eclipse is ‘too much’, and you are looking for something different? The cool thing with Processor Expert is that while this is Eclipse based, you can use it easily with other tool chains like IAR Embedded Workbench. So you have the choice, and I have explored things a little with porting FreeRTOS for Cortex-M0+ to IAR :-).

IAR Embedded Workbench with FreeRTOS

IAR Embedded Workbench with FreeRTOS

In this tutorial I’m showing how use IAR with FreeRTOS and the Freedom FRDM-KL25Z Board, using Processor Expert components.

Continue reading

Back to Basic(s) with the Freedom Board

If you think that my LED tutorial is too complicated to program a simple LED, then this article might be of interest for you. Because there is an easy and basic way: And I mean it: really basic. And the name is the program(ming language) ;-).

One of my very first contact with computers was the Commodore C64: this was a very successful home computer system back in the 1980’s: a 8bit machine with 64 KByte of RAM and a built-in Basic Interpreter in ROM:

Commodore C64 Startup Screen

Continue reading

First Steps with Avnet’s Wi-Go Board

It is already two weeks into 2013, and not to late to mention Christmas: I have received another gift :-). It did not make it for Christmas itself: Because of the overloaded postal service and because the Swiss customs wanted to deeply inspect the board (they probably wanted to try the board too 😉 ). So it had it finally in my hands last week: The Avnet Wi-Go Board:

Avnet Wi-Go Board

Avnet Wi-Go Board

Continue reading

Debugging ARM Cortex-M0+ Hard Fault with MTB Trace

And here it is again: a Hard Fault exception raised by the ARM Cortex-M0+ on my Freedom board:

Hard Fault in Debug View

Hard Fault in Debug View

A reason for hard faults are for example dereferencing a NULL pointer. The issue with the ARM Cortex hard fault exception stack is: it is not easy to find out where in the code the problem is.I have created a Processor Expert component to help me to find the location of such an exception. With the Eclipse based CodeWarrior for MCU10.3 there is another way: Trace with the MTB (Micro Trace Buffer)!

Continue reading

The Freedom Robot

I have the Arduino Motor Shield working, the Ultrasonic module is pinging around, Christmas brought some small DC toy motors, and a bag of plastic gears is on my desk. All the good ingredients for a small robot: the Freedom Robot!

❗ Warning: Multiple Coke bottles have  been destroyed, and a FRDM box got hurt during his experiment! 😯 Do not try yourself if you cannot handle it.:-)

Smile

Smile

Continue reading

Tutorial: Ultrasonic Ranging with the Freedom Board

Question: What makes 8 times ‘beep’, but I cannot hear it?

Answer: My ultrasonic range finder 🙂

FRDM-KL25Z with HC-SR04

FRDM-KL25Z with HC-SR04

What I have added to my FRDM-KL25Z board is an ultrasonic distance sensor, measuring distances up to 4 meters.

Continue reading

PWM and Shell for a LED

Controlling a LED is a great starter for any embedded project: simple and you immediately get feedback if it works :-). Even better: as driving a LED is not different from working with another digital I/O or controlling a solenoid, the ‘LED’ concept and driver is very universal. I recently have simplified my Processor Expert LED component, so it might be a good time to add some more functionality again ;-). Let’s add support for PWM, and adding a shell interface on top of it. That way the LED is dimmable, plus I can do everything with a command interface as well:

LED Properties

LED Properties

Continue reading