S32 SDK
lin_lpuart_driver.h File Reference
#include "lpuart_hw_access.h"
#include "clock_manager.h"
#include "lin_driver.h"

Go to the source code of this file.

Macros

#define AUTOBAUD_BAUDRATE_TOLERANCE   (uint32_t)2U
 
#define BIT_RATE_TOLERANCE_UNSYNC   (uint32_t)14U
 
#define BIT_DURATION_MAX_19200   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 192U)
 
#define BIT_DURATION_MIN_19200   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 192U)
 
#define BIT_DURATION_MAX_14400   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 144U)
 
#define BIT_DURATION_MIN_14400   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 144U)
 
#define BIT_DURATION_MAX_9600   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 96U)
 
#define BIT_DURATION_MIN_9600   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 96U)
 
#define BIT_DURATION_MAX_4800   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 48U)
 
#define BIT_DURATION_MIN_4800   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 48U)
 
#define BIT_DURATION_MAX_2400   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 24U)
 
#define BIT_DURATION_MIN_2400   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 24U)
 
#define TWO_BIT_DURATION_MAX_19200   (2U * BIT_DURATION_MAX_19200)
 
#define TWO_BIT_DURATION_MIN_19200   (2U * BIT_DURATION_MIN_19200)
 
#define TWO_BIT_DURATION_MAX_14400   (2U * BIT_DURATION_MAX_14400)
 
#define TWO_BIT_DURATION_MIN_14400   (2U * BIT_DURATION_MIN_14400)
 
#define TWO_BIT_DURATION_MAX_9600   (2U * BIT_DURATION_MAX_9600)
 
#define TWO_BIT_DURATION_MIN_9600   (2U * BIT_DURATION_MIN_9600)
 
#define TWO_BIT_DURATION_MAX_4800   (2U * BIT_DURATION_MAX_4800)
 
#define TWO_BIT_DURATION_MIN_4800   (2U * BIT_DURATION_MIN_4800)
 
#define TWO_BIT_DURATION_MAX_2400   (2U * BIT_DURATION_MAX_2400)
 
#define TWO_BIT_DURATION_MIN_2400   (2U * BIT_DURATION_MIN_2400)
 
#define AUTOBAUD_BREAK_TIME_MIN   (13U * BIT_DURATION_MIN_19200)
 

Functions

status_t LIN_LPUART_DRV_Init (uint32_t instance, lin_user_config_t *linUserConfig, lin_state_t *linCurrentState)
 Initializes an LIN_LPUART instance for LIN Network. More...
 
status_t LIN_LPUART_DRV_Deinit (uint32_t instance)
 Shuts down the LIN_LPUART by disabling interrupts and transmitter/receiver. More...
 
lin_callback_t LIN_LPUART_DRV_InstallCallback (uint32_t instance, lin_callback_t function)
 Installs callback function that is used for LIN_LPUART_DRV_IRQHandler. More...
 
status_t LIN_LPUART_DRV_SendFrameDataBlocking (uint32_t instance, const uint8_t *txBuff, uint8_t txSize, uint32_t timeoutMSec)
 Sends Frame data out through the LIN_LPUART module using blocking method. This function will calculate the checksum byte and send it with the frame data. Blocking means that the function does not return until the transmission is complete. This function checks if txSize is in range from 1 to 8. If not, it will return STATUS_ERROR. This function also returns STATUS_ERROR if node's current state is in SLEEP mode. This function checks if the isBusBusy is false, if not it will return STATUS_BUSY. The function does not return until the transmission is complete. If the transmission is successful, it will return STATUS_SUCCESS. If not, it will return STATUS_TIMEOUT. More...
 
status_t LIN_LPUART_DRV_SendFrameData (uint32_t instance, const uint8_t *txBuff, uint8_t txSize)
 Sends frame data out through the LIN_LPUART module using non-blocking method. This enables an a-sync method for transmitting data. Non-blocking means that the function returns immediately. The application has to get the transmit status to know when the transmit is complete. This function will calculate the checksum byte and send it with the frame data. If txSize is equal to 0 or greater than 8 or node's current state is in SLEEP mode then the function will return STATUS_ERROR. If isBusBusy is currently true then the function will return STATUS_BUSY. More...
 
status_t LIN_LPUART_DRV_GetTransmitStatus (uint32_t instance, uint8_t *bytesRemaining)
 Get status of an on-going non-blocking transmission While sending frame data using non-blocking method, users can use this function to get status of that transmission. This function return STATUS_BUSY while sending, or STATUS_TIMEOUT if timeout has occurred, or return STATUS_SUCCESS when the transmission is complete. The bytesRemaining shows number of bytes that still needed to transmit. More...
 
status_t LIN_LPUART_DRV_RecvFrmDataBlocking (uint32_t instance, uint8_t *rxBuff, uint8_t rxSize, uint32_t timeoutMSec)
 Receives frame data through the LIN_LPUART module using blocking method. The function does not return until the receive is complete. The interrupt handler LIN_LPUART_DRV_IRQHandler will check the checksum byte. If the checksum is correct, it will receive the frame data. If the checksum is incorrect, this function will return STATUS_TIMEOUT and data in rxBuff might be wrong. This function also check if rxSize is in range from 1 to 8. If not, it will return STATUS_ERROR. This function also returns STATUS_ERROR if node's current state is in SLEEP mode. This function checks if the isBusBusy is false, if not it will return STATUS_BUSY. More...
 
status_t LIN_LPUART_DRV_RecvFrmData (uint32_t instance, uint8_t *rxBuff, uint8_t rxSize)
 Receives frame data through the LIN_LPUART module using non-blocking method. This function returns immediately after initiating the receive function. The application has to get the receive status to see when the receive is complete. The interrupt handler LIN_LPUART_DRV_IRQHandler will check the checksum byte. If the checksum is correct, it will receive the frame data. If the checksum is incorrect, this function will return STATUS_TIMEOUT and data in rxBuff might be wrong. This function also check if rxSize is in range from 1 to 8. If not, it will return STATUS_ERROR. This function also returns STATUS_ERROR if node's current state is in SLEEP mode. This function checks if the isBusBusy is false, if not it will return STATUS_BUSY. More...
 
status_t LIN_LPUART_DRV_AbortTransferData (uint32_t instance)
 Aborts an on-going non-blocking transmission/reception. While performing a non-blocking transferring data, users can call this function to terminate immediately the transferring. More...
 
status_t LIN_LPUART_DRV_GetReceiveStatus (uint32_t instance, uint8_t *bytesRemaining)
 Get status of an on-going non-blocking reception While receiving frame data using non-blocking method, users can use this function to get status of that receiving. This function return the current event ID, STATUS_BUSY while receiving and return STATUS_SUCCESS, or timeout (STATUS_TIMEOUT) when the reception is complete. The bytesRemaining shows number of bytes that still needed to receive. More...
 
status_t LIN_LPUART_DRV_GoToSleepMode (uint32_t instance)
 This function puts current node to sleep mode This function changes current node state to LIN_NODE_STATE_SLEEP_MODE. More...
 
status_t LIN_LPUART_DRV_GotoIdleState (uint32_t instance)
 Puts current LIN node to Idle state This function changes current node state to LIN_NODE_STATE_IDLE. More...
 
status_t LIN_LPUART_DRV_SendWakeupSignal (uint32_t instance)
 Sends a wakeup signal through the LIN_LPUART interface. More...
 
lin_node_state_t LIN_LPUART_DRV_GetCurrentNodeState (uint32_t instance)
 Get the current LIN node state. More...
 
void LIN_LPUART_DRV_TimeoutService (uint32_t instance)
 Callback function for Timer Interrupt Handler Users shall initialize a timer (for example FTM) in Output compare mode with period of 500 micro seconds. In timer IRQ handler, call this function. More...
 
void LIN_LPUART_DRV_SetTimeoutCounter (uint32_t instance, uint32_t timeoutValue)
 Set Value for Timeout Counter that is used in LIN_LPUART_DRV_TimeoutService. More...
 
status_t LIN_LPUART_DRV_MasterSendHeader (uint32_t instance, uint8_t id)
 Sends frame header out through the LIN_LPUART module using a non-blocking method. This function sends LIN Break field, sync field then the ID with correct parity. This function checks if the interface is Master, if not, it will return STATUS_ERROR.This function checks if id is in range from 0 to 0x3F, if not it will return STATUS_ERROR. More...
 
status_t LIN_LPUART_DRV_EnableIRQ (uint32_t instance)
 Enables LIN_LPUART hardware interrupts. More...
 
status_t LIN_LPUART_DRV_DisableIRQ (uint32_t instance)
 Disables LIN_LPUART hardware interrupts. More...
 
void LIN_LPUART_DRV_IRQHandler (uint32_t instance)
 LIN_LPUART interrupt handler for RX_TX and Error interrupts. More...
 
status_t LIN_LPUART_DRV_AutoBaudCapture (uint32_t instance)
 LIN_LPUART capture time interval to set baudrate automatically when enable autobaud feature. This function should only be used in Slave. The timer should be in input capture mode of both rising and falling edges. The timer input capture pin should be externally connected to RXD pin. More...
 

Variables

LPUART_Type *const g_linLpuartBase [LPUART_INSTANCE_COUNT]
 Table of base addresses for LPUART instances. More...
 
const IRQn_Type g_linLpuartRxTxIrqId [LPUART_INSTANCE_COUNT]
 Table to save LPUART IRQ enumeration numbers defined in the device header file. More...
 
lin_state_tg_linStatePtr [LPUART_INSTANCE_COUNT]
 Table to save LPUART state structure pointers. More...
 
lin_user_config_tg_linUserconfigPtr [LPUART_INSTANCE_COUNT]
 Table to save LIN user config structure pointers. More...
 

Macro Definition Documentation

#define AUTOBAUD_BAUDRATE_TOLERANCE   (uint32_t)2U

Definition at line 54 of file lin_lpuart_driver.h.

#define AUTOBAUD_BREAK_TIME_MIN   (13U * BIT_DURATION_MIN_19200)

Definition at line 89 of file lin_lpuart_driver.h.

#define BIT_DURATION_MAX_14400   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 144U)

Definition at line 60 of file lin_lpuart_driver.h.

#define BIT_DURATION_MAX_19200   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 192U)

Definition at line 57 of file lin_lpuart_driver.h.

#define BIT_DURATION_MAX_2400   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 24U)

Definition at line 69 of file lin_lpuart_driver.h.

#define BIT_DURATION_MAX_4800   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 48U)

Definition at line 66 of file lin_lpuart_driver.h.

#define BIT_DURATION_MAX_9600   (uint32_t)(100000U * (100U + AUTOBAUD_BAUDRATE_TOLERANCE) / 96U)

Definition at line 63 of file lin_lpuart_driver.h.

#define BIT_DURATION_MIN_14400   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 144U)

Definition at line 61 of file lin_lpuart_driver.h.

#define BIT_DURATION_MIN_19200   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 192U)

Definition at line 58 of file lin_lpuart_driver.h.

#define BIT_DURATION_MIN_2400   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 24U)

Definition at line 70 of file lin_lpuart_driver.h.

#define BIT_DURATION_MIN_4800   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 48U)

Definition at line 67 of file lin_lpuart_driver.h.

#define BIT_DURATION_MIN_9600   (uint32_t)(100000U * (100U - AUTOBAUD_BAUDRATE_TOLERANCE) / 96U)

Definition at line 64 of file lin_lpuart_driver.h.

#define BIT_RATE_TOLERANCE_UNSYNC   (uint32_t)14U

Definition at line 55 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MAX_14400   (2U * BIT_DURATION_MAX_14400)

Definition at line 76 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MAX_19200   (2U * BIT_DURATION_MAX_19200)

Definition at line 73 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MAX_2400   (2U * BIT_DURATION_MAX_2400)

Definition at line 85 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MAX_4800   (2U * BIT_DURATION_MAX_4800)

Definition at line 82 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MAX_9600   (2U * BIT_DURATION_MAX_9600)

Definition at line 79 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MIN_14400   (2U * BIT_DURATION_MIN_14400)

Definition at line 77 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MIN_19200   (2U * BIT_DURATION_MIN_19200)

Definition at line 74 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MIN_2400   (2U * BIT_DURATION_MIN_2400)

Definition at line 86 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MIN_4800   (2U * BIT_DURATION_MIN_4800)

Definition at line 83 of file lin_lpuart_driver.h.

#define TWO_BIT_DURATION_MIN_9600   (2U * BIT_DURATION_MIN_9600)

Definition at line 80 of file lin_lpuart_driver.h.

Function Documentation

status_t LIN_LPUART_DRV_AbortTransferData ( uint32_t  instance)

Aborts an on-going non-blocking transmission/reception. While performing a non-blocking transferring data, users can call this function to terminate immediately the transferring.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 751 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_AutoBaudCapture ( uint32_t  instance)

LIN_LPUART capture time interval to set baudrate automatically when enable autobaud feature. This function should only be used in Slave. The timer should be in input capture mode of both rising and falling edges. The timer input capture pin should be externally connected to RXD pin.

Parameters
instanceLIN_LPUART instance number
Returns
operation status
  • STATUS_SUCCESS: Operation was successful.
  • STATUS_BUSY: Operation is running.
  • STATUS_ERROR: Operation failed due to break char incorrect, wakeup signal incorrect or calculate baudrate failed.

Definition at line 2058 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_Deinit ( uint32_t  instance)

Shuts down the LIN_LPUART by disabling interrupts and transmitter/receiver.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 302 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_DisableIRQ ( uint32_t  instance)

Disables LIN_LPUART hardware interrupts.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 1147 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_EnableIRQ ( uint32_t  instance)

Enables LIN_LPUART hardware interrupts.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 1101 of file lin_lpuart_driver.c.

lin_node_state_t LIN_LPUART_DRV_GetCurrentNodeState ( uint32_t  instance)

Get the current LIN node state.

Parameters
instanceLIN_LPUART instance number
Returns
current LIN node state

Definition at line 892 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_GetReceiveStatus ( uint32_t  instance,
uint8_t *  bytesRemaining 
)

Get status of an on-going non-blocking reception While receiving frame data using non-blocking method, users can use this function to get status of that receiving. This function return the current event ID, STATUS_BUSY while receiving and return STATUS_SUCCESS, or timeout (STATUS_TIMEOUT) when the reception is complete. The bytesRemaining shows number of bytes that still needed to receive.

Parameters
instanceLIN_LPUART instance number
bytesRemainingNumber of bytes still needed to receive
Returns
status_t STATUS_BUSY, STATUS_TIMEOUT or STATUS_SUCCESS

Definition at line 783 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_GetTransmitStatus ( uint32_t  instance,
uint8_t *  bytesRemaining 
)

Get status of an on-going non-blocking transmission While sending frame data using non-blocking method, users can use this function to get status of that transmission. This function return STATUS_BUSY while sending, or STATUS_TIMEOUT if timeout has occurred, or return STATUS_SUCCESS when the transmission is complete. The bytesRemaining shows number of bytes that still needed to transmit.

Parameters
instanceLIN_LPUART instance number
bytesRemainingNumber of bytes still needed to transmit
Returns
status_t STATUS_BUSY, STATUS_SUCCESS or STATUS_TIMEOUT

Definition at line 551 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_GotoIdleState ( uint32_t  instance)

Puts current LIN node to Idle state This function changes current node state to LIN_NODE_STATE_IDLE.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 1193 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_GoToSleepMode ( uint32_t  instance)

This function puts current node to sleep mode This function changes current node state to LIN_NODE_STATE_SLEEP_MODE.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 821 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_Init ( uint32_t  instance,
lin_user_config_t linUserConfig,
lin_state_t linCurrentState 
)

Initializes an LIN_LPUART instance for LIN Network.

The caller provides memory for the driver state structures during initialization. The user must select the LIN_LPUART clock source in the application to initialize the LIN_LPUART. This function initializes a LPUART instance for operation. This function will initialize the run-time state structure to keep track of the on-going transfers, initialize the module to user defined settings and default settings, set break field length to be 13 bit times minimum, enable the break detect interrupt, Rx complete interrupt, frame error detect interrupt, and enable the LPUART module transmitter and receiver

Parameters
instanceLIN_LPUART instance number
linUserConfiguser configuration structure of type lin_user_config_t
linCurrentStatepointer to the LIN_LPUART driver state structure
Returns
An error code or status_t

Definition at line 134 of file lin_lpuart_driver.c.

lin_callback_t LIN_LPUART_DRV_InstallCallback ( uint32_t  instance,
lin_callback_t  function 
)

Installs callback function that is used for LIN_LPUART_DRV_IRQHandler.

Note
After a callback is installed, it bypasses part of the LIN_LPUART IRQHandler logic. Therefore, the callback needs to handle the indexes of txBuff and txSize.
Parameters
instanceThe LIN_LPUART instance number.
functionThe LIN_LPUART receive callback function.
Returns
Former LIN callback function pointer.

Definition at line 364 of file lin_lpuart_driver.c.

void LIN_LPUART_DRV_IRQHandler ( uint32_t  instance)

LIN_LPUART interrupt handler for RX_TX and Error interrupts.

Parameters
instanceLIN_LPUART instance number
Returns
void

Definition at line 1271 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_MasterSendHeader ( uint32_t  instance,
uint8_t  id 
)

Sends frame header out through the LIN_LPUART module using a non-blocking method. This function sends LIN Break field, sync field then the ID with correct parity. This function checks if the interface is Master, if not, it will return STATUS_ERROR.This function checks if id is in range from 0 to 0x3F, if not it will return STATUS_ERROR.

Parameters
instanceLIN_LPUART instance number
idFrame Identifier
Returns
An error code or status_t

Definition at line 1037 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_RecvFrmData ( uint32_t  instance,
uint8_t *  rxBuff,
uint8_t  rxSize 
)

Receives frame data through the LIN_LPUART module using non-blocking method. This function returns immediately after initiating the receive function. The application has to get the receive status to see when the receive is complete. The interrupt handler LIN_LPUART_DRV_IRQHandler will check the checksum byte. If the checksum is correct, it will receive the frame data. If the checksum is incorrect, this function will return STATUS_TIMEOUT and data in rxBuff might be wrong. This function also check if rxSize is in range from 1 to 8. If not, it will return STATUS_ERROR. This function also returns STATUS_ERROR if node's current state is in SLEEP mode. This function checks if the isBusBusy is false, if not it will return STATUS_BUSY.

Parameters
instanceLIN_LPUART instance number
rxBuffbuffer containing 8-bit received data
rxSizethe number of bytes to receive
Returns
An error code or status_t

Definition at line 687 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_RecvFrmDataBlocking ( uint32_t  instance,
uint8_t *  rxBuff,
uint8_t  rxSize,
uint32_t  timeoutMSec 
)

Receives frame data through the LIN_LPUART module using blocking method. The function does not return until the receive is complete. The interrupt handler LIN_LPUART_DRV_IRQHandler will check the checksum byte. If the checksum is correct, it will receive the frame data. If the checksum is incorrect, this function will return STATUS_TIMEOUT and data in rxBuff might be wrong. This function also check if rxSize is in range from 1 to 8. If not, it will return STATUS_ERROR. This function also returns STATUS_ERROR if node's current state is in SLEEP mode. This function checks if the isBusBusy is false, if not it will return STATUS_BUSY.

Parameters
instanceLIN_LPUART instance number
rxBuffbuffer containing 8-bit received data
rxSizethe number of bytes to receive
timeoutMSectimeout value in milliseconds
Returns
An error code or status_t

Definition at line 596 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_SendFrameData ( uint32_t  instance,
const uint8_t *  txBuff,
uint8_t  txSize 
)

Sends frame data out through the LIN_LPUART module using non-blocking method. This enables an a-sync method for transmitting data. Non-blocking means that the function returns immediately. The application has to get the transmit status to know when the transmit is complete. This function will calculate the checksum byte and send it with the frame data. If txSize is equal to 0 or greater than 8 or node's current state is in SLEEP mode then the function will return STATUS_ERROR. If isBusBusy is currently true then the function will return STATUS_BUSY.

Parameters
instanceLIN_LPUART instance number
txBuffsource buffer containing 8-bit data chars to send
txSizethe number of bytes to send
Returns
An error code or status_t

Definition at line 480 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_SendFrameDataBlocking ( uint32_t  instance,
const uint8_t *  txBuff,
uint8_t  txSize,
uint32_t  timeoutMSec 
)

Sends Frame data out through the LIN_LPUART module using blocking method. This function will calculate the checksum byte and send it with the frame data. Blocking means that the function does not return until the transmission is complete. This function checks if txSize is in range from 1 to 8. If not, it will return STATUS_ERROR. This function also returns STATUS_ERROR if node's current state is in SLEEP mode. This function checks if the isBusBusy is false, if not it will return STATUS_BUSY. The function does not return until the transmission is complete. If the transmission is successful, it will return STATUS_SUCCESS. If not, it will return STATUS_TIMEOUT.

Parameters
instanceLIN_LPUART instance number
txBuffsource buffer containing 8-bit data chars to send
txSizethe number of bytes to send
timeoutMSectimeout value in milliseconds
Returns
An error code or status_t

Definition at line 395 of file lin_lpuart_driver.c.

status_t LIN_LPUART_DRV_SendWakeupSignal ( uint32_t  instance)

Sends a wakeup signal through the LIN_LPUART interface.

Parameters
instanceLIN_LPUART instance number
Returns
An error code or status_t

Definition at line 860 of file lin_lpuart_driver.c.

void LIN_LPUART_DRV_SetTimeoutCounter ( uint32_t  instance,
uint32_t  timeoutValue 
)

Set Value for Timeout Counter that is used in LIN_LPUART_DRV_TimeoutService.

Parameters
instanceLPUART instance number
timeoutValueTimeout Value to be set
Returns
void

Definition at line 1007 of file lin_lpuart_driver.c.

void LIN_LPUART_DRV_TimeoutService ( uint32_t  instance)

Callback function for Timer Interrupt Handler Users shall initialize a timer (for example FTM) in Output compare mode with period of 500 micro seconds. In timer IRQ handler, call this function.

Parameters
instanceLIN_LPUART instance number
Returns
void

Definition at line 919 of file lin_lpuart_driver.c.

Variable Documentation

LPUART_Type* const g_linLpuartBase[LPUART_INSTANCE_COUNT]

Table of base addresses for LPUART instances.

Definition at line 58 of file lin_lpuart_driver.c.

const IRQn_Type g_linLpuartRxTxIrqId[LPUART_INSTANCE_COUNT]

Table to save LPUART IRQ enumeration numbers defined in the device header file.

Definition at line 61 of file lin_lpuart_driver.c.

Table to save LPUART state structure pointers.

Definition at line 69 of file lin_lpuart_driver.c.

Table to save LIN user config structure pointers.

Definition at line 72 of file lin_lpuart_driver.c.