SparkFun Thing Plus - Ambiq Apollo3 - part 1

Driven by the idea of building a Bluetooth keyboard like device, I've bought the SparkFun Artemis Thing Plus board. It's a board designed for small, power efficient devices with Bluetooth capability. SparkFun Artemis Thing Plus The board carries an Ambiq Apollo3 processor. It's an ARM Cortex-M4F chip. Runs at 48MHz but can, for a brief amount of time, go up to 96MHz. Here you can read more about the whole Apollo line-up. [Read More]

Black magic probe out of cheap STLink programmers

If you have ever worked with ARM Cortex M processors you've probably used GDB + OpenOCD combo for debugging. If you didn't: OpenOCD connects to the processor via a STLink programmer and opens a socket to which GDB can connect. It will push data necessary for debugging (and understandable for GDB) through this socket. That means that if you connect GDB to this socket (so called remote debugging) you can debug processor's software like any other application on your PC. [Read More]

[STM32] - part 3 - Start your engine!

I think it's time to go through what happens when you power on the STM32 Cortex-M microcontroller. There is a lot of resources on this topic (if you are reading this one… thank you!). I will explain this process in my own words. You have powered on your microcontroller. Less than a second has passed and it is already munching through data, sending and receiving messages, controlling motors and blinking leds. [Read More]

[Knowledge snippet] - STM32 bootloader

You programmed STM32 microcontroller using Nucleo or Discovery boards. Those use Serial Wire Debug (SWD) for programming/debugging. Now you are designing a PCB with STM32 microcontroller on it which means you have to be able to program it. One of the solutions is uploading the code through a bootloader - small piece of software made by ST that's in the protected memory of the microcontroller (read-only). It reads the data being sent from the PC and copies it into FLASH memory. [Read More]

[STM32] - part 2 - Lets look inside!

Still wondering why it all works? Why this black square does things? Lets go deeper. Previously I explained a bit about processor architecture. It's the basis of the chip. It's a fundament. You won't find anything about an UART in a Technical Reference Manual of Cortex-M4. It's just not a part of this fundament. When you get an STM32 microcontroller based on the Cortex-M4 architecture you just get microcontroller made by ST which uses this specific architecture. [Read More]

[STM32] - part 1 - Cortex what...?

Recently I wrote a short article about setting up an environment for programming STM32 microcontrollers with the libopencm3 library. You can read it here. I wanted to write the second part as soon as possible but I found out that even though I could, I didn't understand everything well enough. I just didn't feel comfortable with the subject. That's why I started this series. I want to explore what actually happens when you program STM32 microcontroller. [Read More]

Adventures in libopencm3 - part 1

Recently I started working on a new project. It will take some time before the goal of the project is even worth mentioning. The important part is that it is an electronics/hardware project and it needs an energy efficient compyting unit. For early development I chose an ARM Cortex M3 STM32F3 microcontroller. More precisely STM32F303K8T6 mostly because I have a Nucleo board with this chip laying around. What's intersting is that ARM chips are so popular you can also choose a framework. [Read More]