20.1.1.1 Initializing the SENTx Module

Perform the following steps to initialize the module:

  1. Write RCVEN (SENTxCON1[11]) = 0 for Transmit mode.
  2. Write TXM (SENTxCON1[10]) = 0 for Asynchronous Transmit mode or TXM = 1 for Synchronous mode.
  3. Write NIBCNT[2:0] (SENTxCON1[2:0]) for the desired data frame length.
  4. Write CRCEN (SENTxCON1[8]) for hardware or software CRC calculation.
  5. Write PPP (SENTxCON1[7]) for optional pause pulse.
  6. If PPP = 1, write TFRAME to SENTxCON3.
  7. Write SENTxCON2 with the appropriate value for the desired tick period.
  8. Enable interrupts and set interrupt priority.
  9. Write initial status and data values to SENTxDATH/L.
  10. If CRCEN = 0, calculate CRC and write the value to CRC[3:0] (SENTxDATL[3:0]).
  11. Set the SNTEN (SENTxCON1[15]) bit to enable the module.

User software updates to SENTxDATH/L must be performed after the completion of the CRC and before the next message frame’s status nibble. The recommended method is to use the message frame completion interrupt to trigger data writes. The data should be read from the SENTxDATL/H registers after the completion of the CRC and before the next message frame’s status nibble. The recommended method is to use the message frame completion interrupt trigger.