Datasheet

616
32117D–AVR-01/12
AT32UC3C
Figure 25-47. Master Node Configuration, NACT=IGNORE
25.6.11.2 Slave Node Configuration
Write TXEN and RXEN in CR to enable both the transmitter and the receiver.
Write MODE in MR to select the LIN mode and the Slave Node configuration.
Write CD and FP in BRGR to configure the baud rate.
Wait until LINID in CSR rises
Check LINISFE and LINPE errors
Read IDCHR in RHR
Write NACT, PARDIS, CHKDIS, CHKTYPE, DLCM and DLC in LINMR to configure the frame
transfer.
IMPORTANT: if the NACT configuration for this frame is PUBLISH, the US_LINMR register,
must be write with NACT=PUBLISH even if this field is already correctly configured, that in order
to set the TXREADY flag and the corresponding Peripheral DMA Controller write transfer
request.
What comes next depends on the NACT configuration:
Case 1: NACT = PUBLISH, the USART sends the response
Wait until TXRDY in CSR rises
Write TCHR in THR to send a byte
If all the data have not been written, redo the two previous steps
Wait until LINTC in CSR rises
Check the LIN errors
Case 2: NACT = SUBSCRIBE, the USART receives the response
Wait until RXRDY in CSR rises
Read RCHR in RHR
If all the data have not been read, redo the two previous steps
Wait until LINTC in CSR rises
Check the LIN errors
TXRDY
Write
LINIR
RXRDY
LINTC
Break
Synch
Protected
Identifier
Data 1
Data N
Checksum
Data N-1
Header
Inter-
frame
space
Response
space
Frame
Frame slot = TFrame_Maximum
Response
Data3
FSDIS=1 FSDIS=0