# STM32 Development Board This target is a generic STM32 development board. The idea is to make it easy to create custom transmitters based on those boards. Hopefully, some of the code for supporting generic hardware will spin back into the base, making it possible for hardware hackers to add features without needing a custom build to support them. # Board requirements and features. The minimum CPU requirements are an STM32F1, 256K of flash and 48K of ram. While deviation supports chips with as little as 128K of flash and 20K of ram, those requires removing features and dynamically loading code in order to fit, among other issues. Given that we're picking a board in advance, there's little point in choosing such a board. At this time, there's not much call for more, though some functions may want a faster CPU or more flash as build code for more general configuration. A UI is required, either built into the dev board or as an extra module. Existing UI's are all based on LCDs and buttons, though a touch screen clearly makes the buttons optional. There are GUI's based on multi-line text displays (which may work on a single-line of text; something to play with in the future), B&W graphic displays, and color touch screens. The only initial requirement is that libopencm3 have a driver for the display and touch screen. Some form of non-volatile storage is also require above that used to run code. The exact minimum depends on the display technology, as it is used to store fonts and graphics for the display. 2MB is recommended for a B&W display, 4MB for a color screen. There is an experimental file system for use with very small - 10s of K - chips, but again this is not something you'd use if given the choice, and the point is to be given the choice. Finally, if the CPU has a DAC, then audio playback can in theory be handled by the CPU, with no need for an external audio module as used in the transmitters. This is subject to verification, but could well require a faster CPU, and will definitely require more external storage for storing audio. # A survey of STM boards The general target are the STMicroelectronics evaluation and development boards. They have three different lines, the "Eval", "Discovery" and "Nucleo" Boards. The Eval boards tend to have lots of external circuitry - serial connectors, etc. - that aren't of use for this project. The ones I looked at also cost orders of magnitude more than the Discovery and Nucleo boards, so they were dropped from consideration. The Discovery and Nucleo boards all have built in ST-LINK programmers with a USB connection that can be used to load new firmware. The more recent ones also support the CMSIS-DAP, making them particularly easy to program. ## Discovery boards The Discovery boards are meant for prototyping, and as such have feature sets designed to be inexpensive but flexible. They generally start at around $30, though the older STM32F4 Discovery and STM32F3 Discovery are available for about half that if you can find them. But if you're looking at these, see the Nucleo boards below. The STM32F0, STM32L0, STM32l1 and STM32VL boards don't have sufficient flash, so aren't suitable. The STM32F3 boards are also generally unsuitable due to lack of memory. The exception is the STM32F3 Discovery. However, it's about the same price as the STM32F4 Discovery and much less powerful, so there's little reason to consider it. The STM32F4 boards also come in a number of lines. The STM32F40x and STM32F41x are nearly identical, with different sensors and minor CPU tweaks. Any of them should do just fine. The original STM32F4 Discovery is more than adequate and has a DAC. It's also seen as the STM32F407Discovery, and newer versions have a fancier ST-LINK that won't make any difference for this project. The older one can be found - sometimes - for about $15, includes a DAC but no display or non-volatile memory. It's probably the least expensive of the Discovery boards that are adequate for this project. The STM32F429I and STM32F469I Discovery boards are particularly interesting, as they both include color touch screens as part of the package. The 429I is available for that $30 price point, but both of it's DAC outputs are used to drive the LCD, which makes playing music through it interesting, to say the least. It's also has no non-volatile storage. The 469I is still being evaluated, but shouldn't have that problem, as well as having both non-volatile ram and an SD card slot. However, it's also twice as expensive. The STM32L476G Discovery is also interesting. It has a 24 segment LCD and audio output at that $30 price point. Assuming the 24 segment LCD can be made to work, it might be the least expensive "complete" discovery solution. The STM32F7 kits include enhanced networking. Might be interesting for experimental projects, but are overkill and overpriced for a transmitter. I have an F4-Discovery, 429I and 469I that I'll be testing on. ## Nucleo boards The Nucleo boards are a later development aimed more at the "maker" market. The really interesting thing about them is that inside the expansion headers typical of the Discovery boards, they have Arduino-compatible expansion headers. These have the same physical layout as the Arduino Uno, and the pins that are available on each connector have functionality matching those pins on an Arduino, so you ought to be able to make use of an Arduino board, though you'll need your own library. This also means they tend to have fewer onboard devices, since it's inexpensive to add them. For some reason, the hardware seems to be a bit cheaper, matching the Arduino quality instead of the Discovery board quality. Net result is that many of them are available for around $15. While Discovery boards can be had for that, it's only the older, less interesting ones. The most interesting possible addition is a touch screen LCD with an SD card reader on it. This are available for the Arduino for as little as $5, though more like $10 from a reputable vendor. Which still means you can get a system with all the relevant hardware for less than most of the Discovery boards cost. They also have the built-in ST-LINK programmer, but it's designed to be "broken off", and each board can be used stand-alone. That mean you get an ST-LINK to use for other things, as well as a smaller footprint on the nucleo board. The STM32L0, STM32F0, STM32F1 and STM32F3 Nucleo boards are underpowered. The STM32F2 and STM32F7 boards all have Ethernets and a higher price tag, so aren't really interesting. The STM32L4 boards use low-power version of the STM32F4 chips. They tend to cost a little more and have slower clocks, but are otherwise fine. Some of them even have an LCD display driver in the chip! They cost more than their STM32F4 counterparts, but less than Discovery boards. Might be interesting if you're worried about power consumption, but I can't see that for this project. The STM32F4 boards are the most diverse of the lot. The STM32F4##Z boards all have Ethernet, which more than doubles the price, so aren't interesting. The STM32F401RB doesn't have enough flash, but the rest - including the STM32F401RE - are fine, just with more processing power on board as you go to higher numbers and prices. I've got an STM32F401RE and an Arduino touch screen LCD + SD card to test with. ## Other options There are a wide variety of boards based on the STM32 ยต-controllers available from a number of vendors. There's no reason they couldn't be use for this build, and some of them may have features that aren't available on the STM boards. If you find one that's particularly interesting for some reason or price, let us know!