MSPM0G1X0X_G3X0X Driver Library  1.10.01.05
Modules | Data Structures | Macros | Enumerations | Functions
Modular Controller Area Network (MCAN)
Collaboration diagram for Modular Controller Area Network (MCAN):

Modules

 DL_MCAN_INTERRUPT
 
 DL_MCAN_MSP_INTERRUPT
 
 DL_MCAN_INTR_SRC
 

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_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...
 

Detailed Description

Overview

The MCAN Driver Library allows full configuration of the MSPM0 MCAN (CAN-FD) module. The Modular Controller Area Network (MCAN) peripheral supports both communication through classic CAN and CAN-FD protocols.


Macro Definition Documentation

§ DL_MCAN_INTR_MASK_ALL

#define DL_MCAN_INTR_MASK_ALL
Value:
(MCAN_IR_RF0N_MASK | \
MCAN_IR_RF0W_MASK | \
MCAN_IR_RF0F_MASK | \
MCAN_IR_RF0L_MASK | \
MCAN_IR_RF1N_MASK | \
MCAN_IR_RF1W_MASK | \
MCAN_IR_RF1F_MASK | \
MCAN_IR_RF1L_MASK | \
MCAN_IR_HPM_MASK | \
MCAN_IR_TC_MASK | \
MCAN_IR_TCF_MASK | \
MCAN_IR_TFE_MASK | \
MCAN_IR_TEFN_MASK | \
MCAN_IR_TEFW_MASK | \
MCAN_IR_TEFF_MASK | \
MCAN_IR_TEFL_MASK | \
MCAN_IR_TSW_MASK | \
MCAN_IR_MRAF_MASK | \
MCAN_IR_TOO_MASK | \
MCAN_IR_DRX_MASK | \
MCAN_IR_BEU_MASK | \
MCAN_IR_ELO_MASK | \
MCAN_IR_EP_MASK | \
MCAN_IR_EW_MASK | \
MCAN_IR_BO_MASK | \
MCAN_IR_WDI_MASK | \
MCAN_IR_PEA_MASK | \
MCAN_IR_PED_MASK | \
MCAN_IR_ARA_MASK)

Macro defines mask for all the interrupts status for MCAN.

Enumeration Type Documentation

§ DL_MCAN_INSTANCE

Enum to select the MCAN instance.

Enumerator
DL_MCAN_INSTANCE_0 

Selects CANFD instance 0 of device

§ DL_MCAN_FCLK

Enum to select source clock for CANCLK.

Enumerator
DL_MCAN_FCLK_SYSPLLCLK1 

Selects SYSPLLCLK1 as the source clock for CANCLK

DL_MCAN_FCLK_HFCLK 

Selects HFCLK as the source clock for CANCLK

§ DL_MCAN_FCLK_DIV

Enum to select CANCLK divider.

Enumerator
DL_MCAN_FCLK_DIV_1 

Clock divider 1

DL_MCAN_FCLK_DIV_2 

Clock divider 2

DL_MCAN_FCLK_DIV_4 

Clock divider 4

§ DL_MCAN_INTR_LINE_NUM

Enum to select the MCAN interrupt lines.

Enumerator
DL_MCAN_INTR_LINE_NUM_0 

MCAN interrupt line 0

DL_MCAN_INTR_LINE_NUM_1 

MCAN interrupt line 1

§ DL_MCAN_ID_TYPE

Enum to represent the MCAN Identifier Type.

Enumerator
DL_MCAN_ID_TYPE_11_BIT 

11bit MCAN Identifier

DL_MCAN_ID_TYPE_29_BIT 

29bit MCAN Identifier

§ DL_MCAN_OPERATION_MODE

Enum to represent the MCAN mode of operation.

Enumerator
DL_MCAN_OPERATION_MODE_NORMAL 

MCAN normal mode

DL_MCAN_OPERATION_MODE_SW_INIT 

MCAN SW initialization mode

§ DL_MCAN_MEM_TYPE

Enum to represent the MCAN Message RAM type.

Enumerator
DL_MCAN_MEM_TYPE_BUF 

MCAN Msg RAM buffers

DL_MCAN_MEM_TYPE_FIFO 

MCAN Msg RAM FIFO/Queue

§ DL_MCAN_RX_FIFO_NUM

Enum to represent the MCAN Rx FIFO number.

Enumerator
DL_MCAN_RX_FIFO_NUM_0 

MCAN Rx FIFO 0

DL_MCAN_RX_FIFO_NUM_1 

MCAN Rx FIFO 1

§ DL_MCAN_PIN_TYPE

Enum to represent the MCAN pin type.

Enumerator
DL_MCAN_PIN_TYPE_RX 

MCAN Rx Pin

DL_MCAN_PIN_TYPE_TX 

MCAN Tx Pin

§ DL_MCAN_ELEM_SIZE

Enum to represent FIFO/Buffer element Size.

Enumerator
DL_MCAN_ELEM_SIZE_8BYTES 

8 byte data field

DL_MCAN_ELEM_SIZE_12BYTES 

12 byte data field

DL_MCAN_ELEM_SIZE_16BYTES 

16 byte data field

DL_MCAN_ELEM_SIZE_20BYTES 

20 byte data field

DL_MCAN_ELEM_SIZE_24BYTES 

24 byte data field

DL_MCAN_ELEM_SIZE_32BYTES 

32 byte data field

DL_MCAN_ELEM_SIZE_48BYTES 

48 byte data field

DL_MCAN_ELEM_SIZE_64BYTES 

64 byte data field

§ DL_MCAN_TIMEOUT_SELECT

Enum to represent the MCAN time-out counter configuration.

Enumerator
DL_MCAN_TIMEOUT_SELECT_CONT 

Continuous operation Mode

DL_MCAN_TIMEOUT_SELECT_TX_EVENT_FIFO 

Timeout controlled by Tx Event FIFO

DL_MCAN_TIMEOUT_SELECT_RX_FIFO0 

Timeout controlled by Rx FIFO 0

DL_MCAN_TIMEOUT_SELECT_RX_FIFO1 

Timeout controlled by Rx FIFO 1

§ DL_MCAN_INTR_SRC_MCAN

Enum to select the MCAN instance.

Enumerator
DL_MCAN_INTR_SRC_MCAN_EXT_TS 

MCAN interrupt source was triggered by external time stamp

DL_MCAN_INTR_SRC_MCAN_LINE_0 

MCAN interrupt source was triggered by Line 0

DL_MCAN_INTR_SRC_MCAN_LINE_1 

MCAN interrupt source was triggered by Line 1

§ DL_MCAN_ECC_ERR_TYPE

Enum to represent the ECC Error Types.

Enumerator
DL_MCAN_ECC_ERR_TYPE_SEC 

ECC Single Error Correction

DL_MCAN_ECC_ERR_TYPE_DED 

ECC Single Error Detection

§ DL_MCAN_LPBK_MODE

Enum to select the MCAN Loopback mode.

Enumerator
DL_MCAN_LPBK_MODE_INTERNAL 

Internal Loop Back Mode This mode can be used for hot self-test and this mode will not affect bus state.

DL_MCAN_LPBK_MODE_EXTERNAL 

External Loop Back Mode In this mode, MCAN the M_CAN treats its own transmitted messages as received messages and stores them (if they pass acceptance filtering) into an Rx Buffer or an Rx FIFO. This mode will affect bus state

§ DL_MCAN_COM_STATE

Enum to represent MCAN's communication state.

Enumerator
DL_MCAN_COM_STATE_SYNCHRONIZING 

MCAN is synchronizing on CAN communication

DL_MCAN_COM_STATE_IDLE 

MCAN is neither receiver nor transmitter

DL_MCAN_COM_STATE_RECEIVER 

MCAN is operating as receiver

DL_MCAN_COM_STATE_TRANSMITTER 

MCAN is operating as transmitter

§ DL_MCAN_ERR_CODE

Enum to represent MCAN's Error Code.

Enumerator
DL_MCAN_ERR_CODE_NO_ERROR 

No error occurred since LEC has been reset by successful reception or transmission.

DL_MCAN_ERR_CODE_STUFF_ERROR 

More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed.

DL_MCAN_ERR_CODE_FORM_ERROR 

A fixed format part of a received frame has the wrong format.

DL_MCAN_ERR_CODE_ACK_ERROR 

The message transmitted by the M_CAN was not acknowledged by another node.

DL_MCAN_ERR_CODE_BIT1_ERROR 

During the transmission of a message (with the exception of the arbitration field), the device wanted to send a recessive level (bit of logical value 1), but the monitored bus value was dominant.

DL_MCAN_ERR_CODE_BIT0_ERROR 

During the transmission of a message (or acknowledge bit, or active error flag, or overload flag), the device wanted to send a dominant level (data or identifier bit logical value 0), but the monitored bus value was recessive. During Bus_Off recovery this status is set each time a sequence of 11 recessive bits has been monitored. This enables the CPU to monitor the proceeding of the Bus_Off recovery sequence (indicating the bus is not stuck at dominant or continuously disturbed).

DL_MCAN_ERR_CODE_CRC_ERROR 

The CRC check sum of a received message was incorrect. The CRC of an incoming message does not match with the CRC calculated from the received data.

DL_MCAN_ERR_CODE_NO_CHANGE 

Any read access to the Protocol Status Register re-initializes the LEC to 7. When the LEC shows the value 7,no CAN bus event was detected since the last CPU read access to the Protocol Status Register.

§ DL_MCAN_CLOCK_DIVIDE

Enumerator
DL_MCAN_CLOCK_DIVIDE_1 

Divide MCAN clock by 1

DL_MCAN_CLOCK_DIVIDE_2 

Divide MCAN clock by 2

DL_MCAN_CLOCK_DIVIDE_4 

Divide MCAN clock by 4

§ DL_MCAN_IIDX

Enumerator
DL_MCAN_IIDX_WAKEUP 

Interrupt index for MCAN clock stop wake up interrupt pending.

DL_MCAN_IIDX_TIMESTAMP_OVERFLOW 

Interrupt index for MCAN external timestamp counter overflow interrupt pending.

DL_MCAN_IIDX_DOUBLE_ERROR_DETECTION 

Interrupt index for MCAN message RAM double error detection interrupt pending.

DL_MCAN_IIDX_SINGLE_ERROR_CORRECTION 

Interrupt index for MCAN message RAM single error correction interrupt pending.

DL_MCAN_IIDX_LINE1 

Interrupt index for MCAN interrupt line 1 interrupt pending.

DL_MCAN_IIDX_LINE0 

Interrupt index for MCAN interrupt line 0 interrupt pending.

Function Documentation

§ DL_MCAN_isReady()

bool DL_MCAN_isReady ( DL_MCAN_INSTANCE  instance)

if MCAN instance is ready to be configured

Parameters
[in]instanceSpecifies the CANFD instance. One of DL_MCAN_INSTANCE
Returns
true if MCAN instance is ready to configured
false if MCAN instance clock synchronization is ongoing.

§ DL_MCAN_setClockConfig()

void DL_MCAN_setClockConfig ( MCAN_Regs *  mcan,
DL_MCAN_ClockConfig config 
)

Configure CANCLK source clock.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]configPointer to the clock configuration struct DL_MCAN_ClockConfig.

§ DL_MCAN_getClockConfig()

void DL_MCAN_getClockConfig ( MCAN_Regs *  mcan,
DL_MCAN_ClockConfig config 
)

Get CANCLK clock configuration.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]configPointer to the clock configuration struct DL_MCAN_ClockConfig.

§ DL_MCAN_isInReset()

bool DL_MCAN_isInReset ( MCAN_Regs *  mcan)

This function checks if the MCAN module is in Reset.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Return values
stateReturns TRUE if reset is in progress. Else returns FALSE.

§ DL_MCAN_isFDOpEnable()

bool DL_MCAN_isFDOpEnable ( MCAN_Regs *  mcan)

This API will return flexible data rate operation status MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
state Returns TRUE if flexible data rate operation is enabled. Else returns FALSE.

§ DL_MCAN_isMemInitDone()

bool DL_MCAN_isMemInitDone ( MCAN_Regs *  mcan)

This function checks if the memory initialization is done for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Return values
stateReturns TRUE if memory initialization is done. Else returns FALSE.

§ DL_MCAN_setOpMode()

void DL_MCAN_setOpMode ( MCAN_Regs *  mcan,
uint32_t  mode 
)

This API will set MCAN module mode of operation.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]modeMode of operation. One of DL_MCAN_OPERATION_MODE.
Returns
None.

§ DL_MCAN_getOpMode()

uint32_t DL_MCAN_getOpMode ( MCAN_Regs *  mcan)

This API will return MCAN module mode of operation.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
mode Mode of operation. One of DL_MCAN_OPERATION_MODE.

§ DL_MCAN_init()

int32_t DL_MCAN_init ( MCAN_Regs *  mcan,
const DL_MCAN_InitParams initParams 
)

This API will initialize MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]initParamsInitialization parameters. DL_MCAN_InitParams.
Returns
status Initialization status.

§ DL_MCAN_config()

int32_t DL_MCAN_config ( MCAN_Regs *  mcan,
const DL_MCAN_ConfigParams configParams 
)

This API will configure MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]configParamsConfiguration parameters. DL_MCAN_ConfigParams.
Returns
status Configuration status.

§ DL_MCAN_eccConfig()

void DL_MCAN_eccConfig ( MCAN_Regs *  mcan,
const DL_MCAN_ECCConfigParams configParams 
)

This API will enable/disable ECC on the Message RAM.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]configParamsMCAN ECC Configuration Parameters. DL_MCAN_ECCConfigParams.
Returns
None.

§ DL_MCAN_setBitTime()

int32_t DL_MCAN_setBitTime ( MCAN_Regs *  mcan,
const DL_MCAN_BitTimingParams configParams 
)

This API will configure a bit timings for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]configParamsConfiguration parameters for MCAN bit timing. DL_MCAN_BitTimingParams.
Returns
status Bit Timings configuration status.

§ DL_MCAN_msgRAMConfig()

int32_t DL_MCAN_msgRAMConfig ( MCAN_Regs *  mcan,
const DL_MCAN_MsgRAMConfigParams msgRAMConfigParams 
)

This API will configure Different sections of Message RAM.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]msgRAMConfigParamsMessage RAM Configuration parameters. DL_MCAN_MsgRAMConfigParams.
Returns
status Configuration Status.

§ DL_MCAN_setExtIDAndMask()

int32_t DL_MCAN_setExtIDAndMask ( MCAN_Regs *  mcan,
uint32_t  idMask 
)

This API will configure Extended ID AND Mask.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]idMaskConfiguration parameters for MCAN Extended Id mask. This value is 29 bit wide.
Returns
status Extended ID AND Mask configuration status.

§ DL_MCAN_writeMsgRam()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]memTypePart of message ram to which given message to write. One of DL_MCAN_MEM_TYPE.
[in]bufNumBuffer number where message to write. This parameter will ignored if memType is FIFO/Q.
[in]elemMessage Object. DL_MCAN_TxBufElement.
Returns
None.

§ DL_MCAN_TXBufAddReq()

int32_t DL_MCAN_TXBufAddReq ( MCAN_Regs *  mcan,
uint32_t  bufNum 
)

This API will set Tx Buffer Add Request.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]bufNumTx Buffer number for which request is to be added.
Returns
status Configuration Status.

§ DL_MCAN_getNewDataStatus()

void DL_MCAN_getNewDataStatus ( MCAN_Regs *  mcan,
DL_MCAN_RxNewDataStatus newDataStatus 
)

This API will return New Data Message Status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]newDataStatusRx Buffer new data status. DL_MCAN_RxNewDataStatus.
Returns
None.

§ DL_MCAN_clearNewDataStatus()

void DL_MCAN_clearNewDataStatus ( MCAN_Regs *  mcan,
const DL_MCAN_RxNewDataStatus newDataStatus 
)

This API clear New Data Message Status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]newDataStatusRx Buffer new data status. DL_MCAN_RxNewDataStatus.
Returns
None.

§ DL_MCAN_readMsgRam()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]memTypePart of message ram to which given message to write.One of DL_MCAN_MEM_TYPE.
[in]bufNumBuffer number from where message is to read. This parameter will ignored if memType is FIFO/Q.
[in]fifoNumFIFOs number from where message is to read. One of DL_MCAN_RX_FIFO_NUM. This parameter will ignored if memType is buffer.
[in]elemMessage Object. DL_MCAN_RxBufElement.
Returns
None.

§ DL_MCAN_readTxEventFIFO()

void DL_MCAN_readTxEventFIFO ( MCAN_Regs *  mcan,
DL_MCAN_TxEventFIFOElement txEventElem 
)

This API is used to read message form Tx Event FIFO.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]txEventElemTx Event FIFO Message Object. DL_MCAN_TxEventFIFOElement.
Returns
None.

§ DL_MCAN_addStdMsgIDFilter()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]filtNumFilter number.
[in]elemFilter Object. DL_MCAN_StdMsgIDFilterElement.
Returns
None.

§ DL_MCAN_addExtMsgIDFilter()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]filtNumFilter number.
[in]elemFilter Object. DL_MCAN_ExtMsgIDFilterElement.
Returns
None.

§ DL_MCAN_lpbkModeEnable()

void DL_MCAN_lpbkModeEnable ( MCAN_Regs *  mcan,
uint32_t  lpbkMode,
bool  enable 
)

This API will enable/disable Loop Back Test Mode for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]lpbkModeLoopback mode for MCAN. One of DL_MCAN_LPBK_MODE.
[in]enableLoop Back Mode is enabled if it is TRUE. Loop Back Mode is disabled if it is FALSE.
Returns
None.
Note
This API can be called only when MCAN is in Software Initialization mode of operation.

§ DL_MCAN_getErrCounters()

void DL_MCAN_getErrCounters ( MCAN_Regs *  mcan,
DL_MCAN_ErrCntStatus errCounter 
)

This API will return error counter status for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]errCounterError Counter Status. DL_MCAN_ErrCntStatus.
Returns
None.

§ DL_MCAN_getProtocolStatus()

void DL_MCAN_getProtocolStatus ( MCAN_Regs *  mcan,
DL_MCAN_ProtocolStatus protStatus 
)

This API will return protocol status for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]protStatusProtocol Status. DL_MCAN_ProtocolStatus.
Returns
None.

§ DL_MCAN_enableIntr()

void DL_MCAN_enableIntr ( MCAN_Regs *  mcan,
uint32_t  intrMask,
bool  enable 
)

This API is used to enable/disable interrupts.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]intrMaskInterrupts to enable. One of DL_MCAN_INTR_SRC.
[in]enableInterrupt is enabled if it is TRUE. Interrupt is disabled if it is FALSE.
Returns
None.

§ DL_MCAN_selectIntrLine()

void DL_MCAN_selectIntrLine ( MCAN_Regs *  mcan,
uint32_t  intrMask,
uint32_t  lineNum 
)

This API is used to select interrupt line.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]intrMaskInterrupt Number for which interrupt line is to be selected. One of DL_MCAN_INTR_SRC.
[in]lineNumInterrupt Line to select. One of DL_MCAN_INTR_LINE_NUM,
Returns
None.

§ DL_MCAN_getIntrLineSelectStatus()

uint32_t DL_MCAN_getIntrLineSelectStatus ( MCAN_Regs *  mcan)

This API is used to get interrupt line selected for each interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Interrupt Line Select Status.

§ DL_MCAN_enableIntrLine()

void DL_MCAN_enableIntrLine ( MCAN_Regs *  mcan,
uint32_t  lineNum,
bool  enable 
)

This API is used to enable/disable selected interrupt line.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]lineNumInterrupt Line to select. One of DL_MCAN_INTR_LINE_NUM,
[in]enableInterrupt Line is enabled if it is TRUE. Interrupt Line is disabled if it is FALSE.
Returns
None.

§ DL_MCAN_getIntrStatus()

uint32_t DL_MCAN_getIntrStatus ( MCAN_Regs *  mcan)

This API will return interrupt status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Interrupt Status.

§ DL_MCAN_clearIntrStatus()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]intrMaskInterrupts to clear status.
[in]eoiSpecified the associated. DL_MCAN_INTR_SRC
Returns
None.

§ DL_MCAN_getHighPriorityMsgStatus()

void DL_MCAN_getHighPriorityMsgStatus ( MCAN_Regs *  mcan,
DL_MCAN_HighPriorityMsgInfo hpm 
)

This API will return High Priority Message Status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]hpmHigh Priority Message Status. DL_MCAN_HighPriorityMsgInfo.
Returns
None.

§ DL_MCAN_getRxFIFOStatus()

void DL_MCAN_getRxFIFOStatus ( MCAN_Regs *  mcan,
DL_MCAN_RxFIFOStatus fifoStatus 
)

This API will Rx FIFO status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]fifoStatusRx FIFO Status. DL_MCAN_RxFIFOStatus.
Returns
None.

§ DL_MCAN_writeRxFIFOAck()

int32_t DL_MCAN_writeRxFIFOAck ( MCAN_Regs *  mcan,
uint32_t  fifoNum,
uint32_t  idx 
)

This API will write Rx FIFO Acknowledgement.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]fifoNumFIFO Number. One of DL_MCAN_RX_FIFO_NUM.
[in]idxRx FIFO Acknowledge Index
Returns
status Acknowledgement Status.

§ DL_MCAN_getTxFIFOQueStatus()

void DL_MCAN_getTxFIFOQueStatus ( MCAN_Regs *  mcan,
DL_MCAN_TxFIFOStatus fifoStatus 
)

This API will Tx FIFO status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]fifoStatusTx FIFO Status. DL_MCAN_TxFIFOStatus.
Returns
None.

§ DL_MCAN_getTxBufReqPend()

uint32_t DL_MCAN_getTxBufReqPend ( MCAN_Regs *  mcan)

This API will return Tx Buffer Request Pending status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Tx Buffer Request Pending status.

§ DL_MCAN_txBufCancellationReq()

int32_t DL_MCAN_txBufCancellationReq ( MCAN_Regs *  mcan,
uint32_t  buffNum 
)

This API will set Tx Buffer Cancellation Request.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]buffNumTx Buffer number for which request is to be added.
Returns
status Configuration Status.

§ DL_MCAN_getTxBufTransmissionStatus()

uint32_t DL_MCAN_getTxBufTransmissionStatus ( MCAN_Regs *  mcan)

This API will return Tx Buffer Transmission Occurred status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Tx Buffer Transmission Occurred status.

§ DL_MCAN_txBufCancellationStatus()

uint32_t DL_MCAN_txBufCancellationStatus ( MCAN_Regs *  mcan)

This API will return Transmit Buffer Cancellation Finished status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Transmit Buffer Cancellation Finished status.

§ DL_MCAN_TXBufTransIntrEnable()

int32_t DL_MCAN_TXBufTransIntrEnable ( MCAN_Regs *  mcan,
uint32_t  bufNum,
bool  enable 
)

This API is used to enable/disable Tx Buffer Transmission Interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]bufNumBuffer number for which interrupt is to enable.
[in]enableInterrupt is enabled if it is TRUE. Interrupt is disabled if it is FALSE.
Returns
status Configuration status.

§ DL_MCAN_getTxBufCancellationIntrEnable()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]bufNumBuffer number for which interrupt is to enable.
[in]enableInterrupt is enabled if it is TRUE. Interrupt is disabled if it is FALSE.
Returns
status Configuration status.

§ DL_MCAN_addClockStopRequest()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]enableAdd Clock Stop Request. Adds Clock Stop Request is TRUE otherwise removes it.
Returns
None.

§ DL_MCAN_getTxEventFIFOStatus()

void DL_MCAN_getTxEventFIFOStatus ( MCAN_Regs *  mcan,
DL_MCAN_TxEventFIFOStatus fifoStatus 
)

This API will Tx Event FIFO status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]fifoStatusTx Event FIFO Status. DL_MCAN_TxEventFIFOStatus.
Returns
None.

§ DL_MCAN_writeTxEventFIFOAck()

int32_t DL_MCAN_writeTxEventFIFOAck ( MCAN_Regs *  mcan,
uint32_t  idx 
)

This API will write Event FIFO Acknowledge Index.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]idxEvent FIFO Acknowledge Index
Returns
status Acknowledgement Status.

§ DL_MCAN_eccForceError()

void DL_MCAN_eccForceError ( MCAN_Regs *  mcan,
const DL_MCAN_ECCErrForceParams eccErr 
)

This API will Force Error on ECC.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]eccErrForce Error on ECC configuration. DL_MCAN_ECCErrForceParams.
Returns
status Configuration status.

§ DL_MCAN_eccGetErrorStatus()

void DL_MCAN_eccGetErrorStatus ( MCAN_Regs *  mcan,
DL_MCAN_ECCErrStatus eccErr 
)

This API will return ECC Error status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]eccErrECC error status. DL_MCAN_ECCErrStatus.
Returns
None.

§ DL_MCAN_eccClearErrorStatus()

void DL_MCAN_eccClearErrorStatus ( MCAN_Regs *  mcan,
uint32_t  errType 
)

This API is used to clear the ECC Error status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]errTypeError type to clear status. One of DL_MCAN_ECC_ERR_TYPE.
Returns
None.

§ DL_MCAN_eccWriteEOI()

void DL_MCAN_eccWriteEOI ( MCAN_Regs *  mcan,
uint32_t  errType 
)

This API is used to write End of Interrupt for ECC interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]errTypeInterrupt to enable. One of DL_MCAN_ECC_ERR_TYPE.
Returns
None.

§ DL_MCAN_eccEnableIntr()

void DL_MCAN_eccEnableIntr ( MCAN_Regs *  mcan,
uint32_t  errType,
bool  enable 
)

This API is used to enable ECC interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]errTypeInterrupt to enable. One of DL_MCAN_ECC_ERR_TYPE.
[in]enableECC Interrupt is enabled if it is TRUE. ECC Interrupt is disabled if it is FALSE.
Returns
None.

§ DL_MCAN_eccGetIntrStatus()

uint32_t DL_MCAN_eccGetIntrStatus ( MCAN_Regs *  mcan,
uint32_t  errType 
)

This API is used to get ECC interrupt status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]errTypeInterrupt status to read. One of DL_MCAN_ECC_ERR_TYPE.
Returns
None.

§ DL_MCAN_eccClearIntrStatus()

void DL_MCAN_eccClearIntrStatus ( MCAN_Regs *  mcan,
uint32_t  errType 
)

This API is used to clear ECC interrupt status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]errTypeInterrupt status to clear. One of DL_MCAN_ECC_ERR_TYPE.
Returns
None.

§ DL_MCAN_extTSCounterConfig()

void DL_MCAN_extTSCounterConfig ( MCAN_Regs *  mcan,
uint32_t  prescalar 
)

This API will configure external timestamp counter for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]prescalarTimestamp Counter Prescaler. Range:[0x0-0xFFFFFF]
Returns
None.
Note
Actual value programmed prescalar values is (prescalar - 1).

§ DL_MCAN_extTSCounterEnable()

void DL_MCAN_extTSCounterEnable ( MCAN_Regs *  mcan,
bool  enable 
)

This API will enable/disable fast external time stamp counter for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]enableExternal TS is enabled if it is TRUE. External TS is disabled if it is FALSE.
Returns
None.

§ DL_MCAN_extTSEnableIntr()

void DL_MCAN_extTSEnableIntr ( MCAN_Regs *  mcan,
bool  enable 
)

This API will enable/disable External TimeStamp Counter Overflow Interrupt for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]enableExternal TimeStamp Counter Overflow Interrupt is enabled if it is TRUE. External TimeStamp Counter Overflow Interrupt is disabled if it is FALSE.
Returns
None.

§ DL_MCAN_extTSWriteEOI()

void DL_MCAN_extTSWriteEOI ( MCAN_Regs *  mcan)

This API is used to write End of Interrupt for External TimeStamp Counter Overflow Interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
None.

§ DL_MCAN_extTSGetUnservicedIntrCount()

uint32_t DL_MCAN_extTSGetUnservicedIntrCount ( MCAN_Regs *  mcan)

This API returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter. Maximum number of unserviced interrupts is 0xF.

§ DL_MCAN_getRevisionId()

void DL_MCAN_getRevisionId ( MCAN_Regs *  mcan,
DL_MCAN_RevisionId revId 
)

This API is used get the MCAN revision ID.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]revIdContains Revision ID of MCAN module. DL_MCAN_RevisionId.
Returns
None.

§ DL_MCAN_getClockStopAck()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Return Clock Stop Acknowledgement status. Return '1' if M_CAN is set in power down mode else returns '0'.

§ DL_MCAN_extTSSetRawStatus()

void DL_MCAN_extTSSetRawStatus ( MCAN_Regs *  mcan)

This API will set External TimeStamp Counter Overflow Interrupt Raw status for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
None.

§ DL_MCAN_extTSClearRawStatus()

void DL_MCAN_extTSClearRawStatus ( MCAN_Regs *  mcan)

This API will clear External TimeStamp Counter Overflow Interrupt raw status for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
None.

§ DL_MCAN_getRxPinState()

uint32_t DL_MCAN_getRxPinState ( MCAN_Regs *  mcan)

This API will return Rx pin state of MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
state MCAN Rx Pin State. 0= The CAN bus is dominant 1= The CAN bus is recessive

§ DL_MCAN_setTxPinState()

void DL_MCAN_setTxPinState ( MCAN_Regs *  mcan,
uint32_t  state 
)

This API will set Tx pin state of MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]stateMCAN Tx Pin State. 00= Reset value 01= Sample Point can be monitored at tx pin 10= The CAN bus is dominant 11= The CAN bus is recessive other= It will treated as 11.
Returns
None.

§ DL_MCAN_getTxPinState()

uint32_t DL_MCAN_getTxPinState ( MCAN_Regs *  mcan)

This API will return Tx pin state of MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
state MCAN Tx Pin State. 00= Reset value 01= Sample Point can be monitored at tx pin 10= The CAN bus is dominant 11= The CAN bus is recessive

§ DL_MCAN_getTSCounterVal()

uint32_t DL_MCAN_getTSCounterVal ( MCAN_Regs *  mcan)

This API will return current timestamp counter value.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
val Current Timestamp counter value.

§ DL_MCAN_getClkStopAck()

uint32_t DL_MCAN_getClkStopAck ( MCAN_Regs *  mcan)

This API will return clock stop acknowledgement for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
ack Clock Stop Acknowledge 0= No clock stop acknowledged 1= M_CAN may be set in power down

§ DL_MCAN_getBitTime()

void DL_MCAN_getBitTime ( MCAN_Regs *  mcan,
DL_MCAN_BitTimingParams configParams 
)

This API will get the configured bit timings for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]configParamsConfiguration parameters for MCAN bit timing. DL_MCAN_BitTimingParams.
Returns
None.

§ DL_MCAN_resetTSCounter()

void DL_MCAN_resetTSCounter ( MCAN_Regs *  mcan)

This API will reset timestamp counter value.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
None.

§ DL_MCAN_getTOCounterVal()

uint32_t DL_MCAN_getTOCounterVal ( MCAN_Regs *  mcan)

This API will return current time-out counter value.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
val Current Time-out counter value.

§ DL_MCAN_eccAggrGetRevisionId()

void DL_MCAN_eccAggrGetRevisionId ( MCAN_Regs *  mcan,
DL_MCAN_ECCAggrRevisionId revId 
)

This API is used get the ECC AGGR revision ID.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]revIdContains Revision ID of ECC AGGR. DL_MCAN_ECCAggrRevisionId.
Returns
None.

§ DL_MCAN_eccWrapGetRevisionId()

void DL_MCAN_eccWrapGetRevisionId ( MCAN_Regs *  mcan,
DL_MCAN_ECCWrapRevisionId revId 
)

This API is used get the ECC Wrapper revision ID.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]revIdContains Revision ID of ECC Wrapper DL_MCAN_ECCWrapRevisionId.
Returns
None.

§ DL_MCAN_extTSIsIntrEnable()

bool DL_MCAN_extTSIsIntrEnable ( MCAN_Regs *  mcan)

This API returns External TimeStamp Counter Overflow Interrupt enable status for MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
status Returns TRUE if External TimeStamp Counter Overflow Interrupt is enabled. Else returns FALSE.

§ DL_MCAN_getEndianVal()

uint32_t DL_MCAN_getEndianVal ( MCAN_Regs *  mcan)

This function return endianness value of MCAN module.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Return values
valEndianness value. (0x87654321)

§ DL_MCAN_getExtIDANDMask()

uint32_t DL_MCAN_getExtIDANDMask ( MCAN_Regs *  mcan)

This API will get the configured Extended ID AND Mask.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
idMask Extended ID AND Mask.

§ DL_MCAN_enablePower()

__STATIC_INLINE void DL_MCAN_enablePower ( MCAN_Regs *  mcan)

Enables power on MCAN module.

Parameters
mcanPointer to the register overlay for the peripheral

§ DL_MCAN_disablePower()

__STATIC_INLINE void DL_MCAN_disablePower ( MCAN_Regs *  mcan)

Disables power on mcan module.

Parameters
mcanPointer to the register overlay for the peripheral

§ DL_MCAN_isPowerEnabled()

__STATIC_INLINE bool DL_MCAN_isPowerEnabled ( MCAN_Regs *  mcan)

Returns if power on mcan module.

Parameters
mcanPointer to the register overlay for the peripheral
Returns
true if power is enabled
false if power is disabled

§ DL_MCAN_reset()

__STATIC_INLINE void DL_MCAN_reset ( MCAN_Regs *  mcan)

Resets mcan peripheral.

Parameters
mcanPointer to the register overlay for the peripheral

§ DL_MCAN_isReset()

__STATIC_INLINE bool DL_MCAN_isReset ( MCAN_Regs *  mcan)

Returns if mcan peripheral was reset.

Parameters
mcanPointer to the register overlay for the peripheral
Returns
true if peripheral was reset
false if peripheral wasn't reset

§ DL_MCAN_enableInterrupt()

__STATIC_INLINE void DL_MCAN_enableInterrupt ( MCAN_Regs *  mcan,
uint32_t  interruptMask 
)

Enable MCAN interrupts.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]interruptMaskBit mask of interrupts to enable. Bitwise OR of DL_MCAN_INTERRUPT.

§ DL_MCAN_disableInterrupt()

__STATIC_INLINE void DL_MCAN_disableInterrupt ( MCAN_Regs *  mcan,
uint32_t  interruptMask 
)

Disable MCAN interrupts.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]interruptMaskBit mask of interrupts to disable. Bitwise OR of mcan interrupts.

§ DL_MCAN_getEnabledInterrupts()

__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterrupts ( MCAN_Regs *  mcan,
uint32_t  interruptMask 
)

Check which MCAN interrupts are enabled.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]interruptMaskBit mask of interrupts to check. Bitwise OR of DL_MCAN_INTERRUPT.
Returns
Which of the requested MCAN interrupts are enabled
Return values
BitwiseOR of DL_MCAN_INTERRUPT values

§ DL_MCAN_getEnabledInterruptStatus()

__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterruptStatus ( MCAN_Regs *  mcan,
uint32_t  interruptMask 
)

Check interrupt flag of enabled MCAN interrupts.

Checks if any of the MCAN interrupts that were previously enabled are pending.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]interruptMaskBit mask of interrupts to check. Bitwise OR of DL_MCAN_INTERRUPT.
Returns
Which of the requested MCAN interrupts are pending
Return values
BitwiseOR of DL_MCAN_INTERRUPT values

§ DL_MCAN_getRawInterruptStatus()

__STATIC_INLINE uint32_t DL_MCAN_getRawInterruptStatus ( MCAN_Regs *  mcan,
uint32_t  interruptMask 
)

Check interrupt flag of any MCAN interrupt.

Checks if any of the MCAN interrupts are pending. Interrupts do not have to be previously enabled.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]interruptMaskBit mask of interrupts to check. Bitwise OR of DL_MCAN_INTERRUPT.
Returns
Which of the requested MCAN interrupts are pending
Return values
BitwiseOR of DL_MCAN_INTERRUPT values

§ DL_MCAN_getPendingInterrupt()

__STATIC_INLINE DL_MCAN_IIDX DL_MCAN_getPendingInterrupt ( MCAN_Regs *  mcan)

Get highest priority pending MCAN interrupt.

Checks if any of the MCAN interrupts are pending. Interrupts do not have to be previously enabled.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
The highest priority pending MCAN interrupt. One of DL_MCAN_IIDX

§ DL_MCAN_clearInterruptStatus()

__STATIC_INLINE void DL_MCAN_clearInterruptStatus ( MCAN_Regs *  mcan,
uint32_t  interruptMask 
)

Clear pending MCAN interrupts.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]interruptMaskBit mask of interrupts to clear. Bitwise OR of DL_MCAN_INTERRUPT.

§ DL_MCAN_isModuleClockEnabled()

__STATIC_INLINE bool DL_MCAN_isModuleClockEnabled ( MCAN_Regs *  mcan)

Checks if the MCAN module clock request is enabled.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
If the MCAN module clock request is enabled

§ DL_MCAN_enableModuleClock()

__STATIC_INLINE void DL_MCAN_enableModuleClock ( MCAN_Regs *  mcan)

Enables the MCAN functional module clock.

Parameters
[in]mcanPointer to the register overlay for the peripheral

§ DL_MCAN_disableModuleClock()

__STATIC_INLINE void DL_MCAN_disableModuleClock ( MCAN_Regs *  mcan)

Disables the MCAN functional module clock.

Parameters
[in]mcanPointer to the register overlay for the peripheral

§ DL_MCAN_getModuleClockDivider()

__STATIC_INLINE uint32_t DL_MCAN_getModuleClockDivider ( MCAN_Regs *  mcan)

Gets the MCAN functional module clock divide ratio.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
The current clock divide ratio, one of DL_MCAN_CLOCK_DIVIDE

§ DL_MCAN_setModuleClockDivider()

__STATIC_INLINE void DL_MCAN_setModuleClockDivider ( MCAN_Regs *  mcan,
uint32_t  clkdiv 
)

Configures clock divide settings for the MCAN functional module clock.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]clkdivThe desired clock divide ratio, one of DL_MCAN_CLOCK_DIVIDE

References DL_Common_updateReg().

§ DL_MCAN_isClockStopGateRequestEnabled()

__STATIC_INLINE bool DL_MCAN_isClockStopGateRequestEnabled ( MCAN_Regs *  mcan)

Checks if the MCAN clock gating request is enabled.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
If the the MCAN module clock gating request is enabled/disabled

§ DL_MCAN_enableClockStopGateRequest()

__STATIC_INLINE void DL_MCAN_enableClockStopGateRequest ( MCAN_Regs *  mcan)

Enables the MCAN clock gating request.

Parameters
[in]mcanPointer to the register overlay for the peripheral

References DL_Common_updateReg().

§ DL_MCAN_disableClockStopGateRequest()

__STATIC_INLINE void DL_MCAN_disableClockStopGateRequest ( MCAN_Regs *  mcan)

Disables the MCAN clock gating request.

Parameters
[in]mcanPointer to the register overlay for the peripheral

References DL_Common_updateReg().

§ DL_MCAN_isClockStopWakeupInterruptEnabled()

__STATIC_INLINE bool DL_MCAN_isClockStopWakeupInterruptEnabled ( MCAN_Regs *  mcan)

Checks if the MCAN clock stop wakeup interrupt is enabled.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
If the the MCAN module clock wakeup interrupt is enabled/disabled

§ DL_MCAN_enableClockStopWakeupInterrupt()

__STATIC_INLINE void DL_MCAN_enableClockStopWakeupInterrupt ( MCAN_Regs *  mcan)

Enables the MCAN clock stop wakeup interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral

References DL_Common_updateReg().

§ DL_MCAN_disableClockStopWakeupInterrupt()

__STATIC_INLINE void DL_MCAN_disableClockStopWakeupInterrupt ( MCAN_Regs *  mcan)

Disables the MCAN clock stop wakeup interrupt.

Parameters
[in]mcanPointer to the register overlay for the peripheral

References DL_Common_updateReg().

§ DL_MCAN_isGlitchFilterWakeupEnabled()

__STATIC_INLINE bool DL_MCAN_isGlitchFilterWakeupEnabled ( MCAN_Regs *  mcan)

Checks if the glitch filter on MCAN RXD input is enabled.

When the glitch filter is enabled in MCAN RXD input, it wakes up the MCAN controller to exit clock gating

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
If the the glitch filter on MCAN RXD input is enabled/disabled

§ DL_MCAN_enableGlitchFilterWakeup()

__STATIC_INLINE void DL_MCAN_enableGlitchFilterWakeup ( MCAN_Regs *  mcan)

Enables the glitch filter on MCAN RXD input.

When the glitch filter is enabled in MCAN RXD input, it wakes up the MCAN controller to exit clock gating

Parameters
[in]mcanPointer to the register overlay for the peripheral

References DL_Common_updateReg().

§ DL_MCAN_disableGlitchFilterWakeup()

__STATIC_INLINE void DL_MCAN_disableGlitchFilterWakeup ( MCAN_Regs *  mcan)

Disables the glitch filter on MCAN RXD input.

When the glitch filter is enabled in MCAN RXD input, it wakes up the MCAN controller to exit clock gating

Parameters
[in]mcanPointer to the register overlay for the peripheral

References DL_Common_updateReg().

§ DL_MCAN_getClockStopAcknowledgeStatus()

__STATIC_INLINE bool DL_MCAN_getClockStopAcknowledgeStatus ( MCAN_Regs *  mcan)

Gets the clock stop acknowledge status.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
The clock stop acknowledge status

§ DL_MCAN_getClockStopHardwareOverrideStatus()

__STATIC_INLINE bool DL_MCAN_getClockStopHardwareOverrideStatus ( MCAN_Regs *  mcan)

Gets the clock stop hardware override status.

This bit indicates when the MCANSS_CLKCTL.STOPREQ bit has been cleared by HW when a clock-stop wake-up event via CAN RX activity is triggered

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
The clock stop hardware override status

§ DL_MCAN_getControllerClockRequestStatus()

__STATIC_INLINE bool DL_MCAN_getControllerClockRequestStatus ( MCAN_Regs *  mcan)

Gets the status of MCAN controller clock request from GPRCM.

Parameters
[in]mcanPointer to the register overlay for the peripheral
Returns
The status of the MCAN controller clock request from GPRCM

References DL_MCAN_restoreConfiguration(), and DL_MCAN_saveConfiguration().

§ DL_MCAN_saveConfiguration()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]ptrConfiguration backup setup structure. See DL_MCAN_backupConfig.
Return values
FALSEif a configuration already exists in ptr (will not be overwritten). TRUE if a configuration was successfully saved

Referenced by DL_MCAN_getControllerClockRequestStatus().

§ DL_MCAN_restoreConfiguration()

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.

Parameters
[in]mcanPointer to the register overlay for the peripheral
[in]ptrConfiguration backup setup structure. See DL_MCAN_backupConfig.
Return values
FALSEif a configuration does not exist in ptr (will not be loaded). TRUE if a configuration successfully loaded

Referenced by DL_MCAN_getControllerClockRequestStatus().

© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale