The following problems were found during serial communication between stm32f205 and esp32:
1. The data received by the two are sometimes complete and sometimes combined with several frames of data.
2.The real-time performance of serial communication cannot be guaranteed。
Stm32f205 serial port:
Using DMA to send and receive receipts can ensure the communication speed, send and receive once in 50ms, the data length is less than 20 bytes, the length is uncertain, and the baud rate is 9600.
Esp32 serial port:
Modify the routine of sending and receiving at the same time on the serial port. It will not be sent until a certain character is received. Using UART2, RX_ Buffer set to 2048, TX_ Buffer is 0. Baud rate 9600, UART_ read_ Bytes for data reception, UART_ write_ Bytes to send data. The heartbeat frequency is modified to 1000 Hz, the timeout time is set to 50 ms, and 20 bytes are read each time.
I wonder how this problem can be solved.I would be appreciated for your answer.
Stm32f205 and esp32 serial port communication failure
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Stm32f205 and esp32 serial port communication failure
Can you post your code? I assume you already checked that the issue is on the ESP32 side, not on the STM side?
Re: Stm32f205 and esp32 serial port communication failure
just from what I have seen with this type of problems, are you using GPIO44 as RX ? I would recommend to change to another port for the RX pin, on GPIO43 I noticed some toggling of the pin as well, I never found out what this caused. I worked around by using other GPIO's.
good luck
good luck
Who is online
Users browsing this forum: SegmentationFault and 86 guests