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.
Any suggestions?
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.
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.
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!
-----------------------------------------------------------------------------------------------------------------------