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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

2,061件の閲覧回数
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 

ラベル(3)
0 件の賞賛
返信
2 返答(返信)

2,029件の閲覧回数
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,028件の閲覧回数
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 件の賞賛
返信