STM32-ESP8266¶
In the previous section, we directly used the serial port to communicate with the ESP8266 module and tested the AT command. In this section, we will use STM32 to control the ESP8266 module to achieve more functions.
Driver Reference¶
HANDS-ON¶
HARDWARE SETUP¶
Follow the table below to connect the ESP8266 module to the MCU.
ESP8266 PIN | MCU PIN |
---|---|
VCC | 3.3V (or external VCC) |
GND | GND (or external GND) |
RX | PA2 |
TX | PA3 |
SOFTWARE SETUP¶
CUBEMX configuration:
- Enable the USART2 peripheral, keep default settings.
- Enable NVIC configuration for USART2.
- Enable DMA for USART2 RX.
DRIVER TRANSPLANTATION¶
Refer to the links above for driver transplantation.