Hello,
I'm currently developing a LIN slave node and have a question.
Basic LIN transmission and reception are working correctly. However, there is an issue when communication is abnormally interrupted (e.g. due to a breakpoint set using the debugger) and then resumes - in such cases, communication does not recover properly.
After debugging, I found that the LBKDIE bit of LPUART0 remains set to 0, preventing the interrupt from being triggered.
It appears that this register is set to 1 upon the initial LIN wakeup, then reset to 0 once the intterrupt is serviced, and is only set to 1 again after a successful transmission/reception cycle.
My question is : after communication is interrupted and then resumes, is there a way for us to manually set this register back to 1?
Below is an example scenario illustrating the issue :
Example Scenario 1-1:
Normal LIN communication -> Breakpoint triggered (Master continues sending) -> Resume execution within the Sync time of Master Header -> Communication works normally
Example Scenario 1-2:
Normal LIN communication -> Breakpoint triggered (Master continues sending) -> Resume execution after the Sync time of Master Header -> Communication fails (Slave node cannot detect the interrupt)
Hi,
yes that behavior can be possible. LPUART have no HW support for LIN, except of break detection, that need to be disabled after break is detected and enabled after full frame is transferred, so new break can be detected again. Rest of frame processing is done by SW after each byte is received. If you stop code execution during frame reception, byte(s) is missed and processing fails.
You can set LBKDIE bit any time when your code is ready to detect break.
BR, Petr