FRDM K64F giving \n\nOK\n\n as output instead of \r\nOK\r\n

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

FRDM K64F giving \n\nOK\n\n as output instead of \r\nOK\r\n

跳至解决方案
1,219 次查看
oliviachristyva
Contributor III

Hi

I am interfacing FRDM K64F with Zigbee ETRX357. I am getting the output and my UART code is working but instead of the output \r\nOK\r\n for an AT\r transmitted i am getting \n\nOK\n\n. I cannot understand what is the reason. 

Please help me if you have got any clues..

Regards,

Olivia

0 项奖励
回复
1 解答
993 次查看
oliviachristyva
Contributor III

Hi guys,

Just add these lines after you open your port.Because the IO_SERIAL_NON_BLOCKING which you enable at the time of opening a port is not working that was the issue.

setflag = IO_SERIAL_NON_BLOCKING;
ioctl(GSM_Port, IO_IOCTL_SERIAL_SET_FLAGS,&setflag);

Hope it helps someone.

Thanks and Regards,

Olivia

在原帖中查看解决方案

0 项奖励
回复
4 回复数
994 次查看
oliviachristyva
Contributor III

Hi guys,

Just add these lines after you open your port.Because the IO_SERIAL_NON_BLOCKING which you enable at the time of opening a port is not working that was the issue.

setflag = IO_SERIAL_NON_BLOCKING;
ioctl(GSM_Port, IO_IOCTL_SERIAL_SET_FLAGS,&setflag);

Hope it helps someone.

Thanks and Regards,

Olivia

0 项奖励
回复
993 次查看
danielchen
NXP TechSupport
NXP TechSupport

Thank you for your update, Olivia

Regards

Daniel

0 项奖励
回复
993 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Olivia:

I think this is a terminal parse issue rather than an uart issue. I would suggest you detect and compare the signal with your scope first.

Regards

Daniel

0 项奖励
回复
993 次查看
oliviachristyva
Contributor III

hi Daniel,

I am not getting the output through the terminal. I am just debugging and watching the variable in KDS. Does this has something to do with the translation flags in MQX.

Regards,

Olivia

0 项奖励
回复