45.6.10.11.2 Receiving A Frame
- Write TXEN and RXEN in US_CR to enable both the transmitter and the receiver.
- Write USART_MODE in US_MR to select the LON mode configuration.
- Write CD and FP in US_BRGR to configure the baud rate.
- Write COMMT, COLDET, TCOL, CDTAIL, RDMNBM and DMAM in US_LONMR to configure the LON operating mode.
- Write BETA2, BETA1TX, BETA1RX, PCYCLE, PSNB, NPS, IDTTX and ITDRX respectively in US_FIDI, US_LONB1TX, US_LONB1RX, US_TTGR, US_LONPRIO, US_LONIDTTX and US_LONIDTRX to set the LON network configuration.
- Write RXIDLEV and RX_PL in US_MAN to indicate the receiver line value and select the preamble pattern to use.
- Wait until RXRDY in US_CSR rises.
- Read RCHR in US_RHR.
- If all the data and the two CRC bytes have not been read, redo the two previous steps.
- Wait until LRXD in US_CSR rises.
- Check the LON errors.