Write FLEX_US_CR.TXEN and FLEX_US_CR.RXEN to enable both the transmitter and the
receiver.
Write FLEX_US_MR.USART_MODE to select the LON mode configuration.
Write FLEX_US_BRGR.CD and FLEX_US_BRGR.FP to configure the baud rate.
Write COMMT, COLDET, TCOL, CDTAIL, RDMNBM and DMAM in FLEX_US_LONMR to configure the LON operating mode.
Write BETA2, BETA1TX, BETA1RX, PCYCLE, PSNB, NPS, IDTTX and ITDRX respectively in FLEX_US_FIDI, FLEX_US_LONB1TX, FLEX_US_LONB1RX, FLEX_US_TTGR, FLEX_US_LONPRIO, FLEX_US_LONIDTTX and FLEX_US_LONIDTRX to set the LON network configuration.
Write FLEX_US_MAN.TX_PL to select the preamble pattern to use.
Write LONPL and LONDL in FLEX_US_LONPR and FLEX_US_LONDL to set the frame transfer.
Check that FLEX_US_CSR.TXRDY is set to 1.
Write FLEX_US_LONL2HDR to send the header.
Wait until FLEX_US_CSR.TXRDY rises.
Write FLEX_US_THR.TCHR to send a byte.
If all the data have not been written, repeat the two previous steps.
Wait until FLEX_US_CSR.LTXD rises.
Check the LON errors.
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.