http://www.element14.com/community/themes/images/knode/free_kl25z.gifThe Freescale Freedom platform is an ultra-low-cost development platform enabled by the Kinetis-L Series KL0x, KL1x and KL2x energy efficient microcontroller families built on ARM® Cortex™-M0+ processors.

Setting Up Your Board

For this example I used the popular mbed.org integration to program the Freedom board as it is quick and easy to set up plus it’s FREE.

You need to:

  1. Hold down the Reset Button between the two USB Connectors
  2. Plug  one end of your USB cable into your computer and the other in to the USB port labelled SDA on the Board
  3. Once you have done this the KL25z will pop up as BOOTLOADER in your file system
  4. Copy this file from mbed.org to the root of this new drive
  5. Disconnect the USB cable from the board and plug it straight back in again and the drive will now pop up as MBED
  6. Open the drive and click on the MBED.HTM
  7. Login or Sign up and you now have access to all the tools your need to get started with the KL25z

Let’s start coding

Now for the fun part,

  1. Visit mbed.org/compiler and log in if you need to.
  2. Select New > Program and give your program a name e.g. KL25zHelloWorld
  3. The following  “Hello World” Code will be placed into the main.cpp file

#include "mbed.h"

 

DigitalOut myled(LED1);

 

int main() {

    while(1) {

        myled = 1;

wait(0.2);

        myled = 0;

wait(0.2);

    }

}

 

   4. Click Compile and Save the downloaded file (filename.bin) onto the MBED drive on the KL25z Board

   5. Press the Reset Button and you will see the RGB LED Flashing.

 

I hope this helps you get started.


Don’t forget to share your projects