Hi Petr,
First of all, please accept my apologies for the delay in getting back to you — I appreciate your help and your detailed response.
Following your advice, I’ve been working on setting up the LINFlex module in UART mode. I'm currently using the uart_pal example code as a base.
I do manage to receive most of the LIN frames this way — especially the ID and DATA bytes — but I don’t see the sync byte and the checksum byte appears to be corrupted. When I check the reception status, I see the uart_framing_error flag set, and I get unexpected blank bytes in the reception buffer between frames. This makes parsing a bit tricky, and I wonder if I'm missing some configuration details specific to this use case.
So far, I’ve been using 8 data bits, no parity, and 1 stop bit. Are there any specific UART settings (baud rate tolerance, stop bits, parity, etc.) I should be aware of when configuring the LINFlex module for LIN sniffing in UART mode?
One hypothesis I have is that the break field is causing some of the blank bytes. Is there a recommended way to reliably detect the break field in this mode?
Also, do I need to manually synchronize to the LIN frame boundaries after each break, or is that already handled by the module?
Any additional guidance on cleaning up the reception or on the post-processing would be greatly appreciated.
Thank you again for your time and support.
Best regards,
Théo