LPUART_TransferSendNonBlocking() with framing errors

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

LPUART_TransferSendNonBlocking() with framing errors

1,084 Views
beng_
Contributor III

I'm using LPUART_TransferSendNonBlocking() to send a string (in the example below it's a 4 character string K2\r\n (where the last to are carriage return & line feed) )

However when I look the output (top line) there appear to be random pauses in the middle of the string causing framing errors. In the example below these delay are only of the orer of ms but on soem occasions it's been over a second.

pastedImage_1.png

Any suggestions?

Labels (1)
0 Kudos
3 Replies

780 Views
beng_
Contributor III

It seems to be even more complex. To try an eliminate a interrupt firing unexpectedly. I modified the code to the following:

__disable_irq();
LPUART_WriteBlocking(LPUART0, command_str, i);
__enable_irq();

where disable disable_irq() & enable_irq() use the assembler command cpsid and cpsie respectively. And there still appears to be unexpected pauses when transmitting over the lpuart i.e.

pastedImage_4.png

0 Kudos

780 Views
beng_
Contributor III

When I'm running the code usign the debugger (j-Link plus) in Kinetis Design Studio, the LPUART behaves as I'd expect.

However when I, program in the .srec manually and run it normally (i.e. in the real world) it exhibits the above behaviour.

0 Kudos

780 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ben,

   Please also tell us what the chip you are using now? And tell me the SDK version, then I will check it on my side.

Waiting for your reply!


Have a great day,
Kerry

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

0 Kudos