UART0 Rx is paused (MKL16)

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

UART0 Rx is paused (MKL16)

593 Views
stefanbrehm
Contributor II

Hello, I'm using a MKL16 in my application. I have following problem. I use the UART0 and the communication works normally fine. But the problem is, that somtimes the Rx communications is paused. It seems that the Rx doesnt't work and no data can received from the MKL16. After a not defined time the communication works again. Is there a probleme knwon with the UART hardwardware in silicon (I found no Errata) or with the UART configuration which have this effect.

Info:

- I use no power safe modes (like sleep,...)

- Baudrate 115200

- UART0 ISR priority is the highest

- RTOS Keil rtx

Thanks

Stefan

Tags (2)
0 Kudos
3 Replies

409 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Stefan Brehm,

    What the frequent of the UART send to the RX?

    Because there one situation that may lost the receive data, it is the data send to the UART is very quickly, and when the MCU enter in the UART interrupt, it still didn't clear the RX flag and get out the UART interrupt, then anther UART is send to the MCU, this UART data maybe lost.

  Now please slow down the UART send frequent to the MCU and try again, whether this problem will happen or not?

Wish it helps you!~

If you still have question, please contact with me!


Have a great day,
Jingjing

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

0 Kudos

409 Views
stefanbrehm
Contributor II

Hello Jingjing,

thanks for youre response and sorry for the late answer.

I work with 115200 Baud  (bit time = 115.2kHz (8.7µs)).

But that should not be the problem.

Info: I only use the UART0 with the highest ISR-prio. The RX flag is after each RX cleared.

Best regards

Stefan

0 Kudos

409 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Stefan,

  115200 bps is not high, could you share me your UART0 interrupt service code?

  You should write the code in the UART0 interrupt as less as possible.

  Besides, you can try to use the barebone code without the Keil RTOS, just to test it, whether this problem is relate to your RTOS.


Have a great day,
Jingjing

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

0 Kudos