20.2.1 Initializing the SENTx Module
Perform the following steps to initialize the module:
- Write RCVEN (SENTxCON1[11]) =
1
for Receive mode. - Write NIBCNT[2:0] (SENTxCON1[2:0]) for the desired data frame length.
- Write CRCEN (SENTxCON1[8]) for hardware or software CRC validation.
- Write PPP (SENTxCON1[7]) =
1
if pause pulse is present. - Write SENTxCON2 with the value of SYNCMAXx (Nominal Sync Period + 20%).
- Write SENTxCON3 with the value of SYNCMINx (Nominal Sync Period – 20%).
- Enable interrupts and set interrupt priority.
- Set the SNTEN (SENTxCON1[15]) bit to enable the module.
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.