STM32 controllers

Related: hacks, Stellaris, Maple

This page should contain projects, ideas, observations, and resources relating to the ST STM32 line of ARM controllers and tools.

There may be some affinity with STM8 that seems to be very affordable and available. There are less tools, though, and the price difference is not that great in small numbers.

You can find many people saying that ST seems to completely ignore any bug reports for their documentation and libraries.

Hardware

STM32 is also used in Ruuvitracker :)

STM32F103

f103 family chart
F103 family chart (from st.com)

I have a board with STM32F103RBT6. There is a nice set of family members available. It's slightly up the scale from the F100 on the VL discovery board.

On-board DAC sounds like an interesting thing, but sadly doesn't seem to appear in the RB "mid-range" devices.

STM32F030

A smaller Cortex M0 chip.

Maple

Leaflabs Maple board, library...

Toolchain

Most documents are ancient, as usual, and show either proprietary or scripted unmanaged installs. It should be possible to do better by now. MSP430 (pre-RH) and AVR are nice examples of how far proper distributed development environments have come from these early phases.

I initially tested OpenOCD/JLink/STM32 combo and could scan a board.

Found some useful looking ARM tutorials at embedds.com on linker scripts and startup code.

I'm testing Debian "bare metal" GCC. Building things and objdump etc work as usual. Gdb also runs and interfaces happily with OpenOCD. OpenOCD should also have support for STLink. JTAG with j-link and lc-tech board works as far as I've got with that.

There are texane/stlink packages of various ages in Debian as well as stm32flash.

DFU may be supported in places, using dfu-util.

Another approach could be Mecrisp Forth.

Firmware

See stellaris page for some overlapping text on libraries and licensing.

Random notes

FSMC looks like a fascinating feature on the bigger devices.

The FSMC is present in devices delivered in both 144-pin and 100-pin packages. For devices in 100-pin packages, however, only some FSMC banks can be used because not all pins are available. (AN2784)

On reset, SP is loaded from 0x0000.0000 and PC form 0x0000.0004.

M3 has a fixed memory map:

Projects and links