USART Configuration
- January 12, 2024
- 4 replies
- 3233 views
Hi,
I need help configuring a USART connection between a STM32L452RE Nucleo Board and a ESP8266-01 wifi chip. My goal is to send AT Commands from the STM32 to the ESP8266.
I currently have my USART TX and RX connected to the RX and TX respectively of my ESP8266 board, and I've noticed that the LED is flashing on the ESP8266 when debugging through these commands, indicating that a signal is indeed being sent via my USART. However, i've noticed that the data has been scrambled on send and receive, as if i change the password to my wifi hotspot, I am unable to connect to it. By piping the USART1 RX directly to my serial monitor, I noticed a significant amount of scrambling.
I have proved that this sequence of commands works as intended, and have been able to connect my ESP8266 to an arduino uno, as well as an STM32 bluepill using RX and TX in default mode, but my attempts to get my project to work on the STM32L452RE have failed.

The way that I am piping the commands is shown above, and the output on my serial monitor looks something like this:

In terms of BaudRate, my ESP8266, USART1 and USART2 all use 115200. I have also tried the serial monitor at 9600, but haven't seen the responses that I expect as with my current piping setup i only receive one character ( A A W A).
My current USART1 configuration is shown below.

I'm looking for some specific guidance on how to configure my USART for this situation. I've noticed some things where it might be necessary to try the RX on Open drain, however this has brought me no luck. My .ioc and source files are provided. My ESP8266 is powered by an external voltage source, with only TX and RX connected to my STM32L4.
Thanks!
