NXP Serial bouncing C++ messages

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

NXP Serial bouncing C++ messages

435 Views
ShantalW
Contributor I

I have a NXP board, MIMXRT1060, that I am trying to have communicate with a C++ program via a Serial Comms USB connection.  I am connecting just fine, and receiving messages from the NXP board just fine, but when I attempt to send the board a message I get a response that is the exact message I sent, aka the message bounces instead of being handled.  For example, if I send an "updateLED" message expecting and "ACK" and the led to change color I instead get a "updateLED" message and the led doesn't change.  If the board sends me a message on it's own I get it just fine.  Does anyone know what would be causing this?

Could it be any of these settings?  Or am I missing a setting here:
dcbSerialParameters.BaudRate = CBR_115200;
dcbSerialParameters.ByteSize = 8;
dcbSerialParameters.StopBits = ONESTOPBIT;
dcbSerialParameters.Parity = NOPARITY;
dcbSerialParameters.fDtrControl = DTR_CONTROL_ENABLE;

0 Kudos
5 Replies

415 Views
ShantalW
Contributor I

Hi TIC,

Unfortunately that doesn't answer my question.  The NXP side seems to be working okay as I can send it messages via putty and it works as expected, it is only when I send the messages from C++ that it fails. 

Thanks,

Shantal

0 Kudos

399 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
According to your statement, I'd like to suggest using the oscilloscope or logic analyzer to visualize the commands from the C++ program, then compare them with Putty's.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

385 Views
ShantalW
Contributor I

I unfortunately do not have that sort of equipment.  My oscilloscope does not go to a high enough frequency to read USB and I don't have a logic analyzer.  We did hook up a JLink and ran the code in debug and noticed we are also getting junk data I am not sending. Do you have any suggestions that I could do with a standard PC?

Thanks,

Shantal

0 Kudos

381 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @ShantalW ,
Thanks for your reply.
Maybe you can try to use Wireshark to monitor and capture data go through the USB device which is sent by the C++ program, it can help you to figure out whether the C++ program sends the expected data.

jeremyzhou_0-1660184044491.png

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

422 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your description, it seems like you want to implement a shell application on RT1060 to handle the command from the C++ program, if yes, I'd like to suggest using the oscilloscope or logic analyzer to visualize the commands from the C++ program firstly,
then, check the code that handles the corresponding command.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos