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

ソリューションへジャンプ
968件の閲覧回数
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 解決策
742件の閲覧回数
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 返答(返信)
743件の閲覧回数
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 件の賞賛
返信
742件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Thank you for your update, Olivia

Regards

Daniel

0 件の賞賛
返信
742件の閲覧回数
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 件の賞賛
返信
742件の閲覧回数
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 件の賞賛
返信