57.7.9.11.1 Sending a Frame

  1. Write FLEX_US_CR.TXEN and FLEX_US_CR.RXEN to enable both the transmitter and the receiver.
  2. Write FLEX_US_MR.USART_MODE to select the LON mode configuration.
  3. Write FLEX_US_BRGR.CD and FLEX_US_BRGR.FP to configure the baud rate.
  4. Write COMMT, COLDET, TCOL, CDTAIL, RDMNBM and DMAM in FLEX_US_LONMR to configure the LON operating mode.
  5. 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.
  6. Write FLEX_US_MAN.TX_PL to select the preamble pattern to use.
  7. Write LONPL and LONDL in FLEX_US_LONPR and FLEX_US_LONDL to set the frame transfer.
  8. Check that FLEX_US_CSR.TXRDY is set to 1.
  9. Write FLEX_US_LONL2HDR to send the header.
  10. Wait until FLEX_US_CSR.TXRDY rises.
  11. Write FLEX_US_THR.TCHR to send a byte.
  12. If all the data have not been written, repeat the two previous steps.
  13. Wait until FLEX_US_CSR.LTXD rises.
  14. Check the LON errors.
    Figure 57-61. Tx Frame