3.2.20 Single-Edge Nibble Transmission (SENT)

SENT is a unidirectional, single-wire communications protocol that is based on SAE J2716, “SENT – Single-Edge Nibble Transmission for Automotive Applications”. The protocol is designed for point-to-point transmission of signal values using a signal system based on successive falling edges. It allows for high-resolution data transmission with a lower system cost than available serial data solutions, and it is intended for use in applications where data need to be communicated from a sensor to a central controller, such as an Engine Control Unit (ECU).

The 16-bit SENT module is a dedicated hardware implementation of SAE J2716. The module can be configured for three main modes of operation:

• Asynchronous Transmitter (default)

• Synchronous Transmitter

• Receiver

Using The Library

The SENT consists of the following key features and the peripheral library can be utilized to achieve the same:

• Automatic Data Rate Synchronization

• Optional Automatic Detection of CRC Errors in Receive Mode

• Hardware Calculation of CRC in Transmit Mode

• Support for Optional Pause Pulse Period

• Data Buffering for One Message Frame

• Selectable Data Length for Transmit/Receive from Three to Six Nibbles

• Automatic Detection of Framing Errors

• Separately Mappable Input and Output Functions on Devices with Peripheral Pin Select (PPS)

Library Interface

SENT peripheral library provides the following interfaces:

Functions

NameDescription
SENTx_InitializeInitializes the SENTx peripheral of the device
SENTx_DeinitializeDe-initializes the SENTx peripheral of the device
SENTx_EnableEnables the SENTx peripheral of the device
SENTx_DisableDisables the SENTx peripheral of the device
SENTx_Transmit Transmits the data to the receiver when SENTx peripheral acts as a transmitter
SENTx_TransmitModeSetSets the SENTx peripheral transmit mode
SENTx_IsTransmissionCompleteReturns the transmit complete status
SENTx_TransmitStatusGetGets the transmission status of the SENTx peripheral module
SENTx_TransmitCompleteCallbackRegisterRegisters a callback function to be called upon completing transmission for the SENTx peripheral
SENTx_ReceiveReads the received data at the receiver
SENTx_IsDataReceivedChecks if data has been received for SENTx peripheral
SENTx_ReceiveStatusGetRetrieves the receive status SENTx peripheral
SENTx_ReceiveErrorGetReturns the type of reception error
SENTx_ReceiveCompleteCallbackRegisterRegisters a callback function to be called upon the completion of data reception for the SENTx peripheral
SENTx_ErrorCallbackRegisterRegisters a callback function to be called upon encountering an error during data reception for the SENTx peripheral

Data types and constants

NameTypeDescription
SENT_DATA_RECEIVEStructConfigures the SENTx data receive packet
SENT_RECEIVE_STATUSEnumDefines the SENTx receive status
SENT_DATA_TRANSMITStructConfigure the SENTx data transmit packet
SENT_TRANSMIT_MODEEnumDefines the SENTx transmission mode (Asynchronous and Synchronous)
SENT_TRANSMIT_STATUSEnumDefines the SENTx transmit status
SENT_ERROR_CODEEnumDefines the SENTx error code
SENT_ERROR_CALLBACKTypedefDefines a function pointer type for a callback function when error occurs
SENT_RECEIVE_COMPLETE_CALLBACKTypedefDefines a function pointer type for a callback function when data reception is complete
SENT_TRANSMIT_COMPLETE_CALLBACKTypedefDefines a function pointer type for a callback function when data is successfully transmitted