Moving from ESP32 to STM32: What Changed in My Embedded Design?
Category: Embedded Systems · Microcontrollers · Robotics
When I started working with embedded systems, the ESP32 was a convenient platform for developing and testing ideas. Its built-in wireless connectivity, accessible development environment, and wide range of libraries made it possible to get projects running quickly.
However, as I moved toward more advanced robotics projects, I began paying more attention to the lower-level details of embedded development. Timing, interrupts, PWM generation, ADC configuration, and peripheral control became increasingly important parts of my design process.
This led me to explore STM32 microcontrollers and a different approach to developing embedded systems.
In this article, I share the main differences I noticed in my development workflow and why choosing a microcontroller depends on more than just its processing power.
1. From Quick Prototyping to More Detailed Configuration
One of the biggest differences I noticed was the way peripherals are configured.
With the ESP32, the Arduino framework provides a straightforward way to get started. Functions for GPIO, PWM, ADC, and communication interfaces allow developers to build prototypes without dealing with every hardware configuration detail.
This is particularly useful when the main goal is to test an idea quickly.
With STM32, I started working more closely with STM32CubeMX, peripheral configuration, and the STM32 HAL. Setting up timers, interrupts, ADC channels, and communication interfaces required a clearer understanding of the microcontroller's hardware resources.
Although this introduced an additional learning curve, it also helped me understand what was happening beneath the application code.
I began thinking more carefully about which peripheral should perform each task and how the hardware resources should be allocated.
2. Understanding Timers, PWM, and Interrupts
In robotics, timing is not just a software detail. It directly affects how consistently a robot responds to sensor readings and motor commands.
