A class to access MCU registers

Back from holidays, back to other hobbies. One thing that I hate when programming on MCUs is that you almost always access register directly through macros, masks and bit shifting operations; so, inspired by this talk on Youtube I decided to write my own code to access registers. The result is a couple of templates that makes it possible to access registers in a clean way. First is the Bitfield class: it allows to access some specific bits on a memory address; you can combine many Bitfields Read more [...]

Flashing and debugging non-development STM32 boards under Linux

In a previous article we've seen how to flash and debug STM32 boards that have an onboard SMTLINK-V2 circuitry, such as the Nucleo and Discovery boards. However this is not always the case, as for many STM32F103 boards (like the blue pill or the red pill); so we need another way. Luckily, there is. The easy way the easy way to flash and debug any board is to buy an STLINK clone online for a few euros; then use it as explained in the previous article. The DIY way You can also flash Read more [...]