K22 MXQ4.02 serial port will miss characters if paste a lot of commands together(cause overflow and RX_OVERRUNS)

cancel
Showing results for 
Search instead for 
Did you mean: 

K22 MXQ4.02 serial port will miss characters if paste a lot of commands together(cause overflow and RX_OVERRUNS)

733 Views
wangsonwang
Contributor I

Hi,

I searched the same question but not found similar ones. As title described, when I paste a lot of commands at the same time, eg: help, or wmiconfig.. (More than 10+), the shell will echo some of them (maybe 6), the remained commands will not be executed. This can be understood because UART can't handle high-speed data/cmd input/output. Am I right? I set 8-n-1 no flowcontrol and 115200 baud rate.

When above action is done, the next serial input will be misplaced. when I input "help", the serial output will be "xhel" where x is the last character just before the current input. Most times it is "\r". That means when I input "12345" it can only show "123", when I input "\n \n", the "45" will be displayed on serial port.

I verified with almost the same SDK on K60 (120Mhz MCU), this issue can't be found. But when I try on K22(50Mhz MCU), it can be reproduced easily. Would anyone give some advice?Thanks.

0 Kudos
3 Replies

103 Views
tmeyer
Contributor III

HI,

I am experiencing the same issue with MQX 4.1 and a K64 @ 100MHz. Are you willing to share your solution?

To reproduce it, here is a summary of my setup:

- MQX Shell task on UART1 (polled mode, baud:115200)

- Task busy processing data over UART0 (interrupt mode, baud:9600)

-  I have a application with several tasks including some RTCS ones but they are all idle

Using my terminal application I use a "SendFile" function which sends the file at the 115200 baud continually until the file is sent. This will intermittently cause the exact issue that you have described.

Thanks,

Tim

0 Kudos

103 Views
soledad
NXP Employee
NXP Employee

Hi wangson wang,

I need to reproduce this issue, so are you using a MQX example or could you share a code example in order to test this issue??

Have a great day,
Sol

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

0 Kudos

103 Views
wangsonwang
Contributor I

Hi Soledad,

I have found root cause and fixed it. MQX4.0.2 SDK missed handling serial overflow case but I'm still wondering why it happens on K22 instead of K60.

0 Kudos