MSPM0G1X0X_G3X0X Driver Library  1.10.01.05
Data Structures | Macros | Enumerations | Functions
dl_mcan.h File Reference

Detailed Description

Modular Controller Area Network (MCAN) Driver Library.


#include <stdbool.h>
#include <stdint.h>
#include <ti/devices/msp/msp.h>
#include <ti/driverlib/dl_common.h>
Include dependency graph for dl_mcan.h:

Go to the source code of this file.

Data Structures

struct  DL_MCAN_ClockConfig
 Structure for CANCLK configuration. More...
 
struct  DL_MCAN_BitTimingParams
 Structure for bit timing calculation. Bit timing related to data phase will be valid only in case where MCAN is put in CAN-FD mode and will be '0' otherwise. More...
 
struct  DL_MCAN_TDCConfig
 Structure for MCAN Transmitter Delay Compensation parameters. More...
 
struct  DL_MCAN_GlobalFiltConfig
 Structure for MCAN Global Filter Configuration parameters. More...
 
struct  DL_MCAN_InitParams
 Structure for MCAN initialization parameters. More...
 
struct  DL_MCAN_ConfigParams
 Structure for MCAN configuration parameters. More...
 
struct  DL_MCAN_ErrCntStatus
 Structure for MCAN error logging counters status. More...
 
struct  DL_MCAN_ProtocolStatus
 Structure for MCAN protocol status. More...
 
struct  DL_MCAN_MsgRAMConfigParams
 Structure for MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: Standard ID filters, Extended ID filters, TX FIFO(or TX Q), TX Buffers, TX EventFIFO, RX FIFO0, RX FIFO1, RX Buffer. Note: If particular section in the RAM is not used then it's size should be initialized to '0' (Number of buffers in case of Tx/Rx buffer). More...
 
struct  DL_MCAN_HighPriorityMsgInfo
 Structure for MCAN High Priority Message. More...
 
struct  DL_MCAN_RxNewDataStatus
 Structure for MCAN new data flag for Rx buffer. More...
 
struct  DL_MCAN_RxFIFOStatus
 Structure for MCAN Rx FIFO Status. More...
 
struct  DL_MCAN_TxFIFOStatus
 Structure for MCAN Tx FIFO Status. More...
 
struct  DL_MCAN_TxEventFIFOStatus
 Structure for MCAN Tx Event FIFO Status. More...
 
struct  DL_MCAN_ECCErrForceParams
 Structure for ECC Error forcing. More...
 
struct  DL_MCAN_ECCErrStatus
 Structure for ECC Error Status. More...
 
struct  DL_MCAN_RevisionId
 Structure for accessing Revision ID and Core Release Info. of MCAN module. More...
 
struct  DL_MCAN_ECCAggrRevisionId
 Structure for accessing Revision ID of ECC AGGR. More...
 
struct  DL_MCAN_ECCConfigParams
 Structure for MCAN ECC configuration parameters. More...
 
struct  DL_MCAN_ECCWrapRevisionId
 Structure for accessing Revision ID of ECC wrapper. More...
 
struct  DL_MCAN_TxBufElement
 Structure for MCAN Tx Buffer element. More...
 
struct  DL_MCAN_RxBufElement
 Structure for MCAN Rx Buffer element. More...
 
struct  DL_MCAN_TxEventFIFOElement
 Structure for MCAN Tx Event FIFO element. More...
 
struct  DL_MCAN_StdMsgIDFilterElement
 Structure for MCAN Standard Message ID Filter Element. More...
 
struct  DL_MCAN_ExtMsgIDFilterElement
 Structure for MCAN Extended Message ID Filter Element. More...
 
struct  DL_MCAN_backupConfig
 Configuration structure to backup MCAN peripheral state before entering STOP or STANDBY mode. Not required after PG 1.0 silicon. Used by DL_MCAN_saveConfiguration and DL_MCAN_restoreConfiguration. More...
 

Macros

#define DL_MCAN_INTR_MASK_ALL
 Macro defines mask for all the interrupts status for MCAN. More...
 
#define DL_MCAN_MAX_PAYLOAD_BYTES   (64U)
 Maximum payload supported by CAn-FD protocol in bytes.
 
#define DL_MCAN_INTERRUPT_ARA   (MCAN_IR_ARA_MASK)
 Access to Reserved Address interrupt.
 
#define DL_MCAN_INTERRUPT_PED   (MCAN_IR_PED_MASK)
 Protocol Error in Data Phase interrupt.
 
#define DL_MCAN_INTERRUPT_PEA   (MCAN_IR_PEA_MASK)
 Protocol Error in Arbitration Phase interrupt.
 
#define DL_MCAN_INTERRUPT_WDI   (MCAN_IR_WDI_MASK)
 Watchdog interrupt.
 
#define DL_MCAN_INTERRUPT_BO   (MCAN_IR_BO_MASK)
 Bus_Off Status interrupt.
 
#define DL_MCAN_INTERRUPT_EW   (MCAN_IR_EW_MASK)
 Warning Status interrupt.
 
#define DL_MCAN_INTERRUPT_EP   (MCAN_IR_EP_MASK)
 Error Passive interrupt.
 
#define DL_MCAN_INTERRUPT_ELO   (MCAN_IR_ELO_MASK)
 Error Logging Overflow interrupt.
 
#define DL_MCAN_INTERRUPT_BEU   (MCAN_IR_BEU_MASK)
 Bit Error Uncorrected. Message RAM bit error detected, uncorrected interrupt.
 
#define DL_MCAN_INTERRUPT_DRX   (MCAN_IR_DRX_MASK)
 Message Stored to Dedicated Rx Buffer interrupt.
 
#define DL_MCAN_INTERRUPT_TOO   (MCAN_IR_TOO_MASK)
 Timeout Occurred interrupt.
 
#define DL_MCAN_INTERRUPT_MRAF   (MCAN_IR_MRAF_MASK)
 Message RAM Access Failure interrupt.
 
#define DL_MCAN_INTERRUPT_TSW   (MCAN_IR_TSW_MASK)
 Timestamp Wraparound interrupt.
 
#define DL_MCAN_INTERRUPT_TEFL   (MCAN_IR_TEFL_MASK)
 Tx Event FIFO Element Lost interrupt.
 
#define DL_MCAN_INTERRUPT_TEFF   (MCAN_IR_TEFF_MASK)
 Tx Event FIFO Full interrupt.
 
#define DL_MCAN_INTERRUPT_TEFW   (MCAN_IR_TEFW_MASK)
 Tx Event FIFO Watermark Reached interrupt.
 
#define DL_MCAN_INTERRUPT_TEFN   (MCAN_IR_TEFN_MASK)
 Tx Event FIFO New Entry interrupt.
 
#define DL_MCAN_INTERRUPT_TFE   (MCAN_IR_TFE_MASK)
 Tx FIFO Empty interrupt.
 
#define DL_MCAN_INTERRUPT_TCF   (MCAN_IR_TCF_MASK)
 Transmission Cancellation Finished interrupt.
 
#define DL_MCAN_INTERRUPT_TC   (MCAN_IR_TC_MASK)
 Transmission Completed interrupt.
 
#define DL_MCAN_INTERRUPT_HPM   (MCAN_IR_HPM_MASK)
 High Priority Message interrupt.
 
#define DL_MCAN_INTERRUPT_RF1L   (MCAN_IR_RF1L_MASK)
 Rx FIFO 1 Message Lost interrupt.
 
#define DL_MCAN_INTERRUPT_RF1F   (MCAN_IR_RF1F_MASK)
 Rx FIFO 1 Full interrupt.
 
#define DL_MCAN_INTERRUPT_RF1W   (MCAN_IR_RF1W_MASK)
 Rx FIFO 1 Watermark Reached interrupt.
 
#define DL_MCAN_INTERRUPT_RF1N   (MCAN_IR_RF1N_MASK)
 Rx FIFO 1 New Message interrupt.
 
#define DL_MCAN_INTERRUPT_RF0L   (MCAN_IR_RF0L_MASK)
 Rx FIFO 0 Message Lost interrupt.
 
#define DL_MCAN_INTERRUPT_RF0F   (MCAN_IR_RF0F_MASK)
 Rx FIFO 0 Full interrupt.
 
#define DL_MCAN_INTERRUPT_RF0W   (MCAN_IR_RF0W_MASK)
 Rx FIFO 0 Watermark interrupt.
 
#define DL_MCAN_INTERRUPT_RF0N   (MCAN_IR_RF0N_MASK)
 Rx FIFO 0 New Message interrupt.
 
#define DL_MCAN_MSP_INTERRUPT_WAKEUP   (MCAN_IMASK_WAKEUP_SET)
 Clock Stop Wake Up interrupt.
 
#define DL_MCAN_MSP_INTERRUPT_TIMESTAMP_OVERFLOW   (MCAN_IMASK_EXT_TS_CNTR_OVFL_SET)
 External Timestamp Counter Overflow interrupt.
 
#define DL_MCAN_MSP_INTERRUPT_DOUBLE_ERROR_DETECTION   (MCAN_IMASK_DED_SET)
 Message RAM Double Error Detection interrupt.
 
#define DL_MCAN_MSP_INTERRUPT_SINGLE_ERROR_CORRECTION   (MCAN_IMASK_SEC_SET)
 Message RAM Single Error Correction interrupt.
 
#define DL_MCAN_MSP_INTERRUPT_LINE1   (MCAN_IMASK_INTL1_SET)
 MCAN Interrupt Line 1.
 
#define DL_MCAN_MSP_INTERRUPT_LINE0   (MCAN_IMASK_INTL0_SET)
 MCAN Interrupt Line 0.
 
#define DL_MCAN_INTR_SRC_RX_FIFO0_NEW_MSG   (MCAN_IR_RF0N_MASK)
 Rx FIFO 0 New Message interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO0_WATERMARK   (MCAN_IR_RF0W_MASK)
 Rx FIFO 0 Watermark Reached interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO0_FULL   (MCAN_IR_RF0F_MASK)
 Rx FIFO 0 Full interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO0_MSG_LOST   (MCAN_IR_RF0L_MASK)
 Rx FIFO 0 Message Lost interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO1_NEW_MSG   (MCAN_IR_RF1N_MASK)
 Rx FIFO 1 New Message interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO1_WATERMARK   (MCAN_IR_RF1W_MASK)
 Rx FIFO 1 Watermark Reached interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO1_FULL   (MCAN_IR_RF1F_MASK)
 Rx FIFO 1 Full interrupt.
 
#define DL_MCAN_INTR_SRC_RX_FIFO1_MSG_LOST   (MCAN_IR_RF1L_MASK)
 Rx FIFO 1 Message Lost interrupt.
 
#define DL_MCAN_INTR_SRC_HIGH_PRIO_MSG   (MCAN_IR_HPM_MASK)
 High Priority Message interrupt.
 
#define DL_MCAN_INTR_SRC_TRANS_COMPLETE   (MCAN_IR_TC_MASK)
 Transmission Completed interrupt.
 
#define DL_MCAN_INTR_SRC_TRANS_CANCEL_FINISH   (MCAN_IR_TCF_MASK)
 Transmission Cancellation Finished interrupt.
 
#define DL_MCAN_INTR_SRC_TX_FIFO_EMPTY   (MCAN_IR_TFE_MASK)
 Tx FIFO Empty interrupt.
 
#define DL_MCAN_INTR_SRC_TX_EVT_FIFO_NEW_ENTRY   (MCAN_IR_TEFN_MASK)
 Tx Event FIFO New Entry interrupt.
 
#define DL_MCAN_INTR_SRC_TX_EVT_FIFO_WATERMARK   (MCAN_IR_TEFW_MASK)
 Tx Event FIFO Watermark Reached interrupt.
 
#define DL_MCAN_INTR_SRC_TX_EVT_FIFO_FULL   (MCAN_IR_TEFF_MASK)
 Tx Event FIFO Full interrupt.
 
#define DL_MCAN_INTR_SRC_TX_EVT_FIFO_ELEM_LOST   (MCAN_IR_TEFL_MASK)
 Tx Event FIFO Element Lost interrupt.
 
#define DL_MCAN_INTR_SRC_TIMESTAMP_WRAPAROUND   (MCAN_IR_TSW_MASK)
 Timestamp Wraparound interrupt.
 
#define DL_MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE   (MCAN_IR_MRAF_MASK)
 Message RAM Access Failure interrupt.
 
#define DL_MCAN_INTR_SRC_TIMEOUT   (MCAN_IR_TOO_MASK)
 Timeout Occurred interrupt.
 
#define DL_MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG   (MCAN_IR_DRX_MASK)
 Message stored to Dedicated Rx Buffer interrupt.
 
#define DL_MCAN_INTR_SRC_BIT_ERR_UNCORRECTED   (MCAN_IR_BEU_MASK)
 Bit Error Uncorrected interrupt.
 
#define DL_MCAN_INTR_SRC_ERR_LOG_OVRFLW   (MCAN_IR_ELO_MASK)
 Error Logging Overflow interrupt.
 
#define DL_MCAN_INTR_SRC_ERR_PASSIVE   (MCAN_IR_EP_MASK)
 Error Passive interrupt.
 
#define DL_MCAN_INTR_SRC_WARNING_STATUS   (MCAN_IR_EW_MASK)
 Warning Status interrupt.
 
#define DL_MCAN_INTR_SRC_BUS_OFF_STATUS   (MCAN_IR_BO_MASK)
 Bus_Off Status interrupt.
 
#define DL_MCAN_INTR_SRC_WATCHDOG   (MCAN_IR_WDI_MASK)
 Watchdog Interrupt interrupt.
 
#define DL_MCAN_INTR_SRC_PROTOCOL_ERR_ARB   (MCAN_IR_PEA_MASK)
 Protocol Error in Arbitration Phase interrupt.
 
#define DL_MCAN_INTR_SRC_PROTOCOL_ERR_DATA   (MCAN_IR_PED_MASK)
 Protocol Error in Data Phase interrupt.
 
#define DL_MCAN_INTR_SRC_RES_ADDR_ACCESS   (MCAN_IR_ARA_MASK)
 Access to Reserved Address interrupt.
 
#define DL_MCAN_DBTP_DSJW_MAX   (0xFU)
 Maximum data synch jump width.
 
#define DL_MCAN_DBTP_DTSEG2_MAX   (0xFU)
 Max data time segment 2.
 
#define DL_MCAN_DBTP_DTSEG1_MAX   (0x1FU)
 Max data time segment 1.
 
#define DL_MCAN_DBTP_DBRP_MAX   (0x1FU)
 Max data date rate prescalar.
 
#define DL_MCAN_NBTP_NSJW_MAX   (0x7FU)
 Max nom synch jump width.
 
#define DL_MCAN_NBTP_NTSEG2_MAX   (0x7FU)
 Max nom synch time segment 2.
 
#define DL_MCAN_NBTP_NTSEG1_MAX   (0xFFU)
 Max nom synch time segment 1.
 
#define DL_MCAN_NBTP_NBRP_MAX   (0x1FFU)
 Max nom data date rate prescalar.
 
#define DL_MCAN_RWD_WDC_MAX   (0xFFU)
 Max wdc preload.
 
#define DL_MCAN_TDCR_TDCF_MAX   (0x7FU)
 Transmitter Delay Compensation Filter Window Length.
 
#define DL_MCAN_TDCR_TDCO_MAX   (0x7FU)
 Transmitter Delay Compensation Offset.
 
#define DL_MCAN_XIDAM_EIDM_MAX   (0x1FFFFFFFU)
 Max MCAN extended id mask.
 
#define DL_MCAN_TSCC_TCP_MAX   (0xFU)
 Max timestamp counter prescaler.
 
#define DL_MCAN_TOCC_TOP_MAX   (0xFFFFU)
 Max timeout preload.
 

Enumerations

enum  DL_MCAN_INSTANCE { DL_MCAN_INSTANCE_0 = SYSCTL_SYSSTATUS_MCAN0READY_MASK }
 Enum to select the MCAN instance. More...
 
enum  DL_MCAN_FCLK {
  DL_MCAN_FCLK_SYSPLLCLK1 = SYSCTL_GENCLKCFG_CANCLKSRC_SYSPLLOUT1,
  DL_MCAN_FCLK_HFCLK = SYSCTL_GENCLKCFG_CANCLKSRC_HFCLK
}
 Enum to select source clock for CANCLK. More...
 
enum  DL_MCAN_FCLK_DIV {
  DL_MCAN_FCLK_DIV_1 = MCAN_CLKDIV_RATIO_DIV_BY_1_,
  DL_MCAN_FCLK_DIV_2 = MCAN_CLKDIV_RATIO_DIV_BY_2_,
  DL_MCAN_FCLK_DIV_4 = MCAN_CLKDIV_RATIO_DIV_BY_4_
}
 Enum to select CANCLK divider. More...
 
enum  DL_MCAN_INTR_LINE_NUM {
  DL_MCAN_INTR_LINE_NUM_0 = 0U,
  DL_MCAN_INTR_LINE_NUM_1 = 1U
}
 Enum to select the MCAN interrupt lines. More...
 
enum  DL_MCAN_ID_TYPE {
  DL_MCAN_ID_TYPE_11_BIT = 0U,
  DL_MCAN_ID_TYPE_29_BIT = 1U
}
 Enum to represent the MCAN Identifier Type. More...
 
enum  DL_MCAN_OPERATION_MODE {
  DL_MCAN_OPERATION_MODE_NORMAL = 0U,
  DL_MCAN_OPERATION_MODE_SW_INIT = 1U
}
 Enum to represent the MCAN mode of operation. More...
 
enum  DL_MCAN_MEM_TYPE {
  DL_MCAN_MEM_TYPE_BUF = 0U,
  DL_MCAN_MEM_TYPE_FIFO = 1U
}
 Enum to represent the MCAN Message RAM type. More...
 
enum  DL_MCAN_RX_FIFO_NUM {
  DL_MCAN_RX_FIFO_NUM_0 = 0U,
  DL_MCAN_RX_FIFO_NUM_1 = 1U
}
 Enum to represent the MCAN Rx FIFO number. More...
 
enum  DL_MCAN_PIN_TYPE {
  DL_MCAN_PIN_TYPE_RX = 0U,
  DL_MCAN_PIN_TYPE_TX = 1U
}
 Enum to represent the MCAN pin type. More...
 
enum  DL_MCAN_ELEM_SIZE {
  DL_MCAN_ELEM_SIZE_8BYTES = 0U,
  DL_MCAN_ELEM_SIZE_12BYTES = 1U,
  DL_MCAN_ELEM_SIZE_16BYTES = 2U,
  DL_MCAN_ELEM_SIZE_20BYTES = 3U,
  DL_MCAN_ELEM_SIZE_24BYTES = 4U,
  DL_MCAN_ELEM_SIZE_32BYTES = 5U,
  DL_MCAN_ELEM_SIZE_48BYTES = 6U,
  DL_MCAN_ELEM_SIZE_64BYTES = 7U
}
 Enum to represent FIFO/Buffer element Size. More...
 
enum  DL_MCAN_TIMEOUT_SELECT {
  DL_MCAN_TIMEOUT_SELECT_CONT = 0U,
  DL_MCAN_TIMEOUT_SELECT_TX_EVENT_FIFO = 1U,
  DL_MCAN_TIMEOUT_SELECT_RX_FIFO0 = 2U,
  DL_MCAN_TIMEOUT_SELECT_RX_FIFO1 = 3U
}
 Enum to represent the MCAN time-out counter configuration. More...
 
enum  DL_MCAN_INTR_SRC_MCAN {
  DL_MCAN_INTR_SRC_MCAN_EXT_TS = 0x0,
  DL_MCAN_INTR_SRC_MCAN_LINE_0 = 0x1,
  DL_MCAN_INTR_SRC_MCAN_LINE_1 = 0x2
}
 Enum to select the MCAN instance. More...
 
enum  DL_MCAN_ECC_ERR_TYPE {
  DL_MCAN_ECC_ERR_TYPE_SEC = 0U,
  DL_MCAN_ECC_ERR_TYPE_DED = 1U
}
 Enum to represent the ECC Error Types. More...
 
enum  DL_MCAN_LPBK_MODE {
  DL_MCAN_LPBK_MODE_INTERNAL = 0U,
  DL_MCAN_LPBK_MODE_EXTERNAL = 1U
}
 Enum to select the MCAN Loopback mode. More...
 
enum  DL_MCAN_COM_STATE {
  DL_MCAN_COM_STATE_SYNCHRONIZING = 0U,
  DL_MCAN_COM_STATE_IDLE = 1U,
  DL_MCAN_COM_STATE_RECEIVER = 2U,
  DL_MCAN_COM_STATE_TRANSMITTER = 3U
}
 Enum to represent MCAN's communication state. More...
 
enum  DL_MCAN_ERR_CODE {
  DL_MCAN_ERR_CODE_NO_ERROR = 0U,
  DL_MCAN_ERR_CODE_STUFF_ERROR = 1U,
  DL_MCAN_ERR_CODE_FORM_ERROR = 2U,
  DL_MCAN_ERR_CODE_ACK_ERROR = 3U,
  DL_MCAN_ERR_CODE_BIT1_ERROR = 4U,
  DL_MCAN_ERR_CODE_BIT0_ERROR = 5U,
  DL_MCAN_ERR_CODE_CRC_ERROR = 6U,
  DL_MCAN_ERR_CODE_NO_CHANGE = 7U
}
 Enum to represent MCAN's Error Code. More...
 
enum  DL_MCAN_CLOCK_DIVIDE {
  DL_MCAN_CLOCK_DIVIDE_1 = MCAN_CLKDIV_RATIO_DIV_BY_1_,
  DL_MCAN_CLOCK_DIVIDE_2 = MCAN_CLKDIV_RATIO_DIV_BY_2_,
  DL_MCAN_CLOCK_DIVIDE_4 = MCAN_CLKDIV_RATIO_DIV_BY_4_
}
 
enum  DL_MCAN_IIDX {
  DL_MCAN_IIDX_WAKEUP = MCAN_IIDX_STAT_WAKEUP,
  DL_MCAN_IIDX_TIMESTAMP_OVERFLOW = MCAN_IIDX_STAT_EXT_TS_CNTR_OVFL,
  DL_MCAN_IIDX_DOUBLE_ERROR_DETECTION = MCAN_IIDX_STAT_DED,
  DL_MCAN_IIDX_SINGLE_ERROR_CORRECTION = MCAN_IIDX_STAT_SEC,
  DL_MCAN_IIDX_LINE1 = MCAN_IIDX_STAT_INTL1,
  DL_MCAN_IIDX_LINE0 = MCAN_IIDX_STAT_INTL0
}
 

Functions

bool DL_MCAN_isReady (DL_MCAN_INSTANCE instance)
 if MCAN instance is ready to be configured More...
 
void DL_MCAN_setClockConfig (MCAN_Regs *mcan, DL_MCAN_ClockConfig *config)
 Configure CANCLK source clock. More...
 
void DL_MCAN_getClockConfig (MCAN_Regs *mcan, DL_MCAN_ClockConfig *config)
 Get CANCLK clock configuration. More...
 
bool DL_MCAN_isInReset (MCAN_Regs *mcan)
 This function checks if the MCAN module is in Reset. More...
 
bool DL_MCAN_isFDOpEnable (MCAN_Regs *mcan)
 This API will return flexible data rate operation status MCAN module. More...
 
bool DL_MCAN_isMemInitDone (MCAN_Regs *mcan)
 This function checks if the memory initialization is done for MCAN module. More...
 
void DL_MCAN_setOpMode (MCAN_Regs *mcan, uint32_t mode)
 This API will set MCAN module mode of operation. More...
 
uint32_t DL_MCAN_getOpMode (MCAN_Regs *mcan)
 This API will return MCAN module mode of operation. More...
 
int32_t DL_MCAN_init (MCAN_Regs *mcan, const DL_MCAN_InitParams *initParams)
 This API will initialize MCAN module. More...
 
int32_t DL_MCAN_config (MCAN_Regs *mcan, const DL_MCAN_ConfigParams *configParams)
 This API will configure MCAN module. More...
 
void DL_MCAN_eccConfig (MCAN_Regs *mcan, const DL_MCAN_ECCConfigParams *configParams)
 This API will enable/disable ECC on the Message RAM. More...
 
int32_t DL_MCAN_setBitTime (MCAN_Regs *mcan, const DL_MCAN_BitTimingParams *configParams)
 This API will configure a bit timings for MCAN module. More...
 
int32_t DL_MCAN_msgRAMConfig (MCAN_Regs *mcan, const DL_MCAN_MsgRAMConfigParams *msgRAMConfigParams)
 This API will configure Different sections of Message RAM. More...
 
int32_t DL_MCAN_setExtIDAndMask (MCAN_Regs *mcan, uint32_t idMask)
 This API will configure Extended ID AND Mask. More...
 
void DL_MCAN_writeMsgRam (MCAN_Regs *mcan, uint32_t memType, uint32_t bufNum, const DL_MCAN_TxBufElement *elem)
 This API is used to write Tx message to message RAM. More...
 
int32_t DL_MCAN_TXBufAddReq (MCAN_Regs *mcan, uint32_t bufNum)
 This API will set Tx Buffer Add Request. More...
 
void DL_MCAN_getNewDataStatus (MCAN_Regs *mcan, DL_MCAN_RxNewDataStatus *newDataStatus)
 This API will return New Data Message Status. More...
 
void DL_MCAN_clearNewDataStatus (MCAN_Regs *mcan, const DL_MCAN_RxNewDataStatus *newDataStatus)
 This API clear New Data Message Status. More...
 
void DL_MCAN_readMsgRam (MCAN_Regs *mcan, uint32_t memType, uint32_t bufNum, uint32_t fifoNum, DL_MCAN_RxBufElement *elem)
 This API is used to read received message form message RAM. More...
 
void DL_MCAN_readTxEventFIFO (MCAN_Regs *mcan, DL_MCAN_TxEventFIFOElement *txEventElem)
 This API is used to read message form Tx Event FIFO. More...
 
void DL_MCAN_addStdMsgIDFilter (MCAN_Regs *mcan, uint32_t filtNum, const DL_MCAN_StdMsgIDFilterElement *elem)
 This API is used to add Standard Message ID Filter Element. More...
 
void DL_MCAN_addExtMsgIDFilter (MCAN_Regs *mcan, uint32_t filtNum, const DL_MCAN_ExtMsgIDFilterElement *elem)
 This API is used to add Extended Message ID Filter Element. More...
 
void DL_MCAN_lpbkModeEnable (MCAN_Regs *mcan, uint32_t lpbkMode, bool enable)
 This API will enable/disable Loop Back Test Mode for MCAN module. More...
 
void DL_MCAN_getErrCounters (MCAN_Regs *mcan, DL_MCAN_ErrCntStatus *errCounter)
 This API will return error counter status for MCAN module. More...
 
void DL_MCAN_getProtocolStatus (MCAN_Regs *mcan, DL_MCAN_ProtocolStatus *protStatus)
 This API will return protocol status for MCAN module. More...
 
void DL_MCAN_enableIntr (MCAN_Regs *mcan, uint32_t intrMask, bool enable)
 This API is used to enable/disable interrupts. More...
 
void DL_MCAN_selectIntrLine (MCAN_Regs *mcan, uint32_t intrMask, uint32_t lineNum)
 This API is used to select interrupt line. More...
 
uint32_t DL_MCAN_getIntrLineSelectStatus (MCAN_Regs *mcan)
 This API is used to get interrupt line selected for each interrupt. More...
 
void DL_MCAN_enableIntrLine (MCAN_Regs *mcan, uint32_t lineNum, bool enable)
 This API is used to enable/disable selected interrupt line. More...
 
uint32_t DL_MCAN_getIntrStatus (MCAN_Regs *mcan)
 This API will return interrupt status. More...
 
void DL_MCAN_clearIntrStatus (MCAN_Regs *mcan, uint32_t intrMask, DL_MCAN_INTR_SRC_MCAN eoi)
 This API is used to clear the interrupt status. More...
 
void DL_MCAN_getHighPriorityMsgStatus (MCAN_Regs *mcan, DL_MCAN_HighPriorityMsgInfo *hpm)
 This API will return High Priority Message Status. More...
 
void DL_MCAN_getRxFIFOStatus (MCAN_Regs *mcan, DL_MCAN_RxFIFOStatus *fifoStatus)
 This API will Rx FIFO status. More...
 
int32_t DL_MCAN_writeRxFIFOAck (MCAN_Regs *mcan, uint32_t fifoNum, uint32_t idx)
 This API will write Rx FIFO Acknowledgement. More...
 
void DL_MCAN_getTxFIFOQueStatus (MCAN_Regs *mcan, DL_MCAN_TxFIFOStatus *fifoStatus)
 This API will Tx FIFO status. More...
 
uint32_t DL_MCAN_getTxBufReqPend (MCAN_Regs *mcan)
 This API will return Tx Buffer Request Pending status. More...
 
int32_t DL_MCAN_txBufCancellationReq (MCAN_Regs *mcan, uint32_t buffNum)
 This API will set Tx Buffer Cancellation Request. More...
 
uint32_t DL_MCAN_getTxBufTransmissionStatus (MCAN_Regs *mcan)
 This API will return Tx Buffer Transmission Occurred status. More...
 
uint32_t DL_MCAN_txBufCancellationStatus (MCAN_Regs *mcan)
 This API will return Transmit Buffer Cancellation Finished status. More...
 
int32_t DL_MCAN_TXBufTransIntrEnable (MCAN_Regs *mcan, uint32_t bufNum, bool enable)
 This API is used to enable/disable Tx Buffer Transmission Interrupt. More...
 
int32_t DL_MCAN_getTxBufCancellationIntrEnable (MCAN_Regs *mcan, uint32_t bufNum, bool enable)
 This API is used to enable/disable Tx Buffer Cancellation Finished Interrupt. More...
 
void DL_MCAN_addClockStopRequest (MCAN_Regs *mcan, bool enable)
 This API add clock stop request for MCAN module to put it in power down mode. More...
 
void DL_MCAN_getTxEventFIFOStatus (MCAN_Regs *mcan, DL_MCAN_TxEventFIFOStatus *fifoStatus)
 This API will Tx Event FIFO status. More...
 
int32_t DL_MCAN_writeTxEventFIFOAck (MCAN_Regs *mcan, uint32_t idx)
 This API will write Event FIFO Acknowledge Index. More...
 
void DL_MCAN_eccForceError (MCAN_Regs *mcan, const DL_MCAN_ECCErrForceParams *eccErr)
 This API will Force Error on ECC. More...
 
void DL_MCAN_eccGetErrorStatus (MCAN_Regs *mcan, DL_MCAN_ECCErrStatus *eccErr)
 This API will return ECC Error status. More...
 
void DL_MCAN_eccClearErrorStatus (MCAN_Regs *mcan, uint32_t errType)
 This API is used to clear the ECC Error status. More...
 
void DL_MCAN_eccWriteEOI (MCAN_Regs *mcan, uint32_t errType)
 This API is used to write End of Interrupt for ECC interrupt. More...
 
void DL_MCAN_eccEnableIntr (MCAN_Regs *mcan, uint32_t errType, bool enable)
 This API is used to enable ECC interrupt. More...
 
uint32_t DL_MCAN_eccGetIntrStatus (MCAN_Regs *mcan, uint32_t errType)
 This API is used to get ECC interrupt status. More...
 
void DL_MCAN_eccClearIntrStatus (MCAN_Regs *mcan, uint32_t errType)
 This API is used to clear ECC interrupt status. More...
 
void DL_MCAN_extTSCounterConfig (MCAN_Regs *mcan, uint32_t prescalar)
 This API will configure external timestamp counter for MCAN module. More...
 
void DL_MCAN_extTSCounterEnable (MCAN_Regs *mcan, bool enable)
 This API will enable/disable fast external time stamp counter for MCAN module. More...
 
void DL_MCAN_extTSEnableIntr (MCAN_Regs *mcan, bool enable)
 This API will enable/disable External TimeStamp Counter Overflow Interrupt for MCAN module. More...
 
void DL_MCAN_extTSWriteEOI (MCAN_Regs *mcan)
 This API is used to write End of Interrupt for External TimeStamp Counter Overflow Interrupt. More...
 
uint32_t DL_MCAN_extTSGetUnservicedIntrCount (MCAN_Regs *mcan)
 This API returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter. More...
 
void DL_MCAN_getRevisionId (MCAN_Regs *mcan, DL_MCAN_RevisionId *revId)
 This API is used get the MCAN revision ID. More...
 
uint32_t DL_MCAN_getClockStopAck (MCAN_Regs *mcan)
 This API get clock stop acknowledgement for MCAN module. It return whether MCAN is power down mode or not. More...
 
void DL_MCAN_extTSSetRawStatus (MCAN_Regs *mcan)
 This API will set External TimeStamp Counter Overflow Interrupt Raw status for MCAN module. More...
 
void DL_MCAN_extTSClearRawStatus (MCAN_Regs *mcan)
 This API will clear External TimeStamp Counter Overflow Interrupt raw status for MCAN module. More...
 
uint32_t DL_MCAN_getRxPinState (MCAN_Regs *mcan)
 This API will return Rx pin state of MCAN module. More...
 
void DL_MCAN_setTxPinState (MCAN_Regs *mcan, uint32_t state)
 This API will set Tx pin state of MCAN module. More...
 
uint32_t DL_MCAN_getTxPinState (MCAN_Regs *mcan)
 This API will return Tx pin state of MCAN module. More...
 
uint32_t DL_MCAN_getTSCounterVal (MCAN_Regs *mcan)
 This API will return current timestamp counter value. More...
 
uint32_t DL_MCAN_getClkStopAck (MCAN_Regs *mcan)
 This API will return clock stop acknowledgement for MCAN module. More...
 
void DL_MCAN_getBitTime (MCAN_Regs *mcan, DL_MCAN_BitTimingParams *configParams)
 This API will get the configured bit timings for MCAN module. More...
 
void DL_MCAN_resetTSCounter (MCAN_Regs *mcan)
 This API will reset timestamp counter value. More...
 
uint32_t DL_MCAN_getTOCounterVal (MCAN_Regs *mcan)
 This API will return current time-out counter value. More...
 
void DL_MCAN_eccAggrGetRevisionId (MCAN_Regs *mcan, DL_MCAN_ECCAggrRevisionId *revId)
 This API is used get the ECC AGGR revision ID. More...
 
void DL_MCAN_eccWrapGetRevisionId (MCAN_Regs *mcan, DL_MCAN_ECCWrapRevisionId *revId)
 This API is used get the ECC Wrapper revision ID. More...
 
bool DL_MCAN_extTSIsIntrEnable (MCAN_Regs *mcan)
 This API returns External TimeStamp Counter Overflow Interrupt enable status for MCAN module. More...
 
uint32_t DL_MCAN_getEndianVal (MCAN_Regs *mcan)
 This function return endianness value of MCAN module. More...
 
uint32_t DL_MCAN_getExtIDANDMask (MCAN_Regs *mcan)
 This API will get the configured Extended ID AND Mask. More...
 
__STATIC_INLINE void DL_MCAN_enablePower (MCAN_Regs *mcan)
 Enables power on MCAN module. More...
 
__STATIC_INLINE void DL_MCAN_disablePower (MCAN_Regs *mcan)
 Disables power on mcan module. More...
 
__STATIC_INLINE bool DL_MCAN_isPowerEnabled (MCAN_Regs *mcan)
 Returns if power on mcan module. More...
 
__STATIC_INLINE void DL_MCAN_reset (MCAN_Regs *mcan)
 Resets mcan peripheral. More...
 
__STATIC_INLINE bool DL_MCAN_isReset (MCAN_Regs *mcan)
 Returns if mcan peripheral was reset. More...
 
__STATIC_INLINE void DL_MCAN_enableInterrupt (MCAN_Regs *mcan, uint32_t interruptMask)
 Enable MCAN interrupts. More...
 
__STATIC_INLINE void DL_MCAN_disableInterrupt (MCAN_Regs *mcan, uint32_t interruptMask)
 Disable MCAN interrupts. More...
 
__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterrupts (MCAN_Regs *mcan, uint32_t interruptMask)
 Check which MCAN interrupts are enabled. More...
 
__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterruptStatus (MCAN_Regs *mcan, uint32_t interruptMask)
 Check interrupt flag of enabled MCAN interrupts. More...
 
__STATIC_INLINE uint32_t DL_MCAN_getRawInterruptStatus (MCAN_Regs *mcan, uint32_t interruptMask)
 Check interrupt flag of any MCAN interrupt. More...
 
__STATIC_INLINE DL_MCAN_IIDX DL_MCAN_getPendingInterrupt (MCAN_Regs *mcan)
 Get highest priority pending MCAN interrupt. More...
 
__STATIC_INLINE void DL_MCAN_clearInterruptStatus (MCAN_Regs *mcan, uint32_t interruptMask)
 Clear pending MCAN interrupts. More...
 
__STATIC_INLINE bool DL_MCAN_isModuleClockEnabled (MCAN_Regs *mcan)
 Checks if the MCAN module clock request is enabled. More...
 
__STATIC_INLINE void DL_MCAN_enableModuleClock (MCAN_Regs *mcan)
 Enables the MCAN functional module clock. More...
 
__STATIC_INLINE void DL_MCAN_disableModuleClock (MCAN_Regs *mcan)
 Disables the MCAN functional module clock. More...
 
__STATIC_INLINE uint32_t DL_MCAN_getModuleClockDivider (MCAN_Regs *mcan)
 Gets the MCAN functional module clock divide ratio. More...
 
__STATIC_INLINE void DL_MCAN_setModuleClockDivider (MCAN_Regs *mcan, uint32_t clkdiv)
 Configures clock divide settings for the MCAN functional module clock. More...
 
__STATIC_INLINE bool DL_MCAN_isClockStopGateRequestEnabled (MCAN_Regs *mcan)
 Checks if the MCAN clock gating request is enabled. More...
 
__STATIC_INLINE void DL_MCAN_enableClockStopGateRequest (MCAN_Regs *mcan)
 Enables the MCAN clock gating request. More...
 
__STATIC_INLINE void DL_MCAN_disableClockStopGateRequest (MCAN_Regs *mcan)
 Disables the MCAN clock gating request. More...
 
__STATIC_INLINE bool DL_MCAN_isClockStopWakeupInterruptEnabled (MCAN_Regs *mcan)
 Checks if the MCAN clock stop wakeup interrupt is enabled. More...
 
__STATIC_INLINE void DL_MCAN_enableClockStopWakeupInterrupt (MCAN_Regs *mcan)
 Enables the MCAN clock stop wakeup interrupt. More...
 
__STATIC_INLINE void DL_MCAN_disableClockStopWakeupInterrupt (MCAN_Regs *mcan)
 Disables the MCAN clock stop wakeup interrupt. More...
 
__STATIC_INLINE bool DL_MCAN_isGlitchFilterWakeupEnabled (MCAN_Regs *mcan)
 Checks if the glitch filter on MCAN RXD input is enabled. More...
 
__STATIC_INLINE void DL_MCAN_enableGlitchFilterWakeup (MCAN_Regs *mcan)
 Enables the glitch filter on MCAN RXD input. More...
 
__STATIC_INLINE void DL_MCAN_disableGlitchFilterWakeup (MCAN_Regs *mcan)
 Disables the glitch filter on MCAN RXD input. More...
 
__STATIC_INLINE bool DL_MCAN_getClockStopAcknowledgeStatus (MCAN_Regs *mcan)
 Gets the clock stop acknowledge status. More...
 
__STATIC_INLINE bool DL_MCAN_getClockStopHardwareOverrideStatus (MCAN_Regs *mcan)
 Gets the clock stop hardware override status. More...
 
__STATIC_INLINE bool DL_MCAN_getControllerClockRequestStatus (MCAN_Regs *mcan)
 Gets the status of MCAN controller clock request from GPRCM. More...
 
bool DL_MCAN_saveConfiguration (MCAN_Regs *mcan, DL_MCAN_backupConfig *ptr)
 Saves MCAN configuration before entering STOP or STANDBY mode. Only necessary for PG 1.0 silicon. More...
 
bool DL_MCAN_restoreConfiguration (MCAN_Regs *mcan, DL_MCAN_backupConfig *ptr)
 Restore MCAN configuration after leaving STOP or STANDBY mode. Only necessary for PG 1.0 silicon. More...
 
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale