ARM-based Debugging Tool Aims To Improve On The Bus Pirate Performance

The Bus Pirate is a fantastic development tool. It does an amazing job at a lot of different things. And as it has matured, community support has driven it to new areas beyond the original design. This is where its hardware holds back performance a little bit. For instance, as an I2C or SPI sniffer it has limited capture speed. That’s the type of thing that this board could improve upon. It’s a debugging tool based on an STM32 F4 microcontroller. That’s an ARM Cortex-M4 chip which runs at 168 MHz, and has 192 KB of SRAM.

[TitanMKD] has been working on the design but it is still just in digital form. Since there’s no prototype there is also no firmware for the device. That’s a tall mountain to climb and it’s one of the reasons we’re featuring the project now. [Titan’s] plan is to model this after the Bus Pirate interface. We think it’s a good idea since a lot of folks have already learned the syntax. We didn’t see a contact form on his site, but if you’re interested in contributing to the project you might want to leave a comment here or on his project page (linked above).

New STM32 Discovery Board Can Now Be Programmed On Linux

Last Wednesday I posted a video review of the new STM32F0-Discovery board which is built around an ARM Cortex-M0 chip. I speculated that it should work with the open source project aimed at programming these discovery boards. I tested it out and a connection could be made, but no code could be flashed. So I spent a few hours over the weekend and added support.

My updates are already in the stlink repository. After cloning the code, you can use three commands to compile the software (./autogen.sh, ./configure, make). That’s assuming you have all of the necessary dependencies (I had to install libusb-1.0-0-dev) and that you add the udev rule suggested in the documentation (also found in the repository). The program st-util connects to the board and provides a listening port for an ARM debugger (I’m using arm-none-eabi-gdb from CodeSourcery G++ Lite).

When I first started testing, the chip id was reporting as 0. It turns out the register address polled for this information was wrong. After finding that in the almost-900 page reference manual I went through the painstaking process of finding the hex values necessary to properly memory map the device. From there I also updated the blink example to generate an ELF file compatible with the Cortex-M0 chip. So out of the gate you should be able to use an ARM cross compiling toolchain to compile the example, connect to the board with this utility, then use the debugger from the toolchain to connect and flash that example to RAM.

There’s lots more to be done. To fully utilize the chip it is necessary to use a startup file and linker script when compiling. I’ve done nothing in this area, but I hope to work on some tutorials as I get further along. Of course if you have your own successes developing for this board using a Linux machine we want to hear about it!

Video Review: STM32F0-Discovery Board

The STM32 Discovery boards are nothing new, we’ve looked at them several times. But the newest sibling in the line might be just the thing to make the leap from your steadfast 8-bit projects. We got our hands on it and recorded a video review.

The STM32F0-Discovery gives you a programmer and ARM Cortex-M0 chip all on one convenient board. The top portion is the ST-Link V2 programmer, and includes jumpers and a programming header which let it easily program off-board chips.

The included microcontroller is an STM32F051R8T6 which includes 64kb of program memory and 8kb of RAM. Coming in at $1.80-3.77 in single units and in a hand-solderable LQFP package this raises an eyebrow for our future projects. It has an 8 MHz internal oscillator with 6x PLL which means you can run at 48 MHz without an external crystal (check out [Kenneth Finnegan’s] PLL primer if you don’t know what this is).

The only thing holding us back is the development environment. ST provides everything you need if you’re on Windows, but we want a Linux friendly solution. We know other Discovery boards have worked under Linux thanks to this project. This uses the same ST-LINK V2 so it should work as well. If you want one of your own head over the ST page to see if they’re still giving away samples. There should be a button labeled “Register for your FREE KIT”.

Resizable ARM Dev Board; Just Take Some Off The Top

[Bob Alexander’s] most recent project is a hack saw resizable ARM breakout board. He wanted to start using more ARM microcontrollers in his projects and went for a breadboard friendly design. It uses a 40-pin dip package, but if you need the horsepower but not the I/O you can literally cut it down to size. We might recommend grabbing some tin snips, which can cut through a PCB like butter, but to each his own.

The board is based around an STM32 chip. You’ll find a crystal oscillator for the system clock, and a clock crystal if you need it. On the other side of the chip he included a footprint for a voltage regulator. This setup provides a remarkable range of input voltages, accepting from 2 to 3.6 volts without the regulator, and up to 16 volts if the regulator is present. He designed a package footprint that can be easily bridged if there’s no SMD part there. Just make sure you insulate that pad if you are using one with a conductor on the bottom. He explains this in detail in his writeup.

You’ll need a programmer to work with the board. He uses an STM32 Discovery Board for this but there are quite a few other options out there too.

Using A Touch Screen With An STM32 Microcontroller

[Andy Brown] has been working on a series of tutorials revolving around the STM32 processor family. He’s using the STM32plus development board, with an STM32F1 ARM Cortex M3 processor to drive a couple of different full color graphic LCD screens. His latest installment shows how to read from the touch screen included with both displays.

After the break we’ve embedded the video from which this screenshot was taken. As an example, [Andy] has programmed a painting program to show off what the touchscreen overlay is capable of. It starts off with the calibration routine we’re all familiar with, then drops to this screen with a virtual control panel and blank canvas.

This hardware uses the Texas Instruments ADS7843 controller, which [Andy] says is extremely common and that several other manufacturers use the same communications protocols. He discusses how to communicate with the controller, and how to incorporate the data into your program. Included is an open source library which you can use in your own projects.

Continue reading “Using A Touch Screen With An STM32 Microcontroller”

Micromouse Wins 2011 Maze Race In Under 4 Seconds

It’s off to the races once again with the Micomouse maze solving contest at the 2011 RoboGames. This is a picture of the winner, a bot called Min7 (main page) which was built by [Ng Beng Kiat]. Using four phototransistors and a flash sensor it managed to first map the contest maze, then speed run it in under four seconds. See both runs in videos after the break. He’s certainly got a leg up on the bots we saw last year. Min7 beats them both in time, and overall control during the speed run.

[Ng] mentions that this year is the first time he’s built a micromouse with four wheels instead of two. There’s a gyro on board which aids navigation by feeding the orientation data to the STM32 chip which controls the device. We took a moment to page through his past designs. It’s remarkable how they’ve evolved through the years. Continue reading “Micromouse Wins 2011 Maze Race In Under 4 Seconds”

ARM Programming Primer; Getting The USART Running

We find it interesting that PIC and AVR programming is very common in hobby electronics but ARM doesn’t have nearly the same foothold. This is partly because there’s a knowledge barrier involved with making the transition (the other part is probably the lack of DIP packaged chips). But if you’ve worked with 8-bit microcontrollers you can certainly make the jump into the 32-bit realm. Here’s a great opportunity to get your feet wet. This guide will show you how to get the USART on an STM32 Discovery Board working, which makes it easy to get feedback about what’s going on in your program.

One difference you’ll notice when moving to ARM microcontrollers is that there is almost always a library bundle available from the manufacturer which includes all of the functions you need for hardware control (USART, USB, Ethernet, ADC, etc.). That’s the case here, so simply including the USART library makes it a snap to finish the rest of the program. Once you hook up your communications hardware (an FTDI cable in this case) just use the library initialization functions, followed by the send and receive commands and you’ll be pushing messages to a computer terminal in no time.

If you’re trying to use the STM32 Discovery Board with a Linux box here’s a shove in the right direction.