2025-09-23 2:04 AM - last edited on 2025-09-23 2:43 AM by Andrew Neil
Hello,
I am trying to establish UART communication between STM32G070RBTX and ESP32 Devkit using AT commands.
Connections: STM32 UART TX ESP32 RX, STM32 UART RX ESP32 TX, and common GND
Power ESP32 powered from 5V pin by usb or base board
Baud rate 115200
On reset, ESP32 does not print ok or any AT response.
Very rarely once in many tries I get a single AT command response,
but after that no communication happens.
Even pressing the reset button does not bring it back.
When I connect the ESP32 module via USB to Dockight and send AT commands, the communication works fine.
2025-09-23 2:40 AM
Hello @vikas7 ,
Your issue with unreliable UART communication between STM32G070RBTX and ESP32 Devkit running AT firmware is common and can be caused by several factors. Below is a systematic checklist and recommendations to help you troubleshoot and resolve the problem:
Power Supply:
UART Lines Voltage Levels:
Wiring:
Boot Mode Pins:
Reset Behavior:
AT Firmware:
Baud Rate:
- Confirm both devices use exactly 115200 baud, 8 data bits, no parity, 1 stop bit.
Flow Control:
- Disable hardware flow control (CTS/RTS) unless explicitly connected and supported.
Best regards,
Aime
2025-09-23 2:53 AM
Welcome to the forum
Please see How to write your question to maximize your chances to find a solution for best results.
@vikas7 wrote:On reset, ESP32 does not print ok or any AT response..
Do you really mean that the ESP does not send anything, or is it just that the STM32 does not receive anything ?
It's really important to know this - as it tells you where to look for the problem:
See here for some tips on debugging serial comms.
@vikas7 wrote:Baud rate 115200
Have you checked that your STM32 baud rate is accurate? And the ESP32?
Have you thoroughly tested your STM32 serial comms on its own - before adding the complications of ESP32?
eg, have you tested your STM32 against a PC terminal (such as Docklight) ?
2025-09-23 3:07 AM
The in/output levels of the STM32 UART pins (Tx, Rx) are 3.3V.
This is not sufficient to drive a 5V device - including a 5V USB-to-serial adapter - directly.
The "5V tolerance" property of those pins only means they can tolerate 5V input signals, but not generate them.
2025-09-23 3:28 AM
@Ozone wrote:This is not sufficient to drive a 5V device - including a 5V USB-to-serial adapter - directly.
You might get away with it - but then you may not.
Certainly a recipe for unreliable comms - which does seem to be what @vikas7 is experiencing ...
@Ozone wrote:The "5V tolerance" property of those pins only means they can tolerate 5V input signals
Indeed.
So the STM receiving from the ESP should be OK ...