2025-05-16 6:30 AM
Hi there,
I am using the full featured USART in LIN mode. The start of a LIN packet is signaled by a BREAK condition. The next byte is the SYNC (0x55). After the BREAK is detected, I enable the receiver timeout so that if the SYNC (0x55) is not received then the LIN reception must restart. This does not happen, i.e. after a BREAK with no other bytes, it does not generate a receive timeout.
According to the RM, the receiver timeout starts after a valid STOP. So is the end of a BREAK not considered a valid STOP and therefore the receive timeout does not start?
Thanks in advance,
Pieter
Solved! Go to Solution.
2025-05-19 8:15 AM
Hi Pavel,
Thanks for the suggestion :)
I tried it but unfortunately it appears that IDLE does not work correctly if LIN mode (to detect a LIN break) is enabled. The IDLE flag is set too soon after the LBD flag. It does not wait long enough for the SYNC (0x55) byte.
The fundamental issue appears to be that the LIN Break condition is not checked when AUTOBAUD is enabled for the SYNC (0x55) byte. If it did detect the LIN break condition early enough then I could have restarted the AUTOBAUD sequence.
So my only solution appears to be using a timer but I don't have enough to go around.
Best regards,
Pieter
2025-05-16 11:11 AM
Instead of RTO, try IDLE detection. A stop bit follows a data frame, so if no data was received, RTO won't occur.
2025-05-19 8:15 AM
Hi Pavel,
Thanks for the suggestion :)
I tried it but unfortunately it appears that IDLE does not work correctly if LIN mode (to detect a LIN break) is enabled. The IDLE flag is set too soon after the LBD flag. It does not wait long enough for the SYNC (0x55) byte.
The fundamental issue appears to be that the LIN Break condition is not checked when AUTOBAUD is enabled for the SYNC (0x55) byte. If it did detect the LIN break condition early enough then I could have restarted the AUTOBAUD sequence.
So my only solution appears to be using a timer but I don't have enough to go around.
Best regards,
Pieter