AM263Px MCU+ SDK  10.01.00

Introduction

This module contains APIs to program and use the LIN.

Files

file  lin/v0/lin.h
 This file contains the prototype of LIN driver APIs.
 

Functions

void LIN_initModule (uint32_t base)
 This function initializes the LIN module. More...
 
void LIN_getData (uint32_t base, uint16_t *const data)
 This function reads the received data. More...
 
void LIN_sendData (uint32_t base, uint16_t *data)
 This function sends the data. More...
 
static Bool LIN_isBaseValid (uint32_t base)
 Checks a LIN base address. More...
 
static void LIN_setLINMode (uint32_t base, LIN_LINMode mode)
 Sets the LIN mode. More...
 
static void LIN_setMaximumBaudRate (uint32_t base, uint32_t clock)
 Set Maximum Baud Rate Prescaler. More...
 
static void LIN_setMessageFiltering (uint32_t base, LIN_MessageFilter type)
 Set Message filtering Type. More...
 
static void LIN_enableParity (uint32_t base)
 Enable Parity mode. More...
 
static void LIN_disableParity (uint32_t base)
 Disable Parity mode. More...
 
static uint16_t LIN_generateParityID (uint16_t identifier)
 Generate Parity Identifier. More...
 
static void LIN_setIDByte (uint32_t base, uint16_t identifier)
 Set ID Byte. More...
 
static void LIN_setIDResponderTask (uint32_t base, uint16_t identifier)
 Set ID-ResponderTask. More...
 
static void LIN_sendWakeupSignal (uint32_t base)
 Send LIN wakeup signal. More...
 
static void LIN_enterSleep (uint32_t base)
 Entering LIN sleep signal. More...
 
static void LIN_sendChecksum (uint32_t base)
 Send Checksum Byte. More...
 
static void LIN_triggerChecksumCompare (uint32_t base)
 Trigger Checksum Compare. More...
 
static Bool LIN_isTxReady (uint32_t base)
 Check Tx buffer ready flag. More...
 
static void LIN_setFrameLength (uint32_t base, uint16_t length)
 Set LIN Frame Length. More...
 
static void LIN_setCommMode (uint32_t base, LIN_CommMode mode)
 Set LIN communication mode. More...
 
static void LIN_setTxMask (uint32_t base, uint16_t mask)
 Sets the transmit ID mask. More...
 
static void LIN_setRxMask (uint32_t base, uint16_t mask)
 Sets the receive ID mask. More...
 
static uint16_t LIN_getTxMask (uint32_t base)
 Gets the transmit ID mask. More...
 
static uint16_t LIN_getRxMask (uint32_t base)
 Gets the receive ID mask. More...
 
static Bool LIN_isRxReady (uint32_t base)
 Gets the receive ID mask. More...
 
static uint16_t LIN_getRxIdentifier (uint32_t base)
 Get last received identifier. More...
 
static Bool LIN_isTxMatch (uint32_t base)
 Checks for Tx ID Match Received. More...
 
static Bool LIN_isRxMatch (uint32_t base)
 Checks for Rx ID Match Received. More...
 
static void LIN_enableInterrupt (uint32_t base, uint32_t intFlags)
 Enable interrupts. More...
 
static void LIN_disableInterrupt (uint32_t base, uint32_t intFlags)
 Disable interrupts. More...
 
static void LIN_clearInterruptStatus (uint32_t base, uint32_t intFlags)
 Clear interrupt status. More...
 
static void LIN_setInterruptLevel0 (uint32_t base, uint32_t intFlags)
 Set interrupt level to 0. More...
 
static void LIN_setInterruptLevel1 (uint32_t base, uint32_t intFlags)
 Set interrupt level to 1. More...
 
static void LIN_enableModuleErrors (uint32_t base, uint32_t errors)
 Enable Module Errors for Testing. More...
 
static void LIN_disableModuleErrors (uint32_t base, uint32_t errors)
 Disable Module Errors for Testing. More...
 
static void LIN_enableAutomaticBaudrate (uint32_t base)
 Enable Automatic Baudrate Adjustment. More...
 
static void LIN_disableAutomaticBaudrate (uint32_t base)
 Disable Automatic Baudrate Adjustment. More...
 
static void LIN_stopExtendedFrame (uint32_t base)
 Stops LIN Extended Frame Communication. More...
 
static void LIN_setChecksumType (uint32_t base, LIN_ChecksumType type)
 Set Checksum Type. More...
 
static void LIN_setSyncFields (uint32_t base, uint16_t syncBreak, uint16_t delimiter)
 Set Sync Break Extend and Delimiter. More...
 
static void LIN_enableSCIMode (uint32_t base)
 Enable SCI Mode. More...
 
static void LIN_disableSCIMode (uint32_t base)
 Disable SCI Mode. More...
 
static void LIN_setSCICommMode (uint32_t base, LIN_SCICommMode mode)
 Set SCI communication mode. More...
 
static void LIN_enableSCIParity (uint32_t base, LIN_SCIParityType parity)
 Enable SCI Parity mode. More...
 
static void LIN_disableSCIParity (uint32_t base)
 Disable SCI Parity mode. More...
 
static void LIN_setSCIStopBits (uint32_t base, LIN_SCIStopBits number)
 Set the number of stop bits for SCI. More...
 
static void LIN_enableSCISleepMode (uint32_t base)
 Enable SCI Sleep mode. More...
 
static void LIN_disableSCISleepMode (uint32_t base)
 Disable SCI Sleep mode. More...
 
static void LIN_enterSCILowPower (uint32_t base)
 Enter SCI Local Low-Power Mode. More...
 
static void LIN_exitSCILowPower (uint32_t base)
 Exit SCI Local Low-Power Mode. More...
 
static void LIN_setSCICharLength (uint32_t base, uint16_t numBits)
 Set SCI character length. More...
 
static void LIN_setSCIFrameLength (uint32_t base, uint16_t length)
 Set SCI Frame Length. More...
 
static Bool LIN_isSCIDataAvailable (uint32_t base)
 Check if new SCI data is ready to be read. More...
 
static Bool LIN_isSCISpaceAvailable (uint32_t base)
 Check if Space is available in SCI Transmit Buffer. More...
 
static uint16_t LIN_readSCICharNonBlocking (uint32_t base, Bool emulation)
 Reads a SCI character without Blocking. More...
 
static uint16_t LIN_readSCICharBlocking (uint32_t base, Bool emulation)
 Reads a SCI character with Blocking. More...
 
static void LIN_writeSCICharNonBlocking (uint32_t base, uint16_t data)
 Sends a SCI character without Blocking. More...
 
static void LIN_writeSCICharBlocking (uint32_t base, uint16_t data)
 Sends a SCI character with blocking. More...
 
static void LIN_enableSCIModuleErrors (uint32_t base, uint32_t errors)
 Enable SCI Module Errors for Testing. More...
 
static void LIN_disableSCIModuleErrors (uint32_t base, uint32_t errors)
 Disable SCI Module Errors for Testing. More...
 
static void LIN_enableSCIInterrupt (uint32_t base, uint32_t intFlags)
 Enable SCI interrupts. More...
 
static void LIN_disableSCIInterrupt (uint32_t base, uint32_t intFlags)
 Disable SCI interrupts. More...
 
static void LIN_clearSCIInterruptStatus (uint32_t base, uint32_t intFlags)
 Clear SCI interrupt status. More...
 
static void LIN_setSCIInterruptLevel0 (uint32_t base, uint32_t intFlags)
 Set interrupt level to 0. More...
 
static void LIN_setSCIInterruptLevel1 (uint32_t base, uint32_t intFlags)
 Set interrupt level to 1. More...
 
static Bool LIN_isSCIReceiverIdle (uint32_t base)
 Check if SCI Receiver is Idle. More...
 
static Bool LIN_getSCITxFrameType (uint32_t base)
 Gets the SCI Transmit Frame Type. More...
 
static Bool LIN_getSCIRxFrameType (uint32_t base)
 Gets the SCI Receiver Frame Type. More...
 
static Bool LIN_isSCIBreakDetected (uint32_t base)
 Check if SCI Detected a Break Condition. More...
 
static void LIN_enableModule (uint32_t base)
 Enables the LIN module. More...
 
static void LIN_disableModule (uint32_t base)
 Disable the LIN module. More...
 
static void LIN_setBaudRatePrescaler (uint32_t base, uint32_t prescaler, uint32_t divider)
 Set Baud Rate Prescaler. More...
 
static void LIN_enableDataTransmitter (uint32_t base)
 Enable Transmit Data Transfer. More...
 
static void LIN_disableDataTransmitter (uint32_t base)
 Disable Transmit Data Transfer. More...
 
static void LIN_enableDataReceiver (uint32_t base)
 Enable Receive Data Transfer. More...
 
static void LIN_disableDataReceiver (uint32_t base)
 Disable Receive Data Transfer. More...
 
static void LIN_performSoftwareReset (uint32_t base)
 Perform software reset. More...
 
static void LIN_enterSoftwareReset (uint32_t base)
 Put LIN into its reset state. More...
 
static void LIN_exitSoftwareReset (uint32_t base)
 Put LIN into its ready state. More...
 
static Bool LIN_isBusBusy (uint32_t base)
 Check if Bus is Busy. More...
 
static Bool LIN_isTxBufferEmpty (uint32_t base)
 Check if the Transmit Buffer is Empty. More...
 
static void LIN_enableExtLoopback (uint32_t base, LIN_LoopbackType loopbackType, LIN_AnalogLoopback path)
 Enable External Loopback mode for self test. More...
 
static void LIN_disableExtLoopback (uint32_t base)
 Disable External Loopback mode for self test. More...
 
static void LIN_enableIntLoopback (uint32_t base)
 Enable Internal Loopback mode for self test. More...
 
static void LIN_disableIntLoopback (uint32_t base)
 Disable Internal Loopback mode for self test. More...
 
static uint32_t LIN_getInterruptStatus (uint32_t base)
 Get Interrupt Flags Status. More...
 
static uint32_t LIN_getInterruptLevel (uint32_t base)
 Get the Interrupt Level. More...
 
static uint16_t LIN_getInterruptLine0Offset (uint32_t base)
 Gets the Interrupt Vector Offset for Line 0. More...
 
static uint16_t LIN_getInterruptLine1Offset (uint32_t base)
 Gets the Interrupt Vector Offset for Line 1. More...
 
static void LIN_enableMultibufferMode (uint32_t base)
 Enable Multi-buffer Mode. More...
 
static void LIN_disableMultibufferMode (uint32_t base)
 Disable Multi-buffer Mode. More...
 
static void LIN_setTransmitDelay (uint32_t base, uint16_t delay)
 Set Transmit Pin Delay. More...
 
static void LIN_setPinSampleMask (uint32_t base, LIN_PinSampleMask mask)
 Set Pin Sample Mask. More...
 
static void LIN_setDebugSuspendMode (uint32_t base, LIN_DebugMode mode)
 Set the Debug Suspended Mode. More...
 
static void LIN_enableGlobalInterrupt (uint32_t base, LIN_InterruptLine line)
 Enables a LIN global interrupt. More...
 
static void LIN_disableGlobalInterrupt (uint32_t base, LIN_InterruptLine line)
 Disables a LIN global interrupt. More...
 
static void LIN_clearGlobalInterruptStatus (uint32_t base, LIN_InterruptLine line)
 Clears a LIN global interrupt flag. More...
 
static Bool LIN_getGlobalInterruptStatus (uint32_t base, LIN_InterruptLine line)
 Returns a LIN global interrupt flag status. More...
 
static Bool LIN_getPinStatus (uint32_t base, LIN_PinType pin)
 Get the Status of LIN TX/RX Pin status. More...
 

Enumerations

enum  LIN_LoopbackType { LIN_LOOPBACK_DIGITAL = 0U, LIN_LOOPBACK_ANALOG = 1U }
 The following are defines for the type parameter of the LIN_enableExtLoopback() function. More...
 
enum  LIN_AnalogLoopback { LIN_ANALOG_LOOP_NONE = 0U, LIN_ANALOG_LOOP_TX = 0U, LIN_ANALOG_LOOP_RX = 1U }
 The following are defines for the path parameter of the LIN_enableExtLoopback() function. More...
 
enum  LIN_CommMode { LIN_COMM_LIN_USELENGTHVAL = 0x0000U, LIN_COMM_LIN_ID4ID5LENCTL = 0x0001U }
 The following are defines for the mode parameter of the LIN_setCommMode() function. More...
 
enum  LIN_SCICommMode { LIN_COMM_SCI_IDLELINE = 0x0000U, LIN_COMM_SCI_ADDRBIT = 0x0001U }
 The following are defines for the mode parameter of the LIN_setSCICommMode() function. More...
 
enum  LIN_LINMode { LIN_MODE_LIN_RESPONDER = 0x0U, LIN_MODE_LIN_COMMANDER = 0x1U }
 The following are defines for the mode parameter of the LIN_setLINMode() function. More...
 
enum  LIN_InterruptLine { LIN_INTERRUPT_LINE0 = 0x0U, LIN_INTERRUPT_LINE1 = 0x1U }
 The following are defines for the line parameter of the LIN_enableGlobalInterrupt(), LIN_disableGlobalInterrupt(), LIN_clearGlobalInterruptStatus(), and LIN_getGlobalInterruptStatus() functions. More...
 
enum  LIN_MessageFilter { LIN_MSG_FILTER_IDBYTE = 0x0U, LIN_MSG_FILTER_IDRESPONDER = 0x1U }
 The following are defines for the type parameter of the LIN_setMessageFiltering() function. More...
 
enum  LIN_ChecksumType { LIN_CHECKSUM_CLASSIC = 0x0U, LIN_CHECKSUM_ENHANCED = 0x1U }
 The following are defines for the type parameter of the LIN_setChecksumType() function. More...
 
enum  LIN_DebugMode { LIN_DEBUG_FROZEN = 0x0U, LIN_DEBUG_COMPLETE = 0x1U }
 The following are defines for the mode parameter of the LIN_setDebugSuspendMode() function. More...
 
enum  LIN_PinSampleMask { LIN_PINMASK_NONE = 0x0U, LIN_PINMASK_CENTER = 0x1U, LIN_PINMASK_CENTER_SCLK = 0x2U, LIN_PINMASK_CENTER_2SCLK = 0x3U }
 The following are defines for the mask parameter of the LIN_setPinSampleMask() function. More...
 
enum  LIN_SCIParityType { LIN_SCI_PAR_ODD = 0x0U, LIN_SCI_PAR_EVEN = 0x1U }
 The following are defines for the parity parameter of the LIN_enableSCIParity() function. More...
 
enum  LIN_SCIStopBits { LIN_SCI_STOP_ONE = 0x0U, LIN_SCI_STOP_TWO = 0x1U }
 The following are defines for the number parameter of the LIN_setSCIStopBits() function. More...
 
enum  LIN_PinType { LIN_PINTYPE_TX = 0x4U, LIN_PINTYPE_RX = 0x2U }
 The following are defines for the pin parameter of the LIN_getPinStatus() function. More...
 

Macros

#define LIN_IO_DFT_KEY   (0xAU)
 LIN IO DFT Key which when written in IODFTENA enables the User and Previledge mode Writes. More...
 
#define LIN_WAKEUP_KEY   (0xF0U)
 LIN/SCI Wakeup signal is sent by sending an byte with value 0xF0. More...
 

Lin Parity ID Masks

Note: Parity ID Masks for LIN

#define LIN_ID0   (0x1U)
 
#define LIN_ID1   (0x2U)
 
#define LIN_ID2   (0x4U)
 
#define LIN_ID3   (0x8U)
 
#define LIN_ID4   (0x10U)
 
#define LIN_ID5   (0x20U)
 

Lin Interrupt Flag Parameters

Note: Definition for the intFlags parameter of LIN_enableInterrupt(), LIN_disableInterrupt(), LIN_clearInterruptStatus(), LIN_setInterruptLevel0() and LIN_setInterruptLevel1().

#define LIN_INT_WAKEUP   (0x00000002U) /* Wakeup */
 
#define LIN_INT_TO   (0x00000010U) /* Time out */
 
#define LIN_INT_TOAWUS   (0x00000040U) /* Time out after wakeup signal */
 
#define LIN_INT_TOA3WUS   (0x00000080U) /* Time out after 3 wakeup signals */
 
#define LIN_INT_TX   (0x00000100U) /* Transmit buffer ready */
 
#define LIN_INT_RX   (0x00000200U) /* Receive buffer ready */
 
#define LIN_INT_ID   (0x00002000U) /* Received matching identifier */
 
#define LIN_INT_PE   (0x01000000U) /* Parity error */
 
#define LIN_INT_OE   (0x02000000U) /* Overrun error */
 
#define LIN_INT_FE   (0x04000000U) /* Framing error */
 
#define LIN_INT_NRE   (0x08000000U) /* No response error */
 
#define LIN_INT_ISFE   (0x10000000U) /* Inconsistent sync field error */
 
#define LIN_INT_CE   (0x20000000U) /* Checksum error */
 
#define LIN_INT_PBE   (0x40000000U) /* Physical bus error */
 
#define LIN_INT_BE   (0x80000000U) /* Bit error */
 
#define LIN_INT_ALL   (0xFF0023D2U) /* All interrupts */
 

Lin Get Interrupt Flag

Note: Definitions for the return value of LIN_getInterruptStatus().

#define LIN_FLAG_BREAK   (CSL_LIN_SCIFLR_BRKDT_MASK)
 
#define LIN_FLAG_WAKEUP   (CSL_LIN_SCIFLR_WAKEUP_MASK)
 
#define LIN_FLAG_IDLE   (CSL_LIN_SCIFLR_IDLE_MASK)
 
#define LIN_FLAG_BUSY   (CSL_LIN_SCIFLR_BUSY_MASK)
 
#define LIN_FLAG_TO   (CSL_LIN_SCIFLR_TIMEOUT_MASK)
 
#define LIN_FLAG_TOAWUS   (CSL_LIN_SCIFLR_TOAWUS_MASK)
 
#define LIN_FLAG_TOA3WUS   (CSL_LIN_SCIFLR_TOA3WUS_MASK)
 
#define LIN_FLAG_TXRDY   (CSL_LIN_SCIFLR_TXRDY_MASK)
 
#define LIN_FLAG_RXRDY   (CSL_LIN_SCIFLR_RXRDY_MASK)
 
#define LIN_FLAG_TXWAKE   (CSL_LIN_SCIFLR_TXWAKE_MASK)
 
#define LIN_FLAG_TXEMPTY   (CSL_LIN_SCIFLR_TXEMPTY_MASK)
 
#define LIN_FLAG_RXWAKE   (CSL_LIN_SCIFLR_RXWAKE_MASK)
 
#define LIN_FLAG_TXID   (CSL_LIN_SCIFLR_IDTXFLAG_MASK)
 
#define LIN_FLAG_RXID   (CSL_LIN_SCIFLR_IDRXFLAG_MASK)
 
#define LIN_FLAG_PE   (CSL_LIN_SCIFLR_PE_MASK)
 
#define LIN_FLAG_OE   (CSL_LIN_SCIFLR_OE_MASK)
 
#define LIN_FLAG_FE   (CSL_LIN_SCIFLR_FE_MASK)
 
#define LIN_FLAG_NRE   (CSL_LIN_SCIFLR_NRE_MASK)
 
#define LIN_FLAG_ISFE   (CSL_LIN_SCIFLR_ISFE_MASK)
 
#define LIN_FLAG_CE   (CSL_LIN_SCIFLR_CE_MASK)
 
#define LIN_FLAG_PBE   (CSL_LIN_SCIFLR_PBE_MASK)
 
#define LIN_FLAG_BE   (CSL_LIN_SCIFLR_BE_MASK)
 

Lin Interrupt Offset

Note: Definitions for the return value of LIN_getInterruptLine0Offset() and LIN_getInterruptLine1Offset().

#define LIN_VECT_NONE   (0x00)
 
#define LIN_VECT_WAKEUP   (0x01)
 
#define LIN_VECT_ISFE   (0x02)
 
#define LIN_VECT_PE   (0x03)
 
#define LIN_VECT_ID   (0x04)
 
#define LIN_VECT_PBE   (0x05)
 
#define LIN_VECT_FE   (0x06)
 
#define LIN_VECT_BREAK   (0x07)
 
#define LIN_VECT_CE   (0x08)
 
#define LIN_VECT_OE   (0x09)
 
#define LIN_VECT_BE   (0x0A)
 
#define LIN_VECT_RX   (0x0B)
 
#define LIN_VECT_TX   (0x0C)
 
#define LIN_VECT_NRE   (0x0D)
 
#define LIN_VECT_TOAWUS   (0x0E)
 
#define LIN_VECT_TOA3WUS   (0x0F)
 
#define LIN_VECT_TO   (0x10)
 

Lin Error Defination

Note: Definitions for the LIN errors parameter of LIN_enableModuleErrors() and LIN_disableModuleErrors().

#define LIN_ALL_ERRORS   (0xF0000000U)
 
#define LIN_BIT_ERROR   (0x80000000U)
 
#define LIN_BUS_ERROR   (0x40000000U)
 
#define LIN_CHECKSUM_ERROR   (0x20000000U)
 
#define LIN_ISF_ERROR   (0x10000000U)
 

Lin Serial Communication Interface Error Defination

Note: Definitions for the intFlags parameter of LIN_enableSCIInterrupt(), LIN_disableSCIInterrupt(), LIN_clearSCIInterruptStatus(), LIN_setSCIInterruptLevel0() and LIN_setSCIInterruptLevel1().

#define LIN_SCI_ALL_ERRORS   (0x7000000U)
 
#define LIN_SCI_FRAME_ERROR   (0x4000000U)
 
#define LIN_SCI_PARITY_ERROR   (0x2000000U)
 
#define LIN_SCI_BREAK_ERROR   (0x1000000U)
 
#define LIN_SCI_INT_BREAK   (0x1U)
 
#define LIN_SCI_INT_WAKEUP   (0x2U)
 
#define LIN_SCI_INT_TX   (0x100U)
 
#define LIN_SCI_INT_RX   (0x200U)
 
#define LIN_SCI_INT_TX_DMA   (0x10000U)
 
#define LIN_SCI_INT_RX_DMA   (0x20000U)
 
#define LIN_SCI_INT_PARITY   (0x1000000U)
 
#define LIN_SCI_INT_OVERRUN   (0x2000000U)
 
#define LIN_SCI_INT_FRAME   (0x4000000U)
 
#define LIN_SCI_INT_ALL   (0x7000303U)
 

Macro Definition Documentation

◆ LIN_IO_DFT_KEY

#define LIN_IO_DFT_KEY   (0xAU)

LIN IO DFT Key which when written in IODFTENA enables the User and Previledge mode Writes.

◆ LIN_WAKEUP_KEY

#define LIN_WAKEUP_KEY   (0xF0U)

LIN/SCI Wakeup signal is sent by sending an byte with value 0xF0.

◆ LIN_ID0

#define LIN_ID0   (0x1U)

◆ LIN_ID1

#define LIN_ID1   (0x2U)

◆ LIN_ID2

#define LIN_ID2   (0x4U)

◆ LIN_ID3

#define LIN_ID3   (0x8U)

◆ LIN_ID4

#define LIN_ID4   (0x10U)

◆ LIN_ID5

#define LIN_ID5   (0x20U)

◆ LIN_INT_WAKEUP

#define LIN_INT_WAKEUP   (0x00000002U) /* Wakeup */

◆ LIN_INT_TO

#define LIN_INT_TO   (0x00000010U) /* Time out */

◆ LIN_INT_TOAWUS

#define LIN_INT_TOAWUS   (0x00000040U) /* Time out after wakeup signal */

◆ LIN_INT_TOA3WUS

#define LIN_INT_TOA3WUS   (0x00000080U) /* Time out after 3 wakeup signals */

◆ LIN_INT_TX

#define LIN_INT_TX   (0x00000100U) /* Transmit buffer ready */

◆ LIN_INT_RX

#define LIN_INT_RX   (0x00000200U) /* Receive buffer ready */

◆ LIN_INT_ID

#define LIN_INT_ID   (0x00002000U) /* Received matching identifier */

◆ LIN_INT_PE

#define LIN_INT_PE   (0x01000000U) /* Parity error */

◆ LIN_INT_OE

#define LIN_INT_OE   (0x02000000U) /* Overrun error */

◆ LIN_INT_FE

#define LIN_INT_FE   (0x04000000U) /* Framing error */

◆ LIN_INT_NRE

#define LIN_INT_NRE   (0x08000000U) /* No response error */

◆ LIN_INT_ISFE

#define LIN_INT_ISFE   (0x10000000U) /* Inconsistent sync field error */

◆ LIN_INT_CE

#define LIN_INT_CE   (0x20000000U) /* Checksum error */

◆ LIN_INT_PBE

#define LIN_INT_PBE   (0x40000000U) /* Physical bus error */

◆ LIN_INT_BE

#define LIN_INT_BE   (0x80000000U) /* Bit error */

◆ LIN_INT_ALL

#define LIN_INT_ALL   (0xFF0023D2U) /* All interrupts */

◆ LIN_FLAG_BREAK

#define LIN_FLAG_BREAK   (CSL_LIN_SCIFLR_BRKDT_MASK)

◆ LIN_FLAG_WAKEUP

#define LIN_FLAG_WAKEUP   (CSL_LIN_SCIFLR_WAKEUP_MASK)

◆ LIN_FLAG_IDLE

#define LIN_FLAG_IDLE   (CSL_LIN_SCIFLR_IDLE_MASK)

◆ LIN_FLAG_BUSY

#define LIN_FLAG_BUSY   (CSL_LIN_SCIFLR_BUSY_MASK)

◆ LIN_FLAG_TO

#define LIN_FLAG_TO   (CSL_LIN_SCIFLR_TIMEOUT_MASK)

◆ LIN_FLAG_TOAWUS

#define LIN_FLAG_TOAWUS   (CSL_LIN_SCIFLR_TOAWUS_MASK)

◆ LIN_FLAG_TOA3WUS

#define LIN_FLAG_TOA3WUS   (CSL_LIN_SCIFLR_TOA3WUS_MASK)

◆ LIN_FLAG_TXRDY

#define LIN_FLAG_TXRDY   (CSL_LIN_SCIFLR_TXRDY_MASK)

◆ LIN_FLAG_RXRDY

#define LIN_FLAG_RXRDY   (CSL_LIN_SCIFLR_RXRDY_MASK)

◆ LIN_FLAG_TXWAKE

#define LIN_FLAG_TXWAKE   (CSL_LIN_SCIFLR_TXWAKE_MASK)

◆ LIN_FLAG_TXEMPTY

#define LIN_FLAG_TXEMPTY   (CSL_LIN_SCIFLR_TXEMPTY_MASK)

◆ LIN_FLAG_RXWAKE

#define LIN_FLAG_RXWAKE   (CSL_LIN_SCIFLR_RXWAKE_MASK)

◆ LIN_FLAG_TXID

#define LIN_FLAG_TXID   (CSL_LIN_SCIFLR_IDTXFLAG_MASK)

◆ LIN_FLAG_RXID

#define LIN_FLAG_RXID   (CSL_LIN_SCIFLR_IDRXFLAG_MASK)

◆ LIN_FLAG_PE

#define LIN_FLAG_PE   (CSL_LIN_SCIFLR_PE_MASK)

◆ LIN_FLAG_OE

#define LIN_FLAG_OE   (CSL_LIN_SCIFLR_OE_MASK)

◆ LIN_FLAG_FE

#define LIN_FLAG_FE   (CSL_LIN_SCIFLR_FE_MASK)

◆ LIN_FLAG_NRE

#define LIN_FLAG_NRE   (CSL_LIN_SCIFLR_NRE_MASK)

◆ LIN_FLAG_ISFE

#define LIN_FLAG_ISFE   (CSL_LIN_SCIFLR_ISFE_MASK)

◆ LIN_FLAG_CE

#define LIN_FLAG_CE   (CSL_LIN_SCIFLR_CE_MASK)

◆ LIN_FLAG_PBE

#define LIN_FLAG_PBE   (CSL_LIN_SCIFLR_PBE_MASK)

◆ LIN_FLAG_BE

#define LIN_FLAG_BE   (CSL_LIN_SCIFLR_BE_MASK)

◆ LIN_VECT_NONE

#define LIN_VECT_NONE   (0x00)

◆ LIN_VECT_WAKEUP

#define LIN_VECT_WAKEUP   (0x01)

◆ LIN_VECT_ISFE

#define LIN_VECT_ISFE   (0x02)

◆ LIN_VECT_PE

#define LIN_VECT_PE   (0x03)

◆ LIN_VECT_ID

#define LIN_VECT_ID   (0x04)

◆ LIN_VECT_PBE

#define LIN_VECT_PBE   (0x05)

◆ LIN_VECT_FE

#define LIN_VECT_FE   (0x06)

◆ LIN_VECT_BREAK

#define LIN_VECT_BREAK   (0x07)

◆ LIN_VECT_CE

#define LIN_VECT_CE   (0x08)

◆ LIN_VECT_OE

#define LIN_VECT_OE   (0x09)

◆ LIN_VECT_BE

#define LIN_VECT_BE   (0x0A)

◆ LIN_VECT_RX

#define LIN_VECT_RX   (0x0B)

◆ LIN_VECT_TX

#define LIN_VECT_TX   (0x0C)

◆ LIN_VECT_NRE

#define LIN_VECT_NRE   (0x0D)

◆ LIN_VECT_TOAWUS

#define LIN_VECT_TOAWUS   (0x0E)

◆ LIN_VECT_TOA3WUS

#define LIN_VECT_TOA3WUS   (0x0F)

◆ LIN_VECT_TO

#define LIN_VECT_TO   (0x10)

◆ LIN_ALL_ERRORS

#define LIN_ALL_ERRORS   (0xF0000000U)

◆ LIN_BIT_ERROR

#define LIN_BIT_ERROR   (0x80000000U)

◆ LIN_BUS_ERROR

#define LIN_BUS_ERROR   (0x40000000U)

◆ LIN_CHECKSUM_ERROR

#define LIN_CHECKSUM_ERROR   (0x20000000U)

◆ LIN_ISF_ERROR

#define LIN_ISF_ERROR   (0x10000000U)

◆ LIN_SCI_ALL_ERRORS

#define LIN_SCI_ALL_ERRORS   (0x7000000U)

◆ LIN_SCI_FRAME_ERROR

#define LIN_SCI_FRAME_ERROR   (0x4000000U)

◆ LIN_SCI_PARITY_ERROR

#define LIN_SCI_PARITY_ERROR   (0x2000000U)

◆ LIN_SCI_BREAK_ERROR

#define LIN_SCI_BREAK_ERROR   (0x1000000U)

◆ LIN_SCI_INT_BREAK

#define LIN_SCI_INT_BREAK   (0x1U)

◆ LIN_SCI_INT_WAKEUP

#define LIN_SCI_INT_WAKEUP   (0x2U)

◆ LIN_SCI_INT_TX

#define LIN_SCI_INT_TX   (0x100U)

◆ LIN_SCI_INT_RX

#define LIN_SCI_INT_RX   (0x200U)

◆ LIN_SCI_INT_TX_DMA

#define LIN_SCI_INT_TX_DMA   (0x10000U)

◆ LIN_SCI_INT_RX_DMA

#define LIN_SCI_INT_RX_DMA   (0x20000U)

◆ LIN_SCI_INT_PARITY

#define LIN_SCI_INT_PARITY   (0x1000000U)

◆ LIN_SCI_INT_OVERRUN

#define LIN_SCI_INT_OVERRUN   (0x2000000U)

◆ LIN_SCI_INT_FRAME

#define LIN_SCI_INT_FRAME   (0x4000000U)

◆ LIN_SCI_INT_ALL

#define LIN_SCI_INT_ALL   (0x7000303U)

Enumeration Type Documentation

◆ LIN_LoopbackType

The following are defines for the type parameter of the LIN_enableExtLoopback() function.

Enumerator
LIN_LOOPBACK_DIGITAL 

Digital Loopback Mode.

LIN_LOOPBACK_ANALOG 

Analog Loopback Mode.

◆ LIN_AnalogLoopback

The following are defines for the path parameter of the LIN_enableExtLoopback() function.

Enumerator
LIN_ANALOG_LOOP_NONE 

Default path for digital loopback mode.

LIN_ANALOG_LOOP_TX 

Analog loopback through transmit pin.

LIN_ANALOG_LOOP_RX 

Analog loopback through receive pin.

◆ LIN_CommMode

The following are defines for the mode parameter of the LIN_setCommMode() function.

Enumerator
LIN_COMM_LIN_USELENGTHVAL 
LIN_COMM_LIN_ID4ID5LENCTL 

◆ LIN_SCICommMode

The following are defines for the mode parameter of the LIN_setSCICommMode() function.

Enumerator
LIN_COMM_SCI_IDLELINE 
LIN_COMM_SCI_ADDRBIT 

◆ LIN_LINMode

The following are defines for the mode parameter of the LIN_setLINMode() function.

Enumerator
LIN_MODE_LIN_RESPONDER 
LIN_MODE_LIN_COMMANDER 

◆ LIN_InterruptLine

The following are defines for the line parameter of the LIN_enableGlobalInterrupt(), LIN_disableGlobalInterrupt(), LIN_clearGlobalInterruptStatus(), and LIN_getGlobalInterruptStatus() functions.

Enumerator
LIN_INTERRUPT_LINE0 
LIN_INTERRUPT_LINE1 

◆ LIN_MessageFilter

The following are defines for the type parameter of the LIN_setMessageFiltering() function.

Enumerator
LIN_MSG_FILTER_IDBYTE 
LIN_MSG_FILTER_IDRESPONDER 

◆ LIN_ChecksumType

The following are defines for the type parameter of the LIN_setChecksumType() function.

Enumerator
LIN_CHECKSUM_CLASSIC 
LIN_CHECKSUM_ENHANCED 

◆ LIN_DebugMode

The following are defines for the mode parameter of the LIN_setDebugSuspendMode() function.

Enumerator
LIN_DEBUG_FROZEN 

Freeze module during debug.

LIN_DEBUG_COMPLETE 

Complete Tx/Rx before Freezing.

◆ LIN_PinSampleMask

The following are defines for the mask parameter of the LIN_setPinSampleMask() function.

Enumerator
LIN_PINMASK_NONE 
LIN_PINMASK_CENTER 
LIN_PINMASK_CENTER_SCLK 
LIN_PINMASK_CENTER_2SCLK 

◆ LIN_SCIParityType

The following are defines for the parity parameter of the LIN_enableSCIParity() function.

Enumerator
LIN_SCI_PAR_ODD 
LIN_SCI_PAR_EVEN 

◆ LIN_SCIStopBits

The following are defines for the number parameter of the LIN_setSCIStopBits() function.

Enumerator
LIN_SCI_STOP_ONE 
LIN_SCI_STOP_TWO 

◆ LIN_PinType

The following are defines for the pin parameter of the LIN_getPinStatus() function.

Enumerator
LIN_PINTYPE_TX 
LIN_PINTYPE_RX 

Function Documentation

◆ LIN_initModule()

void LIN_initModule ( uint32_t  base)

This function initializes the LIN module.

Parameters
baseBase Address of the LIN Registers.

◆ LIN_getData()

void LIN_getData ( uint32_t  base,
uint16_t *const  data 
)

This function reads the received data.

Parameters
baseBase Address of the LIN Registers.
dataPointer pointing to the buffer where the data is to be saved.

◆ LIN_sendData()

void LIN_sendData ( uint32_t  base,
uint16_t *  data 
)

This function sends the data.

Parameters
baseBase Address of the LIN Registers.
dataPointer pointing to the buffer where the data to send is saved.

◆ LIN_isBaseValid()

static Bool LIN_isBaseValid ( uint32_t  base)
inlinestatic

Checks a LIN base address.

Parameters
baseis the base address of the LIN commander.
Note
This function determines if a LIN commander base address is valid.
Returns
Returns true if the base address is valid and false otherwise.

◆ LIN_setLINMode()

static void LIN_setLINMode ( uint32_t  base,
LIN_LINMode  mode 
)
inlinestatic

Sets the LIN mode.

Parameters
baseis the base address of the LIN commander.
modeis the desired mode (responder or commander).
Note
In LIN mode only, this function sets the mode of the LIN mode to either responder or commander. The mode parameter should be passed a value of LIN_MODE_LIN_RESPONDER or LIN_MODE_LIN_COMMANDER to configure the mode of the LIN module specified by base.

◆ LIN_setMaximumBaudRate()

static void LIN_setMaximumBaudRate ( uint32_t  base,
uint32_t  clock 
)
inlinestatic

Set Maximum Baud Rate Prescaler.

Parameters
baseis the base address of the LIN commander.
clockis the device system clock (Hz).

In LIN mode only, this function is used to set the maximum baud rate prescaler used during synchronization phase of a responder module if the ADAPT bit is set. The maximum baud rate prescaler is used by the wakeup and idle timer counters for a constant 4 second expiration time relative to a 20kHz rate.

Note
Use LIN_enableAutomaticBaudrate() to set the ADAPT bit and enable automatic bit rate mod detection.

◆ LIN_setMessageFiltering()

static void LIN_setMessageFiltering ( uint32_t  base,
LIN_MessageFilter  type 
)
inlinestatic

Set Message filtering Type.

Parameters
baseis the LIN module base address.
typeis the mask filtering comparison type.

In LIN mode only, this function sets the message filtering type. The type parameter can be one of the following values:

  • LIN_MSG_FILTER_IDBYTE - Filtering uses LIN message ID Byte
  • LIN_MSG_FILTER_IDRESPONDER - Filtering uses the Responder Task ID Byte

◆ LIN_enableParity()

static void LIN_enableParity ( uint32_t  base)
inlinestatic

Enable Parity mode.

Parameters
baseis the LIN module base address.

In LIN mode only, this function enables the parity check.

◆ LIN_disableParity()

static void LIN_disableParity ( uint32_t  base)
inlinestatic

Disable Parity mode.

Parameters
baseis the LIN module base address

In LIN mode only, this function disables the parity check.

◆ LIN_generateParityID()

static uint16_t LIN_generateParityID ( uint16_t  identifier)
inlinestatic

Generate Parity Identifier.

Parameters
identifieris the LIN header ID byte

In LIN mode only, this function generates the identifier parity bits and appends them to the identifier.

Note
An ID must be generated with parity before header generation in LIN commander mode when parity is enabled using the function LIN_enableParity().
Returns
Returns the identifier appended with parity bits.

◆ LIN_setIDByte()

static void LIN_setIDByte ( uint32_t  base,
uint16_t  identifier 
)
inlinestatic

Set ID Byte.

Parameters
baseis the LIN module base address
identifieris the LIN header ID byte

In LIN mode only, this function sets the message ID byte. In commander mode, writing to this ID initiates a header transmission. In responder task, this ID is used for message filtering when HGENCTRL is 0.

◆ LIN_setIDResponderTask()

static void LIN_setIDResponderTask ( uint32_t  base,
uint16_t  identifier 
)
inlinestatic

Set ID-ResponderTask.

Parameters
baseis the LIN module base address
identifieris the Received ID comparison ID

In LIN mode only, this function sets the identifier to which the received ID of an incoming Header will be compared in order to decide whether a RX response, a TX response, or no action is required.

◆ LIN_sendWakeupSignal()

static void LIN_sendWakeupSignal ( uint32_t  base)
inlinestatic

Send LIN wakeup signal.

Parameters
baseis the LIN module base address

In LIN mode only, this function sends the LIN wakeup signal to terminate the sleep mode of any LIN node connected to the bus.

◆ LIN_enterSleep()

static void LIN_enterSleep ( uint32_t  base)
inlinestatic

Entering LIN sleep signal.

Parameters
baseis the LIN module base address

In LIN mode only, this function puts the LIN module into a low-power, sleep mode. This can also be called to forcefully enter sleep when there is no activity on the bus.

Note
If this function is called while the receiver is actively receiving data and the wakeup interrupt is disabled, then the module will delay sleep mode from being entered until completion of reception.

◆ LIN_sendChecksum()

static void LIN_sendChecksum ( uint32_t  base)
inlinestatic

Send Checksum Byte.

Parameters
baseis the LIN module base address

In LIN mode only, this function enables the transmitter with extended frames to send a checkbyte.

◆ LIN_triggerChecksumCompare()

static void LIN_triggerChecksumCompare ( uint32_t  base)
inlinestatic

Trigger Checksum Compare.

Parameters
baseis the LIN module base address

In LIN mode only, this function enables the receiver for extended frames to trigger a checksum compare.

◆ LIN_isTxReady()

static Bool LIN_isTxReady ( uint32_t  base)
inlinestatic

Check Tx buffer ready flag.

Parameters
baseis the LIN module base address

In LIN mode only, this function checks to see if the Tx ready flag is set indicating that the Tx buffer(s) is/are ready to get another character.

Returns
Returns true if the TX ready flag is set, else returns false

◆ LIN_setFrameLength()

static void LIN_setFrameLength ( uint32_t  base,
uint16_t  length 
)
inlinestatic

Set LIN Frame Length.

Parameters
baseis the LIN module base address
lengthis the number of bytes.

In LIN mode only, this function sets the number of bytes in the response field.

The length parameter must be in a range between 1 and 8.

◆ LIN_setCommMode()

static void LIN_setCommMode ( uint32_t  base,
LIN_CommMode  mode 
)
inlinestatic

Set LIN communication mode.

Parameters
baseis the LIN module base address
modeis the selected communication mode

In LIN mode only, this function is used to choose how the length of data is conveyed. This choice relates to the version of LIN being used. The mode parameter can have one of two values:

  • LIN_COMM_LIN_USELENGTHVAL will use the length set with the LIN_setFrameLength() function.
  • LIN_COMM_LIN_ID4ID5LENCTL will use ID4 and ID5 for length control.

◆ LIN_setTxMask()

static void LIN_setTxMask ( uint32_t  base,
uint16_t  mask 
)
inlinestatic

Sets the transmit ID mask.

Parameters
baseis the LIN module base address
maskis the mask value to be set

In LIN mode only, this function sets the mask used for filtering an incoming ID message to determine if the TX ID flag should be set.

◆ LIN_setRxMask()

static void LIN_setRxMask ( uint32_t  base,
uint16_t  mask 
)
inlinestatic

Sets the receive ID mask.

Parameters
baseis the LIN module base address
maskis the mask value to be set

In LIN mode only, this function sets the mask used for filtering an incoming ID message to determine if the ID RX flag should be set.

◆ LIN_getTxMask()

static uint16_t LIN_getTxMask ( uint32_t  base)
inlinestatic

Gets the transmit ID mask.

Parameters
baseis the LIN module base address

In LIN mode only, this function gets the mask used for filtering an incoming ID message to determine if the TX ID flag should be set.

◆ LIN_getRxMask()

static uint16_t LIN_getRxMask ( uint32_t  base)
inlinestatic

Gets the receive ID mask.

Parameters
baseis the LIN module base address

In LIN mode only, this function gets the mask used for filtering an incoming ID message to determine if the ID RX flag should be set.

Returns
Returns the Transmit ID Mask.

◆ LIN_isRxReady()

static Bool LIN_isRxReady ( uint32_t  base)
inlinestatic

Gets the receive ID mask.

Parameters
baseis the LIN module base address

In LIN mode only, checks to see if the Rx ready bit is set indicating that a valid message frame has been received.

Returns
Returns true if the Rx ready flag is set, else returns false.

◆ LIN_getRxIdentifier()

static uint16_t LIN_getRxIdentifier ( uint32_t  base)
inlinestatic

Get last received identifier.

Parameters
baseis the LIN module base address

In LIN mode only, this function gets the last received identifier.

Returns
Returns the Received Identifier.

◆ LIN_isTxMatch()

static Bool LIN_isTxMatch ( uint32_t  base)
inlinestatic

Checks for Tx ID Match Received.

Parameters
baseis the LIN module base address

In LIN mode only, this function checks if an ID is received with a TX match and no ID-parity error.

Returns
Returns true if a valid ID is matched, else returns false.

◆ LIN_isRxMatch()

static Bool LIN_isRxMatch ( uint32_t  base)
inlinestatic

Checks for Rx ID Match Received.

Parameters
baseis the LIN module base address

In LIN mode only, this function checks if an ID is received with a RX match and no ID-parity error.

Returns
Returns true if a valid ID is matched, else returns false.

◆ LIN_enableInterrupt()

static void LIN_enableInterrupt ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Enable interrupts.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be enabled

In LIN mode only, this function enables the interrupts for the specified interrupt sources.

The intFlags parameter can be set to the following value to set all the flag bits:

  • LIN_INT_ALL - All Interrupts

To set individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_INT_WAKEUP - Wakeup
  • LIN_INT_TO - Time out
  • LIN_INT_TOAWUS - Time out after wakeup signal
  • LIN_INT_TOA3WUS - Time out after 3 wakeup signals
  • LIN_INT_TX - Transmit buffer ready
  • LIN_INT_RX - Receive buffer ready
  • LIN_INT_ID - Received matching identifier
  • LIN_INT_PE - Parity error
  • LIN_INT_OE - Overrun error
  • LIN_INT_FE - Framing error
  • LIN_INT_NRE - No response error
  • LIN_INT_ISFE - Inconsistent sync field error
  • LIN_INT_CE - Checksum error
  • LIN_INT_PBE - Physical bus error
  • LIN_INT_BE - Bit error

◆ LIN_disableInterrupt()

static void LIN_disableInterrupt ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Disable interrupts.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be disabled.

In LIN mode only, this function disables the interrupts for the specified interrupt sources.

The intFlags parameter can be set to the following value to clear all the flag bits:

  • LIN_INT_ALL - All Interrupts

To clear individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_INT_WAKEUP - Wakeup
  • LIN_INT_TO - Time out
  • LIN_INT_TOAWUS - Time out after wakeup signal
  • LIN_INT_TOA3WUS - Time out after 3 wakeup signals
  • LIN_INT_TX - Transmit buffer ready
  • LIN_INT_RX - Receive buffer ready
  • LIN_INT_ID - Received matching identifier
  • LIN_INT_PE - Parity error
  • LIN_INT_OE - Overrun error
  • LIN_INT_FE - Framing error
  • LIN_INT_NRE - No response error
  • LIN_INT_ISFE - Inconsistent sync field error
  • LIN_INT_CE - Checksum error
  • LIN_INT_PBE - Physical bus error
  • LIN_INT_BE - Bit error

◆ LIN_clearInterruptStatus()

static void LIN_clearInterruptStatus ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Clear interrupt status.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be cleared.

In LIN mode only, this function clears the specified status flags.

The intFlags parameter can be set to the following value to clear all the flag bits:

  • LIN_INT_ALL - All Interrupts

To clear individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_INT_WAKEUP - Wakeup
  • LIN_INT_TO - Time out
  • LIN_INT_TOAWUS - Time out after wakeup signal
  • LIN_INT_TOA3WUS - Time out after 3 wakeup signals
  • LIN_INT_TX - Transmit buffer ready
  • LIN_INT_RX - Receive buffer ready
  • LIN_INT_ID - Received matching identifier
  • LIN_INT_PE - Parity error
  • LIN_INT_OE - Overrun error
  • LIN_INT_FE - Framing error
  • LIN_INT_NRE - No response error
  • LIN_INT_ISFE - Inconsistent sync field error
  • LIN_INT_CE - Checksum error
  • LIN_INT_PBE - Physical bus error
  • LIN_INT_BE - Bit error

◆ LIN_setInterruptLevel0()

static void LIN_setInterruptLevel0 ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Set interrupt level to 0.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be cleared.

In LIN mode only, this function sets the specified interrupt sources to level 0.

The intFlags parameter can be set to the following value to set all the flag bits:

  • LIN_INT_ALL - All Interrupts

To set individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_INT_WAKEUP - Wakeup
  • LIN_INT_TO - Time out
  • LIN_INT_TOAWUS - Time out after wakeup signal
  • LIN_INT_TOA3WUS - Time out after 3 wakeup signals
  • LIN_INT_TX - Transmit buffer ready
  • LIN_INT_RX - Receive buffer ready
  • LIN_INT_ID - Received matching identifier
  • LIN_INT_PE - Parity error
  • LIN_INT_OE - Overrun error
  • LIN_INT_FE - Framing error
  • LIN_INT_NRE - No response error
  • LIN_INT_ISFE - Inconsistent sync field error
  • LIN_INT_CE - Checksum error
  • LIN_INT_PBE - Physical bus error
  • LIN_INT_BE - Bit error

◆ LIN_setInterruptLevel1()

static void LIN_setInterruptLevel1 ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Set interrupt level to 1.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be cleared.

In LIN mode only, this function sets the specified interrupt sources to level 1.

The intFlags parameter can be set to the following value to set all the flag bits:

  • LIN_INT_ALL - All Interrupts

To set individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_INT_WAKEUP - Wakeup
  • LIN_INT_TO - Time out
  • LIN_INT_TOAWUS - Time out after wakeup signal
  • LIN_INT_TOA3WUS - Time out after 3 wakeup signals
  • LIN_INT_TX - Transmit buffer ready
  • LIN_INT_RX - Receive buffer ready
  • LIN_INT_ID - Received matching identifier
  • LIN_INT_PE - Parity error
  • LIN_INT_OE - Overrun error
  • LIN_INT_FE - Framing error
  • LIN_INT_NRE - No response error
  • LIN_INT_ISFE - Inconsistent sync field error
  • LIN_INT_CE - Checksum error
  • LIN_INT_PBE - Physical bus error
  • LIN_INT_BE - Bit error

◆ LIN_enableModuleErrors()

static void LIN_enableModuleErrors ( uint32_t  base,
uint32_t  errors 
)
inlinestatic

Enable Module Errors for Testing.

Parameters
baseis the LIN module base address
errorsis the specified errors to be enabled

In LIN mode only, this function enables the specified errors in the module for testing. The errors parameter can be a logical OR-ed result of the following values or LIN_ALL_ERRORS can be used to enable all of them:

  • LIN_BIT_ERROR - Simulates a bit error
  • LIN_BUS_ERROR - Simulates a physical bus error
  • LIN_CHECKSUM_ERROR - Simulates a checksum error
  • LIN_ISF_ERROR - Simulates an inconsistent synch field error
Note
To disable these errors, use the LIN_disableModuleErrors() function.

◆ LIN_disableModuleErrors()

static void LIN_disableModuleErrors ( uint32_t  base,
uint32_t  errors 
)
inlinestatic

Disable Module Errors for Testing.

Parameters
baseis the LIN module base address
errorsis the specified errors to be disabled

In LIN mode only, this function disables the specified errors in the module for testing. The errors parameter can be a logical OR-ed result of the following values or LIN_ALL_ERRORS can be used to enable all of them:

  • LIN_BIT_ERROR - Simulates a bit error
  • LIN_BUS_ERROR - Simulates a physical bus error
  • LIN_CHECKSUM_ERROR - Simulates a checksum error
  • LIN_ISF_ERROR - Simulates an inconsistent synch field error

◆ LIN_enableAutomaticBaudrate()

static void LIN_enableAutomaticBaudrate ( uint32_t  base)
inlinestatic

Enable Automatic Baudrate Adjustment.

Parameters
baseis the LIN module base address

In LIN mode only, this function enables the automatic baudrate adjustment mode during the detection of the Synch Field.

Note
The baudrate selection register will be updated automatically by a responder node if this mode is enabled.

◆ LIN_disableAutomaticBaudrate()

static void LIN_disableAutomaticBaudrate ( uint32_t  base)
inlinestatic

Disable Automatic Baudrate Adjustment.

Parameters
baseis the LIN module base address

In LIN mode only, this function disables the automatic baudrate adjustment mode during the detection of the Synch Field. This results in a fixed baud rate.

◆ LIN_stopExtendedFrame()

static void LIN_stopExtendedFrame ( uint32_t  base)
inlinestatic

Stops LIN Extended Frame Communication.

Parameters
baseis the LIN module base address

In LIN mode only, this function stops the extended frame communication. Once stopped, the bit is automatically cleared.

Note
This function can only be called during extended frame communication.

◆ LIN_setChecksumType()

static void LIN_setChecksumType ( uint32_t  base,
LIN_ChecksumType  type 
)
inlinestatic

Set Checksum Type.

Parameters
baseis the LIN module base address
typeis the checksum type

In LIN mode only, this function sets the checksum type. The type parameter can be one of the following two values:

  • LIN_CHECKSUM_CLASSIC - Checksum Classic
  • LIN_CHECKSUM_ENHANCED - Checksum Enhanced

◆ LIN_setSyncFields()

static void LIN_setSyncFields ( uint32_t  base,
uint16_t  syncBreak,
uint16_t  delimiter 
)
inlinestatic

Set Sync Break Extend and Delimiter.

Parameters
baseis the LIN module base address
syncBreakis the sync break extend value
delimiteris the sync delimiter value

In LIN mode only, this function sets the 3-bit sync break extend value and the 2-bit sync delimiter compare value.

The break parameter can be a value between 0 to 7. Details:

  • 0 - Sync Break has no additional T-bit
  • 1 - Sync Break has 1 additional T-bit
  • ...
  • 7 - Sync Break has 7 additional T-bits

The delimiter parameter can be a value between 1 to 4. Details:

  • 1 - Delimiter has 1 T-bit
  • 2 - Delimiter has 2 T-bits
  • 3 - Delimiter has 3 T-bits
  • 4 - Delimiter has 4 T-bits

◆ LIN_enableSCIMode()

static void LIN_enableSCIMode ( uint32_t  base)
inlinestatic

Enable SCI Mode.

Parameters
baseis the LIN module base address

This function enables the LIN peripheral to function as a SCI.

◆ LIN_disableSCIMode()

static void LIN_disableSCIMode ( uint32_t  base)
inlinestatic

Disable SCI Mode.

Parameters
baseis the LIN module base address

This function disables the SCI mode of the LIN peripheral.

◆ LIN_setSCICommMode()

static void LIN_setSCICommMode ( uint32_t  base,
LIN_SCICommMode  mode 
)
inlinestatic

Set SCI communication mode.

Parameters
baseis the LIN module base address
modeis the selected communication mode

In SCI mode only, this function is used to select between idle-line mode and address-bit mode. The mode parameter can have one of the following values:

  • LIN_COMM_SCI_IDLELINE - Idle-line mode.
  • LIN_COMM_SCI_ADDRBIT - Address-bit mode.

◆ LIN_enableSCIParity()

static void LIN_enableSCIParity ( uint32_t  base,
LIN_SCIParityType  parity 
)
inlinestatic

Enable SCI Parity mode.

Parameters
baseis the LIN module base address
parityis the SCI parity type

In SCI mode only, this function enables the parity check and sets the parity type. The parity parameter can one of the following values:

  • LIN_SCI_PAR_ODD - Sets Odd parity
  • LIN_SCI_PAR_EVEN - Sets Even parity

◆ LIN_disableSCIParity()

static void LIN_disableSCIParity ( uint32_t  base)
inlinestatic

Disable SCI Parity mode.

Parameters
baseis the LIN module base address

In SCI mode only, this function disables the parity check.

◆ LIN_setSCIStopBits()

static void LIN_setSCIStopBits ( uint32_t  base,
LIN_SCIStopBits  number 
)
inlinestatic

Set the number of stop bits for SCI.

Parameters
baseis the LIN module base address
numberis the number of stop bits

In SCI mode only, this function sets the number of stop bits transmitted. The number parameter can be one of the following values:

  • LIN_SCI_STOP_ONE - Set one stop bit
  • LIN_SCI_STOP_TWO - Set two stop bits

◆ LIN_enableSCISleepMode()

static void LIN_enableSCISleepMode ( uint32_t  base)
inlinestatic

Enable SCI Sleep mode.

Parameters
baseis the LIN module base address

In SCI mode only, this function enables the receive sleep mode functionality.

Note
The receiver still operates when the sleep mode is enabled, however, RXRDY is updated and SCIRD is loaded with new data only when an address frame is detected.

◆ LIN_disableSCISleepMode()

static void LIN_disableSCISleepMode ( uint32_t  base)
inlinestatic

Disable SCI Sleep mode.

Parameters
baseis the LIN module base address

In SCI mode only, this function disables the receive sleep mode functionality.

◆ LIN_enterSCILowPower()

static void LIN_enterSCILowPower ( uint32_t  base)
inlinestatic

Enter SCI Local Low-Power Mode.

Parameters
baseis the LIN module base address

In SCI mode only, this function enters the SCI local low-power mode.

Note
If this function is called while the receiver is actively receiving data and the wakeup interrupt is disabled, then the module will delay sleep mode from being entered until completion of reception.

◆ LIN_exitSCILowPower()

static void LIN_exitSCILowPower ( uint32_t  base)
inlinestatic

Exit SCI Local Low-Power Mode.

Parameters
baseis the LIN module base address

In SCI mode only, this function exits the SCI local low-power mode.

◆ LIN_setSCICharLength()

static void LIN_setSCICharLength ( uint32_t  base,
uint16_t  numBits 
)
inlinestatic

Set SCI character length.

Parameters
baseis the LIN module base address
numBitsis the number of bits per character.

In SCI mode only, this function sets the number of bits per character.

The numBits parameter must be in a range between 1 and 8.

◆ LIN_setSCIFrameLength()

static void LIN_setSCIFrameLength ( uint32_t  base,
uint16_t  length 
)
inlinestatic

Set SCI Frame Length.

Parameters
baseis the LIN module base address
lengthis the number of characters

In SCI mode only, this function sets the number of characters in the response field.

The numBits parameter must be in a range between 1 and 8.

◆ LIN_isSCIDataAvailable()

static Bool LIN_isSCIDataAvailable ( uint32_t  base)
inlinestatic

Check if new SCI data is ready to be read.

Parameters
baseis the LIN module base address

In SCI mode only, this function checks to see if the Rx ready bit is set indicating that a new data has been received.

Returns
Returns true if the Rx ready flag is set, else returns false.

◆ LIN_isSCISpaceAvailable()

static Bool LIN_isSCISpaceAvailable ( uint32_t  base)
inlinestatic

Check if Space is available in SCI Transmit Buffer.

Parameters
baseis the LIN module base address

In SCI mode only, this function checks to see if the Tx ready flag is set indicating that the Tx buffer(s) is/are ready to get another character.

Returns
Returns true if the TX ready flag is set, else returns false.

◆ LIN_readSCICharNonBlocking()

static uint16_t LIN_readSCICharNonBlocking ( uint32_t  base,
Bool  emulation 
)
inlinestatic

Reads a SCI character without Blocking.

Parameters
baseis the LIN module base address
emulationsets whether the data is being read by an emulator or not

In SCI mode only, this function gets the byte of data received. The emulation parameter can have one of the following values:

  • true - Emulator is being used, the RXRDY flag won't be cleared
  • false - Emulator isn't being used, the RXRDY flag will be cleared automatically on read
Note
  1. If the SCI receives data that is fewer than 8 bits in length, the data is left-justified and padded with trailing zeros.
  2. To determine if new data is available to read, use the function LIN_isSCIDataAvailable().
Returns
Returns the received data.

◆ LIN_readSCICharBlocking()

static uint16_t LIN_readSCICharBlocking ( uint32_t  base,
Bool  emulation 
)
inlinestatic

Reads a SCI character with Blocking.

Parameters
baseis the LIN module base address
emulationsets whether the data is being read by an emulator or not

In SCI mode only, this function gets the byte of data received. If new data isn't available, this function will wait until new data arrives. The emulation parameter can have one of the following values:

  • true - Emulator is being used, the RXRDY flag won't be cleared
  • false - Emulator isn't being used, the RXRDY flag will be cleared automatically on read
Note
If the SCI receives data that is fewer than 8 bits in length, the data is left-justified and padded with trailing zeros.
Returns
Returns the received data.

◆ LIN_writeSCICharNonBlocking()

static void LIN_writeSCICharNonBlocking ( uint32_t  base,
uint16_t  data 
)
inlinestatic

Sends a SCI character without Blocking.

Parameters
baseis the LIN module base address
datais the byte of data to be transmitted

In SCI mode only, this function sets the byte of data to be transmitted without blocking.

Note
The transmit ready flag gets set when this buffer is ready to be loaded with another byte of data. Use LIN_isSCISpaceAvailable() to determine if space is available to write another character.

◆ LIN_writeSCICharBlocking()

static void LIN_writeSCICharBlocking ( uint32_t  base,
uint16_t  data 
)
inlinestatic

Sends a SCI character with blocking.

Parameters
baseis the LIN module base address
datais the byte of data to be transmitted

In SCI mode only, this function sets the byte of data to be transmitted with blocking functionality. If the buffer isn't ready to get new data written to, this function will wait until space is available.

◆ LIN_enableSCIModuleErrors()

static void LIN_enableSCIModuleErrors ( uint32_t  base,
uint32_t  errors 
)
inlinestatic

Enable SCI Module Errors for Testing.

Parameters
baseis the LIN module base address
errorsis the specified errors to be enabled

In SCI mode only, this function enables the specified errors in the module for testing. The errors parameter can be a logical OR-ed result of the following values or LIN_SCI_ALL_ERRORS can be used to enable all of them:

  • LIN_SCI_FRAME_ERROR - Simulates a frame error
  • LIN_SCI_PARITY_ERROR - Simulates a parity error
  • LIN_SCI_BREAK_ERROR - Simulates a break detect error
Note
To disable these errors, use the LIN_disableSCIModuleErrors() function.

◆ LIN_disableSCIModuleErrors()

static void LIN_disableSCIModuleErrors ( uint32_t  base,
uint32_t  errors 
)
inlinestatic

Disable SCI Module Errors for Testing.

Parameters
baseis the LIN module base address
errorsis the specified errors to be disabled

In SCI mode only, this function disables the specified errors in the module for testing. The errors parameter can be a logical OR-ed result of the following values or LIN_SCI_ALL_ERRORS can be used to enable all of them:

  • LIN_SCI_FRAME_ERROR - Simulates a frame error
  • LIN_SCI_PARITY_ERROR - Simulates a parity error
  • LIN_SCI_BREAK_ERROR - Simulates a break detect error

◆ LIN_enableSCIInterrupt()

static void LIN_enableSCIInterrupt ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Enable SCI interrupts.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be enabled.

In SCI mode only, this function enables the interrupts for the specified interrupt sources.

The intFlags parameter can be set to the following value to set all the flag bits:

  • LIN_SCI_INT_ALL - All Interrupts

To set individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_SCI_INT_BREAK - Break Detect
  • LIN_SCI_INT_WAKEUP - Wakeup
  • LIN_SCI_INT_TX - Transmit Buffer
  • LIN_SCI_INT_RX - Receive Buffer
  • LIN_SCI_INT_TX_DMA - DMA Transmit
  • LIN_SCI_INT_RX_DMA - DMA Receive
  • LIN_SCI_INT_PARITY - Parity Error
  • LIN_SCI_INT_OVERRUN - Overrun Error
  • LIN_SCI_INT_FRAME - Framing Error

◆ LIN_disableSCIInterrupt()

static void LIN_disableSCIInterrupt ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Disable SCI interrupts.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be disabled.

In SCI mode only, this function disables the interrupts for the specified interrupt sources.

The intFlags parameter can be set to the following value to disable all the flag bits:

  • LIN_SCI_INT_ALL - All Interrupts

To disable individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_SCI_INT_BREAK - Break Detect
  • LIN_SCI_INT_WAKEUP - Wakeup
  • LIN_SCI_INT_TX - Transmit Buffer
  • LIN_SCI_INT_RX - Receive Buffer
  • LIN_SCI_INT_TX_DMA - DMA Transmit
  • LIN_SCI_INT_RX_DMA - DMA Receive
  • LIN_SCI_INT_PARITY - Parity Error
  • LIN_SCI_INT_OVERRUN - Overrun Error
  • LIN_SCI_INT_FRAME - Framing Error

◆ LIN_clearSCIInterruptStatus()

static void LIN_clearSCIInterruptStatus ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Clear SCI interrupt status.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of the interrupt sources to be cleared.

In SCI mode only, this function clears the specified status flags.

The intFlags parameter can be set to the following value to clear all the flag bits:

  • LIN_SCI_INT_ALL - All Interrupts

To clear individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_SCI_INT_BREAK - Break Detect
  • LIN_SCI_INT_WAKEUP - Wakeup
  • LIN_SCI_INT_TX - Transmit Buffer
  • LIN_SCI_INT_RX - Receive Buffer
  • LIN_SCI_INT_TX_DMA - DMA Transmit
  • LIN_SCI_INT_RX_DMA - DMA Receive
  • LIN_SCI_INT_PARITY - Parity Error
  • LIN_SCI_INT_OVERRUN - Overrun Error
  • LIN_SCI_INT_FRAME - Framing Error

◆ LIN_setSCIInterruptLevel0()

static void LIN_setSCIInterruptLevel0 ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Set interrupt level to 0.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of interrupt sources to be configured

In SCI mode only, this function sets the specified interrupt sources to level 0.

The intFlags parameter can be set to the following value to set all the flag bits:

  • LIN_SCI_INT_ALL - All Interrupts

To set individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_SCI_INT_BREAK - Break Detect
  • LIN_SCI_INT_WAKEUP - Wakeup
  • LIN_SCI_INT_TX - Transmit Buffer
  • LIN_SCI_INT_RX - Receive Buffer
  • LIN_SCI_INT_TX_DMA - DMA Transmit
  • LIN_SCI_INT_RX_DMA - DMA Receive
  • LIN_SCI_INT_PARITY - Parity Error
  • LIN_SCI_INT_OVERRUN - Overrun Error
  • LIN_SCI_INT_FRAME - Framing Error

◆ LIN_setSCIInterruptLevel1()

static void LIN_setSCIInterruptLevel1 ( uint32_t  base,
uint32_t  intFlags 
)
inlinestatic

Set interrupt level to 1.

Parameters
baseis the LIN module base address
intFlagsis the bit mask of interrupt sources to be configured

In SCI mode only, this function sets the specified interrupt sources to level 1.

The intFlags parameter can be set to the following value to set all the flag bits:

  • LIN_SCI_INT_ALL - All Interrupts

To set individual flags, the intFlags parameter can be the logical OR of any of the following:

  • LIN_SCI_INT_BREAK - Break Detect
  • LIN_SCI_INT_WAKEUP - Wakeup
  • LIN_SCI_INT_TX - Transmit Buffer
  • LIN_SCI_INT_RX - Receive Buffer
  • LIN_SCI_INT_TX_DMA - DMA Transmit
  • LIN_SCI_INT_RX_DMA - DMA Receive
  • LIN_SCI_INT_PARITY - Parity Error
  • LIN_SCI_INT_OVERRUN - Overrun Error
  • LIN_SCI_INT_FRAME - Framing Error

◆ LIN_isSCIReceiverIdle()

static Bool LIN_isSCIReceiverIdle ( uint32_t  base)
inlinestatic

Check if SCI Receiver is Idle.

Parameters
baseis the LIN module base address

In SCI mode only, this function checks if the receiver is in an idle state. level 1.

Returns
Returns true if the state is idle, else returns false.

◆ LIN_getSCITxFrameType()

static Bool LIN_getSCITxFrameType ( uint32_t  base)
inlinestatic

Gets the SCI Transmit Frame Type.

Parameters
baseis the LIN module base address

In SCI mode only, this function gets the transmit frame type which can be either data or an address.

Returns
Returns true if the frame will be an address, and returns false if the frame will be data.

◆ LIN_getSCIRxFrameType()

static Bool LIN_getSCIRxFrameType ( uint32_t  base)
inlinestatic

Gets the SCI Receiver Frame Type.

Parameters
baseis the LIN module base address

In SCI mode only, this function gets the receiver frame type which can be either an address or not an address.

Returns
Returns true if the frame is an address, and returns false if the frame isn't an address.

◆ LIN_isSCIBreakDetected()

static Bool LIN_isSCIBreakDetected ( uint32_t  base)
inlinestatic

Check if SCI Detected a Break Condition.

Parameters
baseis the LIN module base address

In SCI mode only, this function checks if the module detected a break condition on the Rx pin.

Returns
Returns true if break detected, else returns false.

◆ LIN_enableModule()

static void LIN_enableModule ( uint32_t  base)
inlinestatic

Enables the LIN module.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function sets the RESET bit of the SCIGCR0 register. Registers in this module are not writable until this has been done. Additionally, the transmit and receive pin control functionality is enabled.

◆ LIN_disableModule()

static void LIN_disableModule ( uint32_t  base)
inlinestatic

Disable the LIN module.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function clears the RESET bit of the SCIGCR0 register. Registers in this module are not writable when this bit is cleared. Additionally, the transmit and receive pin control functionality is disabled.

◆ LIN_setBaudRatePrescaler()

static void LIN_setBaudRatePrescaler ( uint32_t  base,
uint32_t  prescaler,
uint32_t  divider 
)
inlinestatic

Set Baud Rate Prescaler.

Parameters
baseis the LIN module base address
prescaleris the 24-bit integer prescaler
divideris the 4-bit fractional divider

In LIN and SCI mode, this function is used to set the baudrate based on the prescaler and divider values.

P = Prescaler
M = Fractional Divider
Bitrate = (SYSCLOCK) / ((P + 1 + M/16) * 16)

◆ LIN_enableDataTransmitter()

static void LIN_enableDataTransmitter ( uint32_t  base)
inlinestatic

Enable Transmit Data Transfer.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function enables the transfer of data from SCITD or TDy to the transmit shift register.

◆ LIN_disableDataTransmitter()

static void LIN_disableDataTransmitter ( uint32_t  base)
inlinestatic

Disable Transmit Data Transfer.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function disables the transfer of data from SCITD or TDy to the transmit shift register.

◆ LIN_enableDataReceiver()

static void LIN_enableDataReceiver ( uint32_t  base)
inlinestatic

Enable Receive Data Transfer.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function enables the receiver to transfer data from the shift buffer register to the receive buffer or multi-buffer.

◆ LIN_disableDataReceiver()

static void LIN_disableDataReceiver ( uint32_t  base)
inlinestatic

Disable Receive Data Transfer.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function disables the receiver to transfer data from the shift buffer register to the receive buffer or multi-buffer.

◆ LIN_performSoftwareReset()

static void LIN_performSoftwareReset ( uint32_t  base)
inlinestatic

Perform software reset.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function will reset the LIN state machine and clear all pending flags. It is required to call this function after a wakeup signal has been sent.

To enter the reset state separately, use LIN_enterSoftwareReset(). To come out of reset, use LIN_exitSoftwareReset().

◆ LIN_enterSoftwareReset()

static void LIN_enterSoftwareReset ( uint32_t  base)
inlinestatic

Put LIN into its reset state.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function will reset the LIN state machine and clear all pending flags. It is required to call this function after a wakeup signal has been sent. When in this state, changes to the configuration of this module may be made.

To take LIN out of the reset state and back into the ready state, use LIN_exitSoftwareReset().

◆ LIN_exitSoftwareReset()

static void LIN_exitSoftwareReset ( uint32_t  base)
inlinestatic

Put LIN into its ready state.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function will put LIN into its ready state. Transmission and reception can be done in this state. While in the ready state, configuration of the module should not be changed.

To put the module into its reset state, use LIN_enterSoftwareReset().

◆ LIN_isBusBusy()

static Bool LIN_isBusBusy ( uint32_t  base)
inlinestatic

Check if Bus is Busy.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function checks if the receiver bus is busy receiving a frame.

Returns
Returns true if the bus is busy, else returns false.

◆ LIN_isTxBufferEmpty()

static Bool LIN_isTxBufferEmpty ( uint32_t  base)
inlinestatic

Check if the Transmit Buffer is Empty.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function checks if the transmit buffer is empty or not.

Returns
Returns true if the Tx buffer is empty, else returns false.

◆ LIN_enableExtLoopback()

static void LIN_enableExtLoopback ( uint32_t  base,
LIN_LoopbackType  loopbackType,
LIN_AnalogLoopback  path 
)
inlinestatic

Enable External Loopback mode for self test.

Parameters
baseis the LIN module base address
loopbackTypeis the loopback type (analog or digital)
pathsets the transmit or receive pin to be included in the communication path (Analog loopback mode only)

In LIN and SCI mode, this function enables the external Loopback mode for self test. The loopbackType parameter can be one of the following values:

  • LIN_LOOPBACK_DIGITAL - Digital Loopback
  • LIN_LOOPBACK_ANALOG - Analog Loopback

The path parameter is only applicable in analog loopback mode and can be one of the following values:

  • LIN_ANALOG_LOOP_NONE - Default option for digital loopback mode
  • LIN_ANALOG_LOOP_TX - Enables analog loopback through the Tx pin
  • LIN_ANALOG_LOOP_RX - Enables analog loopback through the Rx pin

◆ LIN_disableExtLoopback()

static void LIN_disableExtLoopback ( uint32_t  base)
inlinestatic

Disable External Loopback mode for self test.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function disables the external Loopback mode.

Note
This function also resets the analog loopback communication path to the default transmit pin.

◆ LIN_enableIntLoopback()

static void LIN_enableIntLoopback ( uint32_t  base)
inlinestatic

Enable Internal Loopback mode for self test.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function enables the internal Loopback mode for self test.

◆ LIN_disableIntLoopback()

static void LIN_disableIntLoopback ( uint32_t  base)
inlinestatic

Disable Internal Loopback mode for self test.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function disables the internal Loopback mode for self test.

◆ LIN_getInterruptStatus()

static uint32_t LIN_getInterruptStatus ( uint32_t  base)
inlinestatic

Get Interrupt Flags Status.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function returns the interrupt status register. The following flags can be used to mask the value returned:

  • LIN_FLAG_BREAK - Break Detect Flag (SCI mode only)
  • LIN_FLAG_WAKEUP - Wake-up Flag
  • LIN_FLAG_IDLE - Receiver in Idle State (SCI mode only)
  • LIN_FLAG_BUSY - Busy Flag
  • LIN_FLAG_TO - Bus Idle Timeout Flag (LIN mode only)
  • LIN_FLAG_TOAWUS - Timeout after Wakeup Signal (LIN mode only)
  • LIN_FLAG_TOA3WUS - Timeout after 3 Wakeup Signals (LIN mode only)
  • LIN_FLAG_TXRDY - Transmitter Buffer Ready Flag
  • LIN_FLAG_RXRDY - Receiver Buffer Ready Flag
  • LIN_FLAG_TXWAKE - Transmitter Wakeup Method Select (SCI mode only)
  • LIN_FLAG_TXEMPTY - Transmitter Empty Flag
  • LIN_FLAG_RXWAKE - Receiver Wakeup Detect Flag
  • LIN_FLAG_TXID - Identifier on Transmit Flag (LIN mode only)
  • LIN_FLAG_RXID - Identifier on Receive Flag (LIN mode only)
  • LIN_FLAG_PE - Parity Error Flag
  • LIN_FLAG_OE - Overrun Error Flag
  • LIN_FLAG_FE - Framing Error Flag
  • LIN_FLAG_NRE - No-Response Error Flag (LIN mode only)
  • LIN_FLAG_ISFE - Inconsistent Synch Field Error Flag (LIN mode only)
  • LIN_FLAG_CE - Checksum Error Flag (LIN mode only)
  • LIN_FLAG_PBE - Physical Bus Error Flag (LIN mode only)
  • LIN_FLAG_BE - Bit Error Flag (LIN mode only)
Returns
Returns the status flag register.

◆ LIN_getInterruptLevel()

static uint32_t LIN_getInterruptLevel ( uint32_t  base)
inlinestatic

Get the Interrupt Level.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function gets the interrupt level status for all interrupt sources.

Returns
Returns the value of the interrupt level register.

◆ LIN_getInterruptLine0Offset()

static uint16_t LIN_getInterruptLine0Offset ( uint32_t  base)
inlinestatic

Gets the Interrupt Vector Offset for Line 0.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function gets the offset for interrupt line 0. A read to the specified line register updates its value to the next highest priority pending interrupt in the flag register and clears the flag corresponding to the offset that was read.

Note
The flags for the receive and the transmit interrupts cannot be cleared by reading the corresponding offset vector in this function.

The following are values that can be returned:

  • LIN_VECT_NONE - No Interrupt
  • LIN_VECT_WAKEUP - Wakeup
  • LIN_VECT_ISFE - Inconsistent-sync-field Error
  • LIN_VECT_PE - Parity Error
  • LIN_VECT_ID - ID Interrupt
  • LIN_VECT_PBE - Physical Bus Error
  • LIN_VECT_FE - Frame Error
  • LIN_VECT_BREAK - Break detect
  • LIN_VECT_CE - Checksum Error
  • LIN_VECT_OE - Overrun Error
  • LIN_VECT_BE - Bit Error
  • LIN_VECT_RX - Receive Interrupt
  • LIN_VECT_TX - Transmit Interrupt
  • LIN_VECT_NRE - No-response Error
  • LIN_VECT_TOAWUS - Timeout after wakeup signal
  • LIN_VECT_TOA3WUS - Timeout after 3 wakeup signals
  • LIN_VECT_TO - Timeout (Bus Idle)
Returns
Returns the value of the interrupt level register.

◆ LIN_getInterruptLine1Offset()

static uint16_t LIN_getInterruptLine1Offset ( uint32_t  base)
inlinestatic

Gets the Interrupt Vector Offset for Line 1.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function gets the offset for interrupt line 1. A read to the specified line register updates its value to the next highest priority pending interrupt in the flag register and clears the flag corresponding to the offset that was read.

Note
The flags for the receive and the transmit interrupts cannot be cleared by reading the corresponding offset vector in this function.

The following are values that can be returned:

  • LIN_VECT_NONE - No Interrupt
  • LIN_VECT_WAKEUP - Wakeup
  • LIN_VECT_ISFE - Inconsistent-sync-field Error
  • LIN_VECT_PE - Parity Error
  • LIN_VECT_ID - ID Interrupt
  • LIN_VECT_PBE - Physical Bus Error
  • LIN_VECT_FE - Frame Error
  • LIN_VECT_BREAK - Break detect
  • LIN_VECT_CE - Checksum Error
  • LIN_VECT_OE - Overrun Error
  • LIN_VECT_BE - Bit Error
  • LIN_VECT_RX - Receive Interrupt
  • LIN_VECT_TX - Transmit Interrupt
  • LIN_VECT_NRE - No-response Error
  • LIN_VECT_TOAWUS - Timeout after wakeup signal
  • LIN_VECT_TOA3WUS - Timeout after 3 wakeup signals
  • LIN_VECT_TO - Timeout (Bus Idle)
Returns
Returns the interrupt vector offset for interrupt line 1.

◆ LIN_enableMultibufferMode()

static void LIN_enableMultibufferMode ( uint32_t  base)
inlinestatic

Enable Multi-buffer Mode.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function enables the multi-buffer mode.

◆ LIN_disableMultibufferMode()

static void LIN_disableMultibufferMode ( uint32_t  base)
inlinestatic

Disable Multi-buffer Mode.

Parameters
baseis the LIN module base address

In LIN and SCI mode, this function disables the multi-buffer mode.

◆ LIN_setTransmitDelay()

static void LIN_setTransmitDelay ( uint32_t  base,
uint16_t  delay 
)
inlinestatic

Set Transmit Pin Delay.

Parameters
baseis the LIN module base address
delayis number of clock delays for the Tx pin (0 to 7)

In LIN and SCI mode, this function sets the delay by which the value on the transmit pin is delayed so that the value on the receive pin is asynchronous.

Note
This is not applicable to the Start bit.

◆ LIN_setPinSampleMask()

static void LIN_setPinSampleMask ( uint32_t  base,
LIN_PinSampleMask  mask 
)
inlinestatic

Set Pin Sample Mask.

Parameters
baseis the LIN module base address
maskis the pin sample mask to be set

In LIN and SCI mode, this function sets sample number at which the transmit pin value that is being transmitted will be inverted to verify the receive pin samples correctly with the majority detection circuitry. The mask parameter can be one of the following values:

  • LIN_PINMASK_NONE - No mask
  • LIN_PINMASK_CENTER - Invert Tx Pin value at T-bit center
  • LIN_PINMASK_CENTER_SCLK - Invert Tx Pin value at T-bit center + SCLK
  • LIN_PINMASK_CENTER_2SCLK - Invert Tx Pin value at T-bit center + 2 SCLK

◆ LIN_setDebugSuspendMode()

static void LIN_setDebugSuspendMode ( uint32_t  base,
LIN_DebugMode  mode 
)
inlinestatic

Set the Debug Suspended Mode.

Parameters
baseis the LIN module base address
modeis the debug mode

In LIN and SCI mode, this function sets how the module operates when the program is suspended and being debugged with an emulator. The mode parameter can be one of the following values:

  • LIN_DEBUG_FROZEN - The module state machine is frozen; transmissions and LIN counters are halted until debug mode is exited.
  • LIN_DEBUG_COMPLETE - The module continues to operate until the current transmit and receive functions are complete.

◆ LIN_enableGlobalInterrupt()

static void LIN_enableGlobalInterrupt ( uint32_t  base,
LIN_InterruptLine  line 
)
inlinestatic

Enables a LIN global interrupt.

Parameters
baseis the LIN module base address
lineis specified interrupt vector line

In LIN and SCI mode, this function globally enables an interrupt corresponding to a specified interrupt line. The line parameter can be one of the following enumerated values:

  • LIN_INTERRUPT_LINE0 - Interrupt Vector Line 0
  • LIN_INTERRUPT_LINE1 - Interrupt Vector Line 1

◆ LIN_disableGlobalInterrupt()

static void LIN_disableGlobalInterrupt ( uint32_t  base,
LIN_InterruptLine  line 
)
inlinestatic

Disables a LIN global interrupt.

Parameters
baseis the LIN module base address
lineis specified interrupt vector line

In LIN and SCI mode, this function globally disables an interrupt corresponding to a specified interrupt line. The line parameter can be one of the following enumerated values:

  • LIN_INTERRUPT_LINE0 - Interrupt Vector Line 0
  • LIN_INTERRUPT_LINE1 - Interrupt Vector Line 1

◆ LIN_clearGlobalInterruptStatus()

static void LIN_clearGlobalInterruptStatus ( uint32_t  base,
LIN_InterruptLine  line 
)
inlinestatic

Clears a LIN global interrupt flag.

Parameters
baseis the LIN module base address
lineis specified interrupt vector line

In LIN and SCI mode, this function clears the global interrupt flag that corresponds to a specified interrupt line. The line parameter can be one of the following enumerated values:

  • LIN_INTERRUPT_LINE0 - Interrupt Vector Line 0
  • LIN_INTERRUPT_LINE1 - Interrupt Vector Line 1

◆ LIN_getGlobalInterruptStatus()

static Bool LIN_getGlobalInterruptStatus ( uint32_t  base,
LIN_InterruptLine  line 
)
inlinestatic

Returns a LIN global interrupt flag status.

Parameters
baseis the LIN module base address
lineis specified interrupt vector line

In LIN and SCI mode, this function returns the status of a global interrupt flag that corresponds to a specified interrupt line. The line parameter can be one of the following enumerated values:

  • LIN_INTERRUPT_LINE0 - Interrupt Vector Line 0
  • LIN_INTERRUPT_LINE1 - Interrupt Vector Line 1
Returns
Returns true if the interrupt flag is set. Return false if not.

◆ LIN_getPinStatus()

static Bool LIN_getPinStatus ( uint32_t  base,
LIN_PinType  pin 
)
inlinestatic

Get the Status of LIN TX/RX Pin status.

Parameters
baseis the LIN module base address
pinis the type of pin that is being read.

In LIN and SCI mode, this function indicates the current status of LINTX and LINRX pins. the pin parameter can be either LIN_PINTYPE_TX or LIN_PINTYPE_RX.

Returns
Returns true if the pin is high else false if low.