Bricking and Recovering OpenSDA Boards in Windows 8 and 10

Getting a board from a distributor like Farnell/Element14/Mouser (add your own distributor) means that chances are high that the default firmware on it is written years from now because the inventory has not been updated, or because boards are still produced with that original firmware (because of testing?). So what happens if I use board with a firmware developed pre-Windows 8/10 area?

Freshly Unboxed NXP FRDM-KL25Z Board

Freshly Unboxed NXP FRDM-KL25Z Board

It might work, but chances are high that the bootloader and firmware is not ready for the ‘modern age’, and as a result the board might be bricked. If you still have a Windows 7 machine around (I do!), you are lucky. If not, then you need to read this article….

Continue reading

Step-by-Step: Updating OSBDM/OSJTAG Debug Firmware

While new Freescale boards come with the OpenSDA debug firmware, I still students using boards with the OSBDM/OSJTAG. And with new CodeWarrior tools, it might be that there is a new OSBDM/OSJTAG firmware, and when I download to a board with an older firmware, the tool will prompt me to update the firmware. To me, after doing this several times, not a big deal. But for someone who sees this the first time, it might not be that easy. So to avoid any further questions, here we go with a step-by-step tutorial how to update the OSBDM/OSJTAG firmware.

MCF52259 Tower Board with OSBDM Firmware

MCF52259 Tower Board with OSBDM Firmware

Continue reading

Kinetis Unique Identification Register

For my RNet stack I need a way to identify nodes in the network using a unique address. What I need is Media-Access (MAC) address. Base on such a unique address I can assign short addresses (e.g. with a DHCP or similar protocol to automatically assign shorter network addresses). So how to uniquely identify my network nodes?

The Freescale Kinetis microcontroller have nice feature: they have a Unique Identification Register (UID) which would be a perfect fit for a MAC address :-).

UID Output

UID Output

Continue reading

A Processor Expert Component to Help with Hard Faults

Ahrg! Again my ARM application crashed somewhere and I ended up in a HardFault exception :-(. In my earlier post I used a handler to get information from the processor what happened. But it is painful to add this handler again and again. So I decided to make things easier for me: with a special HardFault Processor Expert component :-).

After adding this HardFault component to my project, it automatically adds an entry to the vector table. So no manual steps are needed: having the component in the project and enabled will do the needed steps.

Continue reading

LED’s for Kinetis, simplified

Sometimes it takes a while until things get better. Same thing applies to software: from time to time a refactoring and simplification makes sense. Especially if the underlying technology has been improved. With CodeWarrior for MCU10.3 available, it is time to refactor the LED component.

Continue reading

ARM Cortex-M0+ Interrupts and FreeRTOS

Murphy’s Law

“Anything that can go wrong, will go wrong”.

strikes again. Well, the modified version of it:

“Anything that can go wrong, will go wrong, but it will wait until it really, really goes wrong”.

It is always amazing to see that systems having a fundamental flaw, they can work for a long period. Only that on day X my application crashes. And when found the problem, I’m wondering how in the world it was *ever* working with that bug in it :-(.

Continue reading

USB Component Splitted and Updated

Checking the download statistics of my Processor Expert components on http://www.steinerberg.com/EmbeddedComponents/, there is a clear winner: FSL_USB_Stack 🙂

It has been a while I presented that universal USB CDC component in this blog. The component has received a larger re-architecture, I wanted to support more than just USB CDC. For this, the CDC part is now present in a separate sub-component:

FSL_USB_Stack with Sub-Components

FSL_USB_Stack with Sub-Components

Continue reading

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.

Continue reading

Fixing the USB Drivers

USB has two sides: if it works, it is great :-). If it does not, it is really bad :-(. It took a while in the desktop and PC world until USB for common devices (mouse, keyboard, memory sticks, …) was working without issues. But ‘non-standard’ devices like a USB debugging probe/cable are not of that kind of category.

Occasionally I run into USB driver issues in my class. So this post is about identifying the different USB driver parts for the P&E OpenSDA, P&E OSBDM/OSJTAG and P&E Multilinks. And how to install the drivers manually if something is not going well.

Continue reading

Tutorial: Timer (LED) with Processor Expert for Kinetis

In the ‘Pre-LDD age’, setting up a periodic timer event with Processor was really easy. With the concept of LED’s (see “There is a Time and Date for both Worlds”) things are a bit different. But once things are clear, it is not that hard. So here I’m doing a very exciting thing: blinking an LED using a timer! 😎

So I’m going to have an LED blinking every second. I’m using the TWR-K60N512 with an ARM Cortex-M4 and the Eclipse based CodeWarrior for MCU10.2. But it is easy to adopt it to any other Kinetis board.

Continue reading