Atmel Evaluation Kit AT91SAM9G25-EK AT91SAM9G25-EK Data Sheet

Product codes
AT91SAM9G25-EK
Page of 1102
814
SAM9G25 [DATASHEET]
11032C–ATARM–25-Jan-13
Inconsistent Synch Field Error
This error is generated in Slave node configuration, if the Synch Field character received is other than 0x55.
This error is reported by flag LINISFE in the Channel Status Register (US_CSR).
Identifier Parity Error
This error is generated in Slave node configuration, if the parity of the identifier is wrong. This error can be generated
only if the parity feature is enabled (PARDIS = 0).
This error is reported by flag LINIPE in the Channel Status Register (US_CSR).
Checksum Error
This error is generated in Master of Slave node configuration, if the received checksum is wrong. This flag can be set to
“1” only if the checksum feature is enabled (CHKDIS = 0).
This error is reported by flag LINCE in the Channel Status Register (US_CSR).
Slave Not Responding Error
This error is generated in Master of Slave node configuration, when the USART expects a response from another node
(NACT = SUBSCRIBE) but no valid message appears on the bus within the time given by the maximum length of the
message frame, TFrame_Maximum (see 
). This error is disabled if the USART does not expect any
message (NACT = PUBLISH or NACT = IGNORE).
This error is reported by flag LINSNRE in the Channel Status Register (US_CSR). 
39.7.8.15 LIN Frame Handling
Master Node Configuration
z
Write TXEN and RXEN in US_CR to enable both the transmitter and the receiver.
z
Write USART_MODE in US_MR to select the LIN mode and the Master Node configuration.
z
Write CD and FP in US_BRGR to configure the baud rate.
z
Write NACT, PARDIS, CHKDIS, CHKTYPE, DLCM, FSDIS and DLC in US_LINMR to configure the frame transfer.
z
Check that TXRDY in US_CSR is set to “1”
z
Write IDCHR in US_LINIR to send the header
What comes next depends on the NACT configuration:
z
Case 1: NACT = PUBLISH, the USART sends the response
z
Wait until TXRDY in US_CSR rises
z
Write TCHR in US_THR to send a byte
z
If all the data have not been written, redo the two previous steps
z
Wait until LINTC in US_CSR rises
z
Check the LIN errors
z
Case 2: NACT = SUBSCRIBE, the USART receives the response
z
Wait until RXRDY in US_CSR rises
z
Read RCHR in US_RHR
z
If all the data have not been read, redo the two previous steps 
z
Wait until LINTC in US_CSR rises
z
Check the LIN errors
z
Case 3: NACT = IGNORE, the USART is not concerned by the response
z
Wait until LINTC in US_CSR rises
z
Check the LIN errors