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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,055 次查看
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 项奖励
回复
2 回复数

2,023 次查看
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 项奖励
回复

2,022 次查看
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 项奖励
回复