ESP32 controlled by AT commands limitations

Fluffy_Port
Posts: 8
Joined: Wed Jan 18, 2023 11:20 pm

ESP32 controlled by AT commands limitations

Postby Fluffy_Port » Thu Jun 06, 2024 12:15 pm

I am currently working on a project where an ESP32-WROVER module is controlled by another microcontroller, specifically an STM32G070 (with fewer capabilities and no RTOS), via AT commands over an RS232 interface. The ESP32 runs with the ESP-AT firmware. My question is related to the limitations of this setup, particularly in the context of utilizing the advanced features of the ESP32. The way I see it, it makes no sense to use a much less powerful MCU like the STM32 as the master and leave the more powerful and capable ESP32 as an auxiliary module, controlled by AT commands via RS232. Here are my doubts:

Real-Time Operating System (RTOS): Is it possible to leverage FreeRTOS on the ESP32 while it is operating under AT command control? Can the RTOS functionalities be effectively witht the ESP-AT firmware?

Multicore Processing: The ESP32 is a dual-core microcontroller. Can both cores be efficiently ? Are there specific commands or configurations that enable this that I missed? Is it even possible?

Real-Time Tasks: How are real-time tasks managed when the ESP32 is controlled through AT commands? Is there a way to create tasks pinned to cores or ensure timely execution similar to what is achievable through direct FreeRTOS programming?

Thank you in advance for your help!
Last edited by Fluffy_Port on Thu Jun 06, 2024 3:28 pm, edited 2 times in total.

MicroController
Posts: 1759
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP32 controlled by AT commands limitations

Postby MicroController » Thu Jun 06, 2024 1:51 pm

via AT commands over an RS232 interface
Are you using Espressif's "AT firmware" or do you (plan to) implement your own UART/"AT" protocol processing on the ESP?

Fluffy_Port
Posts: 8
Joined: Wed Jan 18, 2023 11:20 pm

Re: ESP32 controlled by AT commands limitations

Postby Fluffy_Port » Thu Jun 06, 2024 3:35 pm

MicroController wrote:
Thu Jun 06, 2024 1:51 pm
via AT commands over an RS232 interface
Are you using Espressif's "AT firmware" or do you (plan to) implement your own UART/"AT" protocol processing on the ESP?
I've updated my post, since it was quite on point. Indeed. I've started to work at a new company that has this project, which is kind of in a messy state.As far as I'm concerned, the previous developer downloaded the ESP-AT firmware on the ESP32, and then the BLE and WiFi features are controlled via AT commands by the STM32. I have experience with ESP32,ESP32-S3 series and ESP-IDF and arduino frameworks but never used the ESP-AT firmware.

MicroController
Posts: 1759
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP32 controlled by AT commands limitations

Postby MicroController » Fri Jun 07, 2024 4:57 pm

Looking at the code (https://github.com/espressif/esp-at), the AT firmware seems to be just another regular ESP-IDF application. There's an app_main() and it creates FreeRTOS tasks to do the work. It should be easy to add your own code/tasks to it, which would then run concurrently to the AT tasks.

The question would obviously arise if you need the STM32 at all, or if the ESP could do it all by itself.
If you keep the STM32, you may want to consider switching the ESP32 for an ESP32-C3 or -C2: Cheaper, less powerful SoCs which won't break a sweat running the AT firmware either. I.o.w., a 240MHz dual-core MCU is pretty over-powered for the simple task.

Who is online

Users browsing this forum: Bing [Bot] and 76 guests