Atmel Evaluation Kit AT91SAM9M10-G45-EK AT91SAM9M10-G45-EK Hoja De Datos

Los códigos de productos
AT91SAM9M10-G45-EK
Descargar
Página de 1361
 513
SAM9M10 [DATASHEET]
6355F–ATARM–12-Mar-13
 
31.7.8.13
LIN Errors
31.7.8.14
Bit Error
This error is generated when the USART is transmitting and if the transmitted value on the Tx line is different from
the value sampled on the Rx line.
If a bit error is detected, the transmission is aborted at the next byte border.
31.7.8.15
Inconsistent Synch Field Error
This error is generated in Slave node configuration if the Synch Field character received is other than 0x55.
31.7.8.16
Parity Error
This error is generated if the parity of the identifier is wrong. This error can be generated only if the parity feature is
enabled (PARDIS = 0).
31.7.8.17
Checksum Error
This error is set if the received checksum is wrong. This error can be generated only if the checksum feature is
enabled (CHKDIS = 0).
31.7.8.18
Slave Not Responding Error
This error is set when the USART expects a response from another node (NACT = SUBSCRIBE) but no valid mes-
sage appears on the bus within the time frame 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).
31.7.8.19
LIN Frame Handling
31.7.8.20
Master Node Configuration
• Write TXEN and RXEN in US_CR to enable both the transmitter and the receiver.
• Write USART_MODE in US_MR to select the LIN mode and the Master Node configuration.
• Write CD and FP in US_BRGR to configure the baud rate.
• Write NACT, PARDIS, CHKDIS, CHKTYPE, DLCM, FDIS and DLC in US_LINMR to configure the frame 
transfer.
• Check that TXRDY in US_CSR is set to “1”
Write IDCHR in US_LINIR to send the header
What comes next depends on the NACT configuration:
• Case 1: NACT = PUBLISH, the USART sends the response
– Wait until TXRDY in US_CSR rises
– Write TCHR in US_THR to send a byte
– If all the data have not been written, redo the two previous steps
– Wait until LINTC in US_CSR rises
– Check the LIN errors
• Case 2: NACT = SUBSCRIBE, the USART receives the response
– Wait until RXRDY in US_CSR rises
– Read RCHR in US_RHR
– If all the data have not been read, redo the two previous steps 
– Wait until LINTC in US_CSR rises