UART0 Rx is paused (MKL16)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

UART0 Rx is paused (MKL16)

859 次查看
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

标记 (2)
0 项奖励
回复
3 回复数

675 次查看
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 项奖励
回复

675 次查看
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 项奖励
回复

675 次查看
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 项奖励
回复