External interrupts on STM32 bluepill

 Author:   Posted on:    No comments

The bluepill is a cheap STM32F103 development board. It can be programmed even from Arduino IDE with an additional boards package. But to get the most out of it, you should develop software using the development kit from ST. This is because STM32 is much more complex than ATmega microcontrollers used by some Arduino boards. While the latter are use 8 bit CPUs, STM32F103 contains a 32 bit ARM Cortex CPU.

It's not my first attempt to program the STM32 bluepill using HAL library from ST. This post contains information about the tools you need to install in order to program the board. I'm going to make a new project in System Workbench and I will use the same clock configuration routine from the mentioned post (the SystemClock_Config() function). Then I will write code that toggles an LED when you push a button using interrupts.

STM32 bluepill on the breadboard

STM32 bluepill on the breadboard