DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
379 of 571
NXP Semiconductors
UM10316
Chapter 22: LPC29xx LIN 0/1
4.11 Step-by-step example for using the LIN master
The following is a short example showing how to configure the LIN master controller and
transmit or receive LIN message frames.
The example uses hardware support from the LIN master, so the software ID parity
(SWPA) and the checksum (SWCS) are generated automatically. LIN master interrupts
are used for message reception and transmission.
General configuration of the LIN master controller is only performed once; typically during
the initialization phase. The sequence is:
1. Do the LIN master port-pin configuration of the multiplexed I/O pins for the desired
LIN channels.
2. Enter reset mode by setting the LRM bit of the LIN master-controller mode register
LMODE.
3. Choose a baud rate by writing the appropriate value to the LIN master-controller
fractional baud-rate generator register LFBRG, see also
4. Do a general LIN master configuration and choose the LIN inter-byte space length
(IBS) and sync-break low length (SBL) in the LIN master controller configuration
register LCFG.
5. Put the LIN master in normal operating mode by clearing the LRM bit of the LIN
master-controller mode register LMODE.
23 to 16 DF11[7:0]
R/W
LIN message-data field 11
00h*
15 to 8
DF10[7:0]
R/W
LIN message-data field 10
00h*
7 to 0
DF9[7:0]
R/W
LIN message-data field 9
00h*
Table 317. LDATD register bit description
* = reset value
Bit
Symbol
Access
Value
Description
31 to 24 DF16[7:0]
R/W
LIN message-data field 16
00h*
23 to 16 DF15[7:0]
R/W
LIN message-data field 15
00h*
15 to 8
DF14[7:0]
R/W
LIN message-data field 14
00h*
7 to 0
DF13[7:0]
R/W
LIN message-data field 13
00h*
Table 316. LDATC register bit description
…continued
* = reset value
Bit
Symbol
Access
Value
Description