In this section, you’ll find documentation on the STM32Cube USB Device library. This library is offered as part of the STM32Cube suite of free development tools and can be deployed quite easily into any STM32 project using the STM32CubeIDE. Using it, however, isn’t straightforward. Hence the need for this section.
New ! Adding Interface Connectors
Cool as it looks, the OLED display we’ve just installed on our prototyping board is just a display. Microcontrollers (and by extension, this prototyping board) are meant to interface with all sorts of electronics so they can control them. It’s in the name. I’m talking sensors and actuators, for the most part. But also storage devices, radios, and even other microcontrollers.
New ! OLED Prototype Board
Microcontrollers are not the friendliest computers in the world. Let’s face it, if you want to know what’s going on inside them you have little choice but to solder LED’s before you need to resort to cumbersome solutions like a UART connection to a remote terminal, or a JTAG debugger.
New ! First Code
We’ve built the simplest possible board based on the Maple Mini, now it’s time to verify that it works, and that we have an operational toolchain to go from an idea to actual software running on actual hardware.
New ! Basic Prototype Board
A module like the Maple Mini has almost no use on its own. It’s really barebones. It needs to be connected to peripheral hardware so it can interact with the world. It’s something I do so often that I’ve developed efficient ways to go from a simple module to a board. This is an example of how to get started. It’s by no means the only way or even the best way, it’s just a way that works really well and saves me time. Your mileage may vary.
New ! Programming
An STM32 microcontroller is traditionally programmed through its JTAG interface. That interface, when used with actual, works-for-a-living professional development software, will let you flash code into your MCU but also debug with breakpoints and even analyze your code’s variables in real time as it executes. That’s how we roll.
New ! The Electronics
The Maple Mini is essentially a one-to-one breakout for the STM32F103CBT6, which is a 48-pin variant of the STM32F103. Its features are summed up in this eloquent diagram :
New ! Vanilla Headless Setup
This setup is the basis for getting a Raspberry Pi to boot and then being able to use it remotely through your local network.
New ! Headless Setup
A Raspberry Pi is very easy to setup : it’s only a matter of downloading an operating system image from the official site and writing it to a microSD card. But if you stop there, all you’re getting is a desktop PC. That means you’ll need to add a keyboard, a mouse and a display to the Raspberry Pi to actually complete the installation of Linux and use it. For projects where your SBC will be embedded into a larger system, possibly a mobile one, this is unacceptable.
New ! Maple Mini
The Maple Mini, such as it currently exists, is a Chinese version of a discontinued Arduino-like STM32 module based on the STM32F103CBT6. For the sake of brevity, I will henceforth refer to those Chinese modules as “Maple Mini” but it should be clear that I’m not talking about the original module. Anyway, I’m more likely to just call it “the module”.