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

Advertisements

How to Recover the OpenSDA V2.x Bootloader

More and more of my students are using Microsoft Windows 10 machines, and my computer has been upgraded to Windows 10 a couple of week ago too. From my work and experience, a new operating system causes always some challenges, and Windows 10 is no difference. And no, this is not about Microsoft vs. Apple vs. Linux, this post is about addressing a potential and painful problem which I have observed with Windows 10 machines, and to my understanding it could happen with any other operating system too. The problem is that somehow on several student machines the bootloader and OpenSDA application on their FRDM boards did not work any more.

FRDM-K64F (top) programming the OpenSDA Bootloader (bottom)

FRDM-K64F (top) programming the OpenSDA Bootloader (bottom)

Continue reading

Segger J-Link OpenSDA Firmware with Virtual MSD

Sometimes it is very convenient to load a new firmware to a board without the need for a hardware debugger. This is usually done with a bootloader. The NXP Freedom and Tower evaluation boards have on-board debug device/microcontroller (OpenSDA) which can load different firmware implementations like CMSIS-DAP/mbed, P&E Multilink or a Segger J-Link OpenSDA applications. Both mbed and P&E implemenations support to program the board with drag&drop: simply send a file to a virtual MSD (Mass Storage Device) to get it programmed. The latest Segger OpenSDA firmware has this ability added now too: Programming the board with a virtual MSD device:

Virtual MSD Device

Virtual MSD Device

Continue reading

FreeRTOS Thread Debugging with Eclipse and OpenOCD

FreeRTOS is probably the number one RTOS used, and Eclipse is likely the most popular IDE I can think of. But debugging FreeRTOS applications with Eclipse and GDB is somewhat limited? What I would like to get at the minimum is this: ability to see all the different threads in the Eclipse debug view like this:

FreeRTOS Threads in Eclipse with OpenOCD

FreeRTOS Threads in Eclipse with OpenOCD

As you might guess from that screenshot: this post is about how to make FreeRTOS tread debugging possible with Eclipse and GDB :-).

Continue reading

Debug Multiple Boards with GDB at the Same Time

Many times it is very useful to debug multiple boards at the same time. For example if I’m debugging a communication stack between two boards: that way I can debug the protocol on both sides. Eclipse is a great framework which allows that. This post shows how to debug multiple boards (e.g. the NXP Freedom boards) in parallel from the same Eclipse IDE using GDB and the Segger J-Link:

Two NXP Freedom Boards debugged at the same time

Two NXP Freedom Boards debugged at the same time

Continue reading

SWD Debugging the FRDM-KL43Z

It is possible to use the Freescale FRDM-KL43Z to debug another board (see “Using the Freescale Freedom (FRDM-KL43Z) to Debug other Boards“). The FRDM-KL43Z has an on-board debug probe integrated, the OpenSDA. But it is easily possible to debug the board directly with a SWD debug probe like the P&E Universal Multilink or the Segger J-Link.

Debugging the FRDM-KL43Z with SWD

Debugging the FRDM-KL43Z with SWD

Continue reading

Unboxing the Freescale FRDM-KL43Z Board

I’m preparing for the next semester at the university starting in September this year. As part of that, I’m currently evaluating the Freescale Kinetis FRDM-KL43Z board:

FRDM-KL43Z Board Unpacked

FRDM-KL43Z Board Unpacked

Continue reading

Sensirion SHT11 Temperature and Humidity Sensor on a MikroElektronika Click Board

In one of my earlier posts (“Using the DHT11/DHT22 Temperature/Humidity Sensor with a FRDM Board“) I’m using the DHT11/DHT22 temperature/humidity sensors with the FRDM-KL25Z board. These sensors are very inexpensive, but have limited measurement range and accuracy. As pointed out by a reader of that article, Sensirion (a Swiss company :-)) has good sensors too, and I decided I would like to try the SHT11 sensor:

  • 0-100% Relative Humidity
  • +/- 3% Relative Humidity accuracy
  • -40 – +125°C
  • 2.4 – 5.5V supply voltage
SHT11 Sensor

SHT11 Sensor

Continue reading

Illustrated Step-by-Step Instructions: Updating the Freescale Freedom Board Firmware

I have received a bunch of Freescale FRDM boards to be used in an Embedded Systems programming crash course. There are multiple issues with the boards coming from the factory:

  1. They come with an old bootloader which is not compatible with Windows 8.x
  2. They have an old and outdated firmware on the board only supports a MSD bootloader

This post is a step-by-step instruction how to update Freescale FRDM boards (e.g. FRDM-KL25Z) to the latest firmware.

FRDM Board

FRDM Board

Continue reading

DIY Free Toolchain for Kinetis: Part 10 – Project Creation with GNU ARM Eclipse 2.1.1

As mentioned in Part 9: There is a new GNU ARM Eclipse plugin 2.1.1, and this one makes project creation for Freescale devices easier than ever 🙂

  • Native Kinetis-L project templates for FRDM-KL25Z and FRDM-KL46Z boards
  • Easier than ever project creation for Processor Expert projects
GNU ARM Eclipse 2.1.1

GNU ARM Eclipse 2.1.1

Continue reading

New P&E OpenSDA Firmware v114

Good news for everyone having Windows 8.1: P&E has released Dec 11th 2013 a new FRDM board firmware which solves the bootloader issue found with Windows 8.1. The new firmware can download from https://www.pemicro.com/opensda/.

New PnE OpenSDA Firmware

New PnE OpenSDA 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

FRDM Board Bootloader fails with Windows 8.1 Preview

Microsoft has released the Windows 8.1 Preview. So you can try out the next update of Windows 8. In short: Do NOT use Windows 8.1 Preview if you are using a Freescale FRDM board! Otherwise you will not be able to change the OpenSDA firmware (MSD or debug application).

❗ Update: P&E has released a new firmware v114 which combines USB CDC, MSD bootloader and debug application, and this firmware fixes the issue described in this post.

Well, I have not used it personally: I never use ‘test’ or ‘preview’ versions on my ‘production’ machine. It is ok to try things out on separate ‘scratch’ machines, but not on something I need to have stable for my work. Well, some of the students in my INTRO class were not able to resist and downloaded and installed Windows 8.1 Preview on their machines. With the result that the OpenSDA Bootloader does not work with Windows 8.1 Preview:

❗ It seems that the problem exists as well with the Windows 8.1 ‘final’ release.

Continue reading

The Freescale OpenSDA Trap: “No Device Available”, or something like that….

Self-Motivation: I write this post in the hope to cut the number of ‘please help me’ emails in my inbox ;-):

If you want to debug one of the Freescale boards with OpenSDA (FRDM-KL25Z, FRDM-K20, FRDM-KL05Z, FRDM-KL46Z48M, FRDM-KL02Z, TWR-KL47Z48M, …), and if you get this dialog …

No Device Available

No Device Available

… then read on.

Continue reading

USB for the Freescale ARM Kinetis KL46Z and K21D50M

As I was so pleased with the FRDM-KL46Z board, that I have ordered the Tower version of it, the TWR-KL46Z48M:

FRDM-KL46Z with TWR-KL46Z48M

FRDM-KL46Z with TWR-KL46Z48M

What I missed so far was USB support for the KL46Z. So time to have a quick look at board(s) and to add USB support for it.

Continue reading

Device Driver for Freescale MAG3110 Digital Magnetometer

One of the ‘goodies’ of the FRDM-KL46Z is the Freescale MAG3110 magnetometer. The MAG3110 is a tiny 2×2 mm device:

MAG3110 on FRDM-KL46Z

MAG3110 on FRDM-KL46Z

What was missing so far is a Processor Expert component for it. This post is about closing this gap…

Continue reading