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

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

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

Jump to solution
808 Views
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 Kudos
1 Solution
582 Views
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

View solution in original post

0 Kudos
4 Replies
583 Views
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 Kudos
582 Views
danielchen
NXP TechSupport
NXP TechSupport

Thank you for your update, Olivia

Regards

Daniel

0 Kudos
582 Views
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 Kudos
582 Views
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 Kudos