LIN
LIN copied to clipboard
timeout period is longer than necessary
Calculated TBit is 1/10 the real value due to a missing zero. For 19200 baud TBit is 52ms not 5ms. and 52 vs 50 isn't 40% different it's 4%. so the *14 to recover the missing resolution goes too far.
Probably shouldn't wait 2 frames for a response either.
A better timeout value would be: timeout = (34+90)*1000000UL/serialSpd;