# Connecting ESP8266 with STM32 Nucleo

I am trying to use ESP8266 with STM32L476RG Nucleo. The ESP8266 requires up to 300 mA to transmit properly. I tried to connect my ESP to an Arduino Mega, and it responds correctly, but when I brunch the ESP to the STM micro controller, the AT command was sent correctly, but the response message is not correct (if I send 'AT+RST' the response would be 'AT +RST').

I want to ask if the STM32L476 Nucleo can provide 300 mA that the ESP requires.

If it can require that 300 mA, what do you think the issue could be?

Well, I tried to use an external power supply that can provide 3.3 V the ESP8266 is responding this time with garbage characters baudrate = 115,200 and Tx -> Rx , Rx->Tx, CH-PD -> 3.3 V, VCC -> 3.3 V, and Gnd -> Gnd.

I am working with IARWorkbensh and the code is simple:

if (HAL_UART_Receive_IT(&UartHandle, aRxBuffer, RXBUFFERSIZE) != HAL_OK)
{
Error_Handler();
}

if (HAL_UART_Transmit(&UartHandle, (uint8_t*)aTxBuffer, TXBUFFERSIZE, 5000) != HAL_OK)
{
while(1);
}


aRxBuffer is a buffer containing the data received.

aTxBuffer is a buffer containing the command transmitted to the ESP8266 (in my case I'm sending an "AT+RST\r\n" command).

• You will need to connect the external power supply to your nucleo board Aug 2, 2017 at 9:06
• Add your code, and the evidence that the command was sent correctly. Aug 3, 2017 at 9:22