MKE02Z64VQH4 UART Buffer Overrun Problem

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

MKE02Z64VQH4 UART Buffer Overrun Problem

819 Views
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

Labels (1)
0 Kudos
3 Replies

625 Views
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 Kudos

625 Views
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 Kudos

625 Views
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 Kudos