Can't Configure ESP-01 With AT Commands Using KL25Z

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't Configure ESP-01 With AT Commands Using KL25Z

2,047 Views
ElectroDesi9n
Contributor II

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 connectionsMy current connections

 

Can someone tell me why it's not working?

 

FRDM-KL25Z 

0 Kudos
Reply
2 Replies

2,015 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

 

xiangjun_rong_0-1734581432200.png

 

0 Kudos
Reply

2,014 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply