Hi there,
I want to configure the ESP-01 wifi module with AT commands using KL25Z board. But my UART configuration isn't working and I don't receive any response from ESP-01 module
I'm using MCUXpresso and I've attached the code. As you can see below, I've connected my laptop and KL25Z with miniusb. The connection between KL25Z and ESP-01 is as follows:
VDD -> P3V3
GND -> GND
Tx -> Rx
Rx -> Tx
Baud rates are set as 115200 and UART is in normal 8-bit without parity and 1 stop bit.
My current connections
Can someone tell me why it's not working?
Hi,
I have checked your code, I suppose it is okay.
But for the api function, it has issue. I modified it as following.
// Function to send data to ESP-01 via UART
void send_data_to_esp(const char data) {
while (!(UART_GetStatusFlags(UART) & 1<<7)) //check the TDRE bit
{
UART_WriteByte(UART, data); // Send each byte to UART
}
}
Each calling, you can only transfer ONE byte.
Hope it can help you
BR
XiangJun Rong
Hi,
BTW, pls connect a scope and check the uart_txd pin if it has waveform after you transfer.
I suggest you use interrupt mode instead of polling mode.
Hope it can help you
BR
Xiangjun Rong