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
Name | Description |
---|---|
SENTx_Initialize | Initializes the SENTx peripheral of the device |
SENTx_Deinitialize | De-initializes the SENTx peripheral of the device |
SENTx_Enable | Enables the SENTx peripheral of the device |
SENTx_Disable | Disables the SENTx peripheral of the device |
SENTx_Transmit | Transmits the data to the receiver when SENTx peripheral acts as a transmitter |
SENTx_TransmitModeSet | Sets the SENTx peripheral transmit mode |
SENTx_IsTransmissionComplete | Returns the transmit complete status |
SENTx_TransmitStatusGet | Gets the transmission status of the SENTx peripheral module |
SENTx_TransmitCompleteCallbackRegister | Registers a callback function to be called upon completing transmission for the SENTx peripheral |
SENTx_Receive | Reads the received data at the receiver |
SENTx_IsDataReceived | Checks if data has been received for SENTx peripheral |
SENTx_ReceiveStatusGet | Retrieves the receive status SENTx peripheral |
SENTx_ReceiveErrorGet | Returns the type of reception error |
SENTx_ReceiveCompleteCallbackRegister | Registers a callback function to be called upon the completion of data reception for the SENTx peripheral |
SENTx_ErrorCallbackRegister | Registers a callback function to be called upon encountering an error during data reception for the SENTx peripheral |
Data types and constants
Name | Type | Description |
---|---|---|
SENT_DATA_RECEIVE | Struct | Configures the SENTx data receive packet |
SENT_RECEIVE_STATUS | Enum | Defines the SENTx receive status |
SENT_DATA_TRANSMIT | Struct | Configure the SENTx data transmit packet |
SENT_TRANSMIT_MODE | Enum | Defines the SENTx transmission mode (Asynchronous and Synchronous) |
SENT_TRANSMIT_STATUS | Enum | Defines the SENTx transmit status |
SENT_ERROR_CODE | Enum | Defines the SENTx error code |
SENT_ERROR_CALLBACK | Typedef | Defines a function pointer type for a callback function when error occurs |
SENT_RECEIVE_COMPLETE_CALLBACK | Typedef | Defines a function pointer type for a callback function when data reception is complete |
SENT_TRANSMIT_COMPLETE_CALLBACK | Typedef | Defines a function pointer type for a callback function when data is successfully transmitted |