Hello,
so I could reproduce the error and have the following finding:
EDIT2:
I made a mistake reading out, actually the STAT-Register changed
It changed from 00 80 00 00 to 00 D8 00 00 (error)
This means:
OR from 0 to 1
IDLE from 0 to 1
TC from 0 to 1
In the other error case (00 D0 00 00):
OR = 0
IDLE = 1
TC = 1
I have seen there is an overrun and I will concentrate on getting rid of that for now.
I'll get back to you if that solves the problem
LPUART->MODIR has changed from 00 D8 00 00 to 00 80 00 00
(Value was printed out with printf("%" PRIu32,LPUART->MODIR); and then converted to hex)
EDIT: Now I have also seen a case where MODIR is 00 D0 00 00 both before the error and when it occured
For my Init I use the defaults, but change the baudrate and enable tx and rx.
LPUART_GetDefaultConfig(&config);
config.baudRate_Bps = currentBaudrate;
config.enableTx = true;
config.enableRx = true;
Reading the datasheet (see below) it's not clear to me what this means.
Also I did not find any use of MODIR in the lpuart driver from the SDK but for initialisation.
Can you please help me on finding out
a) what the flags in the MODIR mean, which are changed
b) why MODIR changes
Thanks a lot in advance.
mldevw_0-1622142872970.png
Sub-Family Reference Manual Rev. 3, 08/2016, p. 1493