cancel
Showing results for 
Search instead for 
Did you mean: 

UART message not Receiving in ESP32 from STM32

mast3rshinobi
Associate II

hi all,

I'm Trying to send a string from STM32F401RE MCU to EPS32 Via UART i have programmed both STM as well as ESP32 and i successfully verified that data is available on UART pin of STM

 
mast3rshinobi_2-1699771354335.png

 

Data on UART Pins of STM

But I'm not able to receive data on ESP32, i double checked the UART Hardware connection is correct

and i configured STM UART in TX_ONLY mode , did not configure any hardware flow pins ,baudrate is 9600,1 stop bit and not using parity

 

 
mast3rshinobi_3-1699771410201.png
ESP32 UART RX

 

I'm receiving some Garbage value on Arduino

can anyone please help me with the UART message not Receiving in ESP32

12 REPLIES 12

This is some very superficial top-level initialization.

Please provide some usable context.

What Chip?

What Board?

What Pins?

What Connectivity?

How are you inspecting the output? What code moves the data from the input to the output?

You looked at the signals with a scope or anything?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I am using th STM32F401re board and i am trying to send the MPU6050 accelerometer values from the STm32 to the esp32 via uart6 

the usart6 initalization is that i have given above and the esp32 code for the recieving i have used is 

#include<HardwareSerial.h>
HardwareSerial SerialPort(2);

void setup() {
Serial.begin(115200); // Initialize the Serial Monitor for debugging
SerialPort.begin(115200,SERIAL_8N1,16,17); // Initialize the UART interface (e.g., Serial2)
}
void loop() {
if (SerialPort.available()) {
String Buffer = SerialPort.readString();
// Process the received character as needed
Serial.print("Received: ");
Serial.println(Buffer);
}}

i have connected the pc6 pin to rx2 of the esp32

 

Do your boards share a common ground? RX2 GPIO16

Data somewhat garbled, or totally?

Have you checked the signal with a scope to double check baud rate?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..