Execution Tracing on Cortex-M3 Microcontrollers

The higher-power ARM micros have a bunch of debugging tools for program and data tracing, as you would expect. This feature – CoreSight Trace Macrocells – is also found in the lowly ARM Cortex M3 microcontroller. The Cortex M3 is finding its way into a lot of projects, and [Petteri] wondered why these debugging tools weren’t seen often enough. Was it a question of a lack of tools, or a lack of documentation? It doesn’t really matter now, as he figured out how to do it with a cheap logic analyzer and some decoders for the trace signals.

There are two trace blocks in most of the Cortex M3 chips: the ITM and ETM. The Instrumentation Trace Macrocell is the higher level of the two, tracing watchpoints, and interrupts. The Embedded Trace Macrocell shows every single instruction executed in the CPU.  Both of these can be read with a cheap FX2-based logic analyzer that can be found through the usual outlets for about $10. The problem then becomes software, for which [Petteri] wrote a few decoders.

To demonstrate the debugging capability, [Petteri] tracked down a bug in his CNC controller of choice, the Smoothieboard. Every once in a great while, the machine would miss a step. With the help of the trace tool and by underclocking the micro, [Petteri] found the bug in the form of a rounding error of the extruder. Now that he knows what the bug is, he can figure out a way to fix it. He hasn’t figured that out yet. Still, knowing what to fix is invaluable and something that couldn’t be found with the normal set of tools.

TiLDA MKe: the EMF 2014 Badge

The TiLDA badge from EMF 2014


Hardware conference badges keep getting more complex, adding features that are sometimes useful, and sometimes just cool. The Electromagnetic Field (EMF) 2014 badge, TiLDA MKe, is no exception.

This badge displays the conference schedule, which can be updated over an RF link with base stations. It even notifies you when an event you’re interested in is about to start. Since we’ve missed many a talk by losing track of the time, this seems like a very useful feature.

Beyond the schedule, the device has a dedicated torch button to turn it into a flashlight. A rather helpful feature seeing as EMF takes place outdoors, in a field of the non-electromagnetic sort. They’re also working on porting some classic games to the system.

The badge is compatible with the Arduino Due, and is powered by an ARM Cortex M3. It’s rechargeable over USB, which is a nice change from AA powered badges. It also touts a radio transceiver, joystick, accelerometer, gyroscope, speaker, infrared, and is compatible with Arduino shields.

For more technical details, you can check out the EMF wiki. EMF 2014 takes place from August 29th to the 31st in Bletchley, UK, and you can still purchase tickets to score one of these badges.

NXP’s ARM Micros With Motor Controllers


It’s still relitavely early in the year, and all those silicon manufacturers are coming out with new toys to satiate the engineer and hobbyist for years to come. NXP’s offering is the LPC1500, a series of ARM microcontrollers optimized for motor and motion-control applications.

The specs for the new chips include an ARM Cortex-M3 running at 72MHz, up to 256kB Flash, 36kB SRAM, USB, CAN, 28 PWM outputs, an a real-time clock. There are options for controlling brushless, permanent magnet, or AC induction motors on the LPC1500, with dev boards for each type of motor. Each chip has support for two Despite NXP’s amazing commitment to DIP-packaged ARM chips, the LPC1500 chips are only available in QFP packages with 48, 64, and 100 pins.

Don’t think the LPC1500 would be a perfect chip for a CNC controller – the chips only support control of two motors. However, this would be a fantastic platform for building a few robots, an electric car, or a lot of the other really cool projects we see around here.

Galago, the latest in a series of awesome ARM boards

Long time Hackaday reader [Kuy] sent in a project he’s been working on for the last year and a half. It’s called Galago, and it wraps up all the features we’d like to see in the current crop of ARM microcontroller dev boards into one neat package.

The Galago features an AMR Cortex-M3 microcontroller running at72 MHz. Included on its pinout are 25 digital IO pins, 6 analog input pins, 10 PWM pins, and an I2C and SPI port.

The Galago isn’t simply an exercise in hardware development, though. [Kuy] spent a great deal of time writing proper libraries for his board, allowing you to get started with the Galago very quickly without having to rely on crippled tools.

A proper library isn’t Galago’s only significant developer feature: [Kuy] went as far as to create a browser-based IDE (no Internet connection required, thankfully) that has the ability to upload code directly to the board via a USB cable. Add in a hardware debugger, and the Galago might just be the perfect ARM board for tinkerers weaning themselves off the Arduino.

[Kuy] has released the Galago on a Kickstarter, with a single board costing $25. It’s a cool device, and something we’d really like to come to market.