cancel
Showing results for 
Search instead for 
Did you mean: 

Transitioning from ESP32-S3 to STM32: Code Compatibility & Library Usage

Gabrowsk
Associate II

Hello everyone,

I've been diving into the world of ESP32s and Arduinos for approximately 2 years now. My current project focuses on GNSS tracking combined with radio transmission. Initially, I was inclined towards using the ESP32-S3, however, as the project evolved, I find myself inclined to seek a more robust solution with a more powerful MCU, hence my interest in the STM family.

Here's where I'm hitting a roadblock:

Given the significant time and effort I've already invested in developing code for the ESP32, I'm hesitant about starting from scratch. So, my question is:

  1. How seamless is the transition from the Arduino-like programming in C++ (as I've been doing with the ESP32) to programming an STM32?
  2. Can I expect to use most of the libraries created for Arduino? For instance, I'm utilizing Sparkfun's Arduino GNSS library for tracking. Is there a possibility that I can reuse a significant portion of the existing code?

Any insights or experiences you could share would be immensely helpful. Looking forward to your feedback!

11 REPLIES 11

Everything you've shown is much easier to do on the ESP32 than STM32 and you should have no problems doing it. Are you using FreeRTOS Tasks (to run things in parallel on different cores and stacks) and Queues (to queue up SD card writes and free the CPU time nearly instantly)? There isn't any reason why you couldn't simply buffer the data in internal DRAM or even SPIRAM (if you're using one with external RAM) and write it to the SD Card at regular intervals... The data doesn't need to be written at the same time it's being read, clogging up CPU's ability to do another read.

We've had excellent success with the pico-v3-02, that is dual core, WiFi / BLE / Bluetooth Classic, with 8MB flash built in and 2MB of external SPI RAM all in one chip.

No, I was not doing that. I did some research based on what you said and it turns out I was programming the ESP32 in a not-so-efficient way. Since I've been using Arduino-like coding this entire time, I wasn't aware of its full potential. Thanks a lot for the replies; I think I have an idea of what to do now.