Datasheet
ADuC7033
Rev. B | Page 129 of 140
while((GP2DAT & 0x10 ) == 0 )
{} // Wait until LIN Bus returns high
LHSCON0 = 0x4; // Enable LHS to detect Break Condition Ungate RX Line
// Disable all Interrupts except Break Compare Interrupt
IRQEN = 0x800; // Enable UART Interrupt
// The UART is now configured and ready to be used for LIN
ID1ID0
START
BIT
START
BIT
STOP
BIT
STOP
BIT
ID2 ID3 ID4 ID5 P0 P1
T
BIT
LHSVAL1 = 0x3F
LHSVAL1
RESET AND
STARTS
COUNTING
BREAK
COMPARE
INTERRUPT
GENERATED
LHSVAL0 STARTS
COUNTING
LHSVAL0 STOPS
COUNTING. STOP
INTERRUPT
GENERATED
UART CONFIGURED
LHS INTERRUPTS
DISABLED EXCEPT
BREAK COMPARE
BEGIN
RECEIVING DATA
VIA UART
06847-047
Figure 51. Example LIN Configuration
LIN Diagnostics
The ADuC7033 features the capability to unintrusively monitor
the current state of the LIN pin. This readback functionality is
implemented using GPIO_11. The current state of the LIN pin
is contained in GP2DAT[4].
It is also possible to drive the LIN pin high and low through
user software, allowing the user to detect open-circuit conditions.
This functionality is implemented via GPIO_12. To enable this
functionality, GPIO_12 must be configured as a GPIO through
GP2CON[20]. After it is configured, the LIN pin can be pulled
high or low using GP2DAT.
The ADuC7033 also features short-circuit protection on the LIN
pin. If a short-circuit condition is detected on the LIN pin,
HVSTA[2] is set. This bit is cleared by re-enabling the LIN
driver using HVCFG1[3]. It is possible to disable this feature
through HVCFG1[2].
LIN Operation During Thermal Shutdown
When a thermal event occurs, that is, HVSTA[3] is set, LIN
communications continue uninterrupted.