MKE02Z64VQH4 UART Buffer Overrun Problem

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

MKE02Z64VQH4 UART Buffer Overrun Problem

1,647 次查看
advangorp
Contributor I

Hello I am developping software for the above mentioned processor.

 I use Processor Expert with the Serial_LDD component.

I am lost with the following problem.

Upon receive sometimes the AS1_OnError fires. If I then examine the error I get the

AsyncErrorCodes.errName.OverRun error. But there are no characters in the buffer (AS1_GetCharsInRxBuf() will yield 0).

I tried several buffer sizes but the spurious errors persist.

I examined the serial data quality with an oscilloscope and found it to be clean;

Can someone please advise?

Thanks, kind regards Ad

标签 (1)
0 项奖励
回复
3 回复数

1,453 次查看
advangorp
Contributor I

Forgot to update this question. I found the classic error that the time spend in the receive interrupt was very much too long. The solution was to set a flag in the receive interrupt and handle the major of the code in the main loop.

Thank you for your support. Kind regards Ad

0 项奖励
回复

1,453 次查看
advangorp
Contributor I

Hello Jing thank you very much for your reply,

Yes I receive a buffer overrun while there are no characters in the buffer. I am sure the baud rate is ok..

I will follow the link you provided to see what could cause this phenomena.

Kind regards, Ad

0 项奖励
回复

1,453 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Sometimes baudrate mismatch will cause receiving a break character. One of its effect is set the overrun flag, S1[OR].

https://community.nxp.com/message/1054788

Does it receive error data or the data received less than send data?

Regards,

Jing

0 项奖励
回复