Driverlib MCAN API
Module: Driverlib (AM13E230X) APIs
Structures
Name |
|
|---|---|
struct |
DL_MCAN_ClockConfig |
struct |
DL_MCAN_BitTimingParams |
struct |
DL_MCAN_TDCConfig |
struct |
DL_MCAN_GlobalFiltConfig |
struct |
DL_MCAN_InitParams |
struct |
DL_MCAN_ConfigParams |
struct |
DL_MCAN_ErrCntStatus |
struct |
DL_MCAN_ProtocolStatus |
struct |
DL_MCAN_MsgRAMConfigParams |
struct |
DL_MCAN_HighPriorityMsgInfo |
struct |
DL_MCAN_RxNewDataStatus |
struct |
DL_MCAN_RxFIFOStatus |
struct |
DL_MCAN_TxFIFOStatus |
struct |
DL_MCAN_TxEventFIFOStatus |
struct |
DL_MCAN_ECCErrForceParams |
struct |
DL_MCAN_ECCErrStatus |
struct |
DL_MCAN_RevisionId |
struct |
DL_MCAN_ECCAggrRevisionId |
struct |
DL_MCAN_ECCConfigParams |
struct |
DL_MCAN_ECCWrapRevisionId |
struct |
DL_MCAN_TxBufElement |
struct |
DL_MCAN_RxBufElement |
struct |
DL_MCAN_TxEventFIFOElement |
struct |
DL_MCAN_StdMsgIDFilterElement |
struct |
DL_MCAN_ExtMsgIDFilterElement |
struct |
DL_MCAN_backupConfig |
Types
Name |
|
|---|---|
enum |
DL_MCAN_INSTANCE { DL_MCAN_INSTANCE_0 = SYSCTL_SYSSTATUS_MCAN0READY_MASK} |
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 |
DL_MCAN_INTR_LINE_NUM { DL_MCAN_INTR_LINE_NUM_0 = 0U, DL_MCAN_INTR_LINE_NUM_1 = 1U} |
enum |
DL_MCAN_ID_TYPE { DL_MCAN_ID_TYPE_11_BIT = 0U, DL_MCAN_ID_TYPE_29_BIT = 1U} |
enum |
DL_MCAN_OPERATION_MODE { DL_MCAN_OPERATION_MODE_NORMAL = 0U, DL_MCAN_OPERATION_MODE_SW_INIT = 1U} |
enum |
DL_MCAN_MEM_TYPE { DL_MCAN_MEM_TYPE_BUF = 0U, DL_MCAN_MEM_TYPE_FIFO = 1U} |
enum |
DL_MCAN_RX_FIFO_NUM { DL_MCAN_RX_FIFO_NUM_0 = 0U, DL_MCAN_RX_FIFO_NUM_1 = 1U} |
enum |
DL_MCAN_PIN_TYPE { DL_MCAN_PIN_TYPE_RX = 0U, DL_MCAN_PIN_TYPE_TX = 1U} |
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 |
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 |
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 |
DL_MCAN_ECC_ERR_TYPE { DL_MCAN_ECC_ERR_TYPE_SEC = 0U, DL_MCAN_ECC_ERR_TYPE_DED = 1U} |
enum |
DL_MCAN_LPBK_MODE { DL_MCAN_LPBK_MODE_INTERNAL = 0U, DL_MCAN_LPBK_MODE_EXTERNAL = 1U} |
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 |
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 |
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
Name |
|
|---|---|
bool |
DL_MCAN_isReady(DL_MCAN_INSTANCE instance) |
void |
DL_MCAN_setClockConfig(MCAN_Regs * mcan, const DL_MCAN_ClockConfig * config) |
void |
DL_MCAN_getClockConfig(MCAN_Regs * mcan, DL_MCAN_ClockConfig * config) |
bool |
DL_MCAN_isInReset(const MCAN_Regs * mcan) |
bool |
DL_MCAN_isFDOpEnable(const MCAN_Regs * mcan) |
bool |
DL_MCAN_isMemInitDone(const MCAN_Regs * mcan) |
void |
DL_MCAN_setOpMode(MCAN_Regs * mcan, uint32_t mode) |
uint32_t |
DL_MCAN_getOpMode(const MCAN_Regs * mcan) |
int32_t |
DL_MCAN_init(MCAN_Regs * mcan, const DL_MCAN_InitParams * initParams) |
int32_t |
DL_MCAN_setTDC(MCAN_Regs * mcan, bool enable, uint32_t tdco, uint32_t tdcf) |
int32_t |
DL_MCAN_config(MCAN_Regs * mcan, const DL_MCAN_ConfigParams * configParams) |
void |
DL_MCAN_eccConfig(MCAN_Regs * mcan, const DL_MCAN_ECCConfigParams * configParams) |
int32_t |
DL_MCAN_setBitTime(MCAN_Regs * mcan, const DL_MCAN_BitTimingParams * configParams) |
int32_t |
DL_MCAN_msgRAMConfig(MCAN_Regs * mcan, const DL_MCAN_MsgRAMConfigParams * msgRAMConfigParams) |
int32_t |
DL_MCAN_setExtIDAndMask(MCAN_Regs * mcan, uint32_t idMask) |
void |
DL_MCAN_writeMsgRam(MCAN_Regs * mcan, uint32_t memType, uint32_t bufNum, const DL_MCAN_TxBufElement * elem) |
int32_t |
DL_MCAN_TXBufAddReq(MCAN_Regs * mcan, uint32_t bufNum) |
void |
DL_MCAN_getNewDataStatus(const MCAN_Regs * mcan, DL_MCAN_RxNewDataStatus * newDataStatus) |
void |
DL_MCAN_clearNewDataStatus(MCAN_Regs * mcan, const DL_MCAN_RxNewDataStatus * newDataStatus) |
void |
DL_MCAN_readMsgRam(const MCAN_Regs * mcan, uint32_t memType, uint32_t bufNum, uint32_t fifoNum, DL_MCAN_RxBufElement * elem) |
void |
DL_MCAN_readTxEventFIFO(const MCAN_Regs * mcan, DL_MCAN_TxEventFIFOElement * txEventElem) |
void |
DL_MCAN_addStdMsgIDFilter(MCAN_Regs * mcan, uint32_t filtNum, const DL_MCAN_StdMsgIDFilterElement * elem) |
void |
DL_MCAN_addExtMsgIDFilter(MCAN_Regs * mcan, uint32_t filtNum, const DL_MCAN_ExtMsgIDFilterElement * elem) |
void |
DL_MCAN_lpbkModeEnable(MCAN_Regs * mcan, uint32_t lpbkMode, bool enable) |
void |
DL_MCAN_getErrCounters(const MCAN_Regs * mcan, DL_MCAN_ErrCntStatus * errCounter) |
void |
DL_MCAN_getProtocolStatus(const MCAN_Regs * mcan, DL_MCAN_ProtocolStatus * protStatus) |
void |
DL_MCAN_enableIntr(MCAN_Regs * mcan, uint32_t intrMask, bool enable) |
void |
DL_MCAN_selectIntrLine(MCAN_Regs * mcan, uint32_t intrMask, uint32_t lineNum) |
uint32_t |
DL_MCAN_getIntrLineSelectStatus(const MCAN_Regs * mcan) |
void |
DL_MCAN_enableIntrLine(MCAN_Regs * mcan, uint32_t lineNum, bool enable) |
uint32_t |
DL_MCAN_getIntrStatus(const MCAN_Regs * mcan) |
void |
DL_MCAN_clearIntrStatus(MCAN_Regs * mcan, uint32_t intrMask, DL_MCAN_INTR_SRC_MCAN eoi) |
void |
DL_MCAN_getHighPriorityMsgStatus(const MCAN_Regs * mcan, DL_MCAN_HighPriorityMsgInfo * hpm) |
void |
DL_MCAN_getRxFIFOStatus(const MCAN_Regs * mcan, DL_MCAN_RxFIFOStatus * fifoStatus) |
int32_t |
DL_MCAN_writeRxFIFOAck(MCAN_Regs * mcan, uint32_t fifoNum, uint32_t idx) |
void |
DL_MCAN_getTxFIFOQueStatus(const MCAN_Regs * mcan, DL_MCAN_TxFIFOStatus * fifoStatus) |
uint32_t |
DL_MCAN_getTxBufReqPend(const MCAN_Regs * mcan) |
int32_t |
DL_MCAN_txBufCancellationReq(MCAN_Regs * mcan, uint32_t buffNum) |
uint32_t |
DL_MCAN_getTxBufTransmissionStatus(const MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_txBufCancellationStatus(const MCAN_Regs * mcan) |
int32_t |
DL_MCAN_TXBufTransIntrEnable(MCAN_Regs * mcan, uint32_t bufNum, bool enable) |
int32_t |
DL_MCAN_getTxBufCancellationIntrEnable(MCAN_Regs * mcan, uint32_t bufNum, bool enable) |
void |
DL_MCAN_addClockStopRequest(MCAN_Regs * mcan, bool enable) |
void |
DL_MCAN_getTxEventFIFOStatus(const MCAN_Regs * mcan, DL_MCAN_TxEventFIFOStatus * fifoStatus) |
int32_t |
DL_MCAN_writeTxEventFIFOAck(MCAN_Regs * mcan, uint32_t idx) |
void |
DL_MCAN_eccForceError(MCAN_Regs * mcan, const DL_MCAN_ECCErrForceParams * eccErr) |
void |
DL_MCAN_eccGetErrorStatus(MCAN_Regs * mcan, DL_MCAN_ECCErrStatus * eccErr) |
void |
DL_MCAN_eccClearErrorStatus(MCAN_Regs * mcan, uint32_t errType) |
void |
DL_MCAN_eccWriteEOI(MCAN_Regs * mcan, uint32_t errType) |
void |
DL_MCAN_eccEnableIntr(MCAN_Regs * mcan, uint32_t errType, bool enable) |
uint32_t |
DL_MCAN_eccGetIntrStatus(const MCAN_Regs * mcan, uint32_t errType) |
void |
DL_MCAN_eccClearIntrStatus(MCAN_Regs * mcan, uint32_t errType) |
void |
DL_MCAN_extTSCounterConfig(MCAN_Regs * mcan, uint32_t prescalar) |
void |
DL_MCAN_extTSCounterEnable(MCAN_Regs * mcan, bool enable) |
void |
DL_MCAN_extTSEnableIntr(MCAN_Regs * mcan, bool enable) |
void |
DL_MCAN_extTSWriteEOI(MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_extTSGetUnservicedIntrCount(const MCAN_Regs * mcan) |
void |
DL_MCAN_getRevisionId(const MCAN_Regs * mcan, DL_MCAN_RevisionId * revId) |
uint32_t |
DL_MCAN_getClockStopAck(const MCAN_Regs * mcan) |
void |
DL_MCAN_extTSSetRawStatus(MCAN_Regs * mcan) |
void |
DL_MCAN_extTSClearRawStatus(MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_getRxPinState(const MCAN_Regs * mcan) |
void |
DL_MCAN_setTxPinState(MCAN_Regs * mcan, uint32_t state) |
uint32_t |
DL_MCAN_getTxPinState(const MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_getTSCounterVal(const MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_getClkStopAck(const MCAN_Regs * mcan) |
void |
DL_MCAN_getBitTime(const MCAN_Regs * mcan, DL_MCAN_BitTimingParams * configParams) |
void |
DL_MCAN_resetTSCounter(MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_getTOCounterVal(const MCAN_Regs * mcan) |
void |
DL_MCAN_eccAggrGetRevisionId(const MCAN_Regs * mcan, DL_MCAN_ECCAggrRevisionId * revId) |
void |
DL_MCAN_eccWrapGetRevisionId(MCAN_Regs * mcan, DL_MCAN_ECCWrapRevisionId * revId) |
bool |
DL_MCAN_extTSIsIntrEnable(const MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_getEndianVal(const MCAN_Regs * mcan) |
uint32_t |
DL_MCAN_getExtIDANDMask(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_enablePower(MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_disablePower(MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_isPowerEnabled(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_reset(MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_isReset(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_enableInterrupt(MCAN_Regs * mcan, uint32_t interruptMask) |
__STATIC_INLINE void |
DL_MCAN_disableInterrupt(MCAN_Regs * mcan, uint32_t interruptMask) |
__STATIC_INLINE uint32_t |
DL_MCAN_getEnabledInterrupts(const MCAN_Regs * mcan, uint32_t interruptMask) |
__STATIC_INLINE uint32_t |
DL_MCAN_getEnabledInterruptStatus(const MCAN_Regs * mcan, uint32_t interruptMask) |
__STATIC_INLINE uint32_t |
DL_MCAN_getRawInterruptStatus(const MCAN_Regs * mcan, uint32_t interruptMask) |
__STATIC_INLINE DL_MCAN_IIDX |
DL_MCAN_getPendingInterrupt(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_clearInterruptStatus(MCAN_Regs * mcan, uint32_t interruptMask) |
__STATIC_INLINE bool |
DL_MCAN_isModuleClockEnabled(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_enableModuleClock(MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_disableModuleClock(MCAN_Regs * mcan) |
__STATIC_INLINE uint32_t |
DL_MCAN_getModuleClockDivider(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_setModuleClockDivider(MCAN_Regs * mcan, uint32_t clkdiv) |
__STATIC_INLINE bool |
DL_MCAN_isClockStopGateRequestEnabled(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_enableClockStopGateRequest(MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_disableClockStopGateRequest(MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_isClockStopWakeupInterruptEnabled(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_enableClockStopWakeupInterrupt(MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_disableClockStopWakeupInterrupt(MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_isGlitchFilterWakeupEnabled(const MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_enableGlitchFilterWakeup(MCAN_Regs * mcan) |
__STATIC_INLINE void |
DL_MCAN_disableGlitchFilterWakeup(MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_getClockStopAcknowledgeStatus(const MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_getClockStopHardwareOverrideStatus(const MCAN_Regs * mcan) |
__STATIC_INLINE bool |
DL_MCAN_getControllerClockRequestStatus(const MCAN_Regs * mcan) |
bool |
DL_MCAN_saveConfiguration(const MCAN_Regs * mcan, DL_MCAN_backupConfig * ptr) |
bool |
DL_MCAN_restoreConfiguration(MCAN_Regs * mcan, DL_MCAN_backupConfig * ptr) |
Defines
Name |
|
|---|---|
DL_MCAN_INTERRUPT_ARA |
|
DL_MCAN_INTERRUPT_PED |
|
DL_MCAN_INTERRUPT_PEA |
|
DL_MCAN_INTERRUPT_WDI |
|
DL_MCAN_INTERRUPT_BO |
|
DL_MCAN_INTERRUPT_EW |
|
DL_MCAN_INTERRUPT_EP |
|
DL_MCAN_INTERRUPT_ELO |
|
DL_MCAN_INTERRUPT_BEU |
|
DL_MCAN_INTERRUPT_DRX |
|
DL_MCAN_INTERRUPT_TOO |
|
DL_MCAN_INTERRUPT_MRAF |
|
DL_MCAN_INTERRUPT_TSW |
|
DL_MCAN_INTERRUPT_TEFL |
|
DL_MCAN_INTERRUPT_TEFF |
|
DL_MCAN_INTERRUPT_TEFW |
|
DL_MCAN_INTERRUPT_TEFN |
|
DL_MCAN_INTERRUPT_TFE |
|
DL_MCAN_INTERRUPT_TCF |
|
DL_MCAN_INTERRUPT_TC |
|
DL_MCAN_INTERRUPT_HPM |
|
DL_MCAN_INTERRUPT_RF1L |
|
DL_MCAN_INTERRUPT_RF1F |
|
DL_MCAN_INTERRUPT_RF1W |
|
DL_MCAN_INTERRUPT_RF1N |
|
DL_MCAN_INTERRUPT_RF0L |
|
DL_MCAN_INTERRUPT_RF0F |
|
DL_MCAN_INTERRUPT_RF0W |
|
DL_MCAN_INTERRUPT_RF0N |
|
DL_MCAN_INTERRUPT_WAKEUP |
|
DL_MCAN_INTERRUPT_TIMESTAMP_OVERFLOW |
|
DL_MCAN_INTERRUPT_DOUBLE_ERROR_DETECTION |
|
DL_MCAN_INTERRUPT_SINGLE_ERROR_CORRECTION |
|
DL_MCAN_INTERRUPT_LINE1 |
|
DL_MCAN_INTERRUPT_LINE0 |
|
DL_MCAN_INTR_SRC_RX_FIFO0_NEW_MSG |
|
DL_MCAN_INTR_SRC_RX_FIFO0_WATERMARK |
|
DL_MCAN_INTR_SRC_RX_FIFO0_FULL |
|
DL_MCAN_INTR_SRC_RX_FIFO0_MSG_LOST |
|
DL_MCAN_INTR_SRC_RX_FIFO1_NEW_MSG |
|
DL_MCAN_INTR_SRC_RX_FIFO1_WATERMARK |
|
DL_MCAN_INTR_SRC_RX_FIFO1_FULL |
|
DL_MCAN_INTR_SRC_RX_FIFO1_MSG_LOST |
|
DL_MCAN_INTR_SRC_HIGH_PRIO_MSG |
|
DL_MCAN_INTR_SRC_TRANS_COMPLETE |
|
DL_MCAN_INTR_SRC_TRANS_CANCEL_FINISH |
|
DL_MCAN_INTR_SRC_TX_FIFO_EMPTY |
|
DL_MCAN_INTR_SRC_TX_EVT_FIFO_NEW_ENTRY |
|
DL_MCAN_INTR_SRC_TX_EVT_FIFO_WATERMARK |
|
DL_MCAN_INTR_SRC_TX_EVT_FIFO_FULL |
|
DL_MCAN_INTR_SRC_TX_EVT_FIFO_ELEM_LOST |
|
DL_MCAN_INTR_SRC_TIMESTAMP_WRAPAROUND |
|
DL_MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE |
|
DL_MCAN_INTR_SRC_TIMEOUT |
|
DL_MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG |
|
DL_MCAN_INTR_SRC_BIT_ERR_UNCORRECTED |
|
DL_MCAN_INTR_SRC_ERR_LOG_OVRFLW |
|
DL_MCAN_INTR_SRC_ERR_PASSIVE |
|
DL_MCAN_INTR_SRC_WARNING_STATUS |
|
DL_MCAN_INTR_SRC_BUS_OFF_STATUS |
|
DL_MCAN_INTR_SRC_WATCHDOG |
|
DL_MCAN_INTR_SRC_PROTOCOL_ERR_ARB |
|
DL_MCAN_INTR_SRC_PROTOCOL_ERR_DATA |
|
DL_MCAN_INTR_SRC_RES_ADDR_ACCESS |
|
DL_MCAN_INTR_MASK_ALL |
|
DL_MCAN_MAX_PAYLOAD_BYTES |
|
DL_MCAN_DBTP_DSJW_MAX |
|
DL_MCAN_DBTP_DTSEG2_MAX |
|
DL_MCAN_DBTP_DTSEG1_MAX |
|
DL_MCAN_DBTP_DBRP_MAX |
|
DL_MCAN_NBTP_NSJW_MAX |
|
DL_MCAN_NBTP_NTSEG2_MAX |
|
DL_MCAN_NBTP_NTSEG1_MAX |
|
DL_MCAN_NBTP_NBRP_MAX |
|
DL_MCAN_RWD_WDC_MAX |
|
DL_MCAN_TDCR_TDCF_MAX |
|
DL_MCAN_TDCR_TDCO_MAX |
|
DL_MCAN_XIDAM_EIDM_MAX |
|
DL_MCAN_TSCC_TCP_MAX |
|
DL_MCAN_TOCC_TOP_MAX |
Types Documentation
enum DL_MCAN_INSTANCE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_INSTANCE_0 |
SYSCTL_SYSSTATUS_MCAN0READY_MASK |
Selects CANFD instance 0 of device |
Enum to select the MCAN instance.
enum DL_MCAN_FCLK_DIV
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_FCLK_DIV_1 |
MCAN_CLKDIV_RATIO_DIV_BY_1_ |
Clock divider 1 |
DL_MCAN_FCLK_DIV_2 |
MCAN_CLKDIV_RATIO_DIV_BY_2_ |
Clock divider 2 |
DL_MCAN_FCLK_DIV_4 |
MCAN_CLKDIV_RATIO_DIV_BY_4_ |
Clock divider 4 |
Enum to select CANCLK divider.
enum DL_MCAN_INTR_LINE_NUM
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_INTR_LINE_NUM_0 |
0U |
MCAN interrupt line 0 |
DL_MCAN_INTR_LINE_NUM_1 |
1U |
MCAN interrupt line 1 |
Enum to select the MCAN interrupt lines.
enum DL_MCAN_ID_TYPE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_ID_TYPE_11_BIT |
0U |
11bit MCAN Identifier |
DL_MCAN_ID_TYPE_29_BIT |
1U |
29bit MCAN Identifier |
Enum to represent the MCAN Identifier Type.
enum DL_MCAN_OPERATION_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_OPERATION_MODE_NORMAL |
0U |
MCAN normal mode |
DL_MCAN_OPERATION_MODE_SW_INIT |
1U |
MCAN SW initialization mode |
Enum to represent the MCAN mode of operation.
enum DL_MCAN_MEM_TYPE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_MEM_TYPE_BUF |
0U |
MCAN Msg RAM buffers |
DL_MCAN_MEM_TYPE_FIFO |
1U |
MCAN Msg RAM FIFO/Queue |
Enum to represent the MCAN Message RAM type.
enum DL_MCAN_RX_FIFO_NUM
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_RX_FIFO_NUM_0 |
0U |
MCAN Rx FIFO 0 |
DL_MCAN_RX_FIFO_NUM_1 |
1U |
MCAN Rx FIFO 1 |
Enum to represent the MCAN Rx FIFO number.
enum DL_MCAN_PIN_TYPE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_PIN_TYPE_RX |
0U |
MCAN Rx Pin |
DL_MCAN_PIN_TYPE_TX |
1U |
MCAN Tx Pin |
Enum to represent the MCAN pin type.
enum DL_MCAN_ELEM_SIZE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_ELEM_SIZE_8BYTES |
0U |
8 byte data field |
DL_MCAN_ELEM_SIZE_12BYTES |
1U |
12 byte data field |
DL_MCAN_ELEM_SIZE_16BYTES |
2U |
16 byte data field |
DL_MCAN_ELEM_SIZE_20BYTES |
3U |
20 byte data field |
DL_MCAN_ELEM_SIZE_24BYTES |
4U |
24 byte data field |
DL_MCAN_ELEM_SIZE_32BYTES |
5U |
32 byte data field |
DL_MCAN_ELEM_SIZE_48BYTES |
6U |
48 byte data field |
DL_MCAN_ELEM_SIZE_64BYTES |
7U |
64 byte data field |
Enum to represent FIFO/Buffer element Size.
enum DL_MCAN_TIMEOUT_SELECT
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_TIMEOUT_SELECT_CONT |
0U |
Continuous operation Mode |
DL_MCAN_TIMEOUT_SELECT_TX_EVENT_FIFO |
1U |
Timeout controlled by Tx Event FIFO |
DL_MCAN_TIMEOUT_SELECT_RX_FIFO0 |
2U |
Timeout controlled by Rx FIFO 0 |
DL_MCAN_TIMEOUT_SELECT_RX_FIFO1 |
3U |
Timeout controlled by Rx FIFO 1 |
Enum to represent the MCAN time-out counter configuration.
enum DL_MCAN_INTR_SRC_MCAN
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_INTR_SRC_MCAN_EXT_TS |
0x0 |
MCAN interrupt source was triggered by external time stamp |
DL_MCAN_INTR_SRC_MCAN_LINE_0 |
0x1 |
MCAN interrupt source was triggered by Line 0 |
DL_MCAN_INTR_SRC_MCAN_LINE_1 |
0x2 |
MCAN interrupt source was triggered by Line 1 |
Enum to select the MCAN instance.
enum DL_MCAN_ECC_ERR_TYPE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_ECC_ERR_TYPE_SEC |
0U |
ECC Single Error Correction |
DL_MCAN_ECC_ERR_TYPE_DED |
1U |
ECC Double Error Detection |
Enum to represent the ECC Error Types.
enum DL_MCAN_LPBK_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_LPBK_MODE_INTERNAL |
0U |
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 |
1U |
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 |
Enum to select the MCAN Loopback mode.
enum DL_MCAN_COM_STATE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_COM_STATE_SYNCHRONIZING |
0U |
MCAN is synchronizing on CAN communication |
DL_MCAN_COM_STATE_IDLE |
1U |
MCAN is neither receiver nor transmitter |
DL_MCAN_COM_STATE_RECEIVER |
2U |
MCAN is operating as receiver |
DL_MCAN_COM_STATE_TRANSMITTER |
3U |
MCAN is operating as transmitter |
Enum to represent MCAN’s communication state.
enum DL_MCAN_ERR_CODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_ERR_CODE_NO_ERROR |
0U |
No error occurred since LEC has been reset by successful reception or transmission. |
DL_MCAN_ERR_CODE_STUFF_ERROR |
1U |
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 |
2U |
A fixed format part of a received frame has the wrong format. |
DL_MCAN_ERR_CODE_ACK_ERROR |
3U |
The message transmitted by the M_CAN was not acknowledged by another node. |
DL_MCAN_ERR_CODE_BIT1_ERROR |
4U |
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 |
5U |
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 |
6U |
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 |
7U |
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. |
Enum to represent MCAN’s Error Code.
enum DL_MCAN_CLOCK_DIVIDE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_CLOCK_DIVIDE_1 |
MCAN_CLKDIV_RATIO_DIV_BY_1_ |
Divide MCAN clock by 1 |
DL_MCAN_CLOCK_DIVIDE_2 |
MCAN_CLKDIV_RATIO_DIV_BY_2_ |
Divide MCAN clock by 2 |
DL_MCAN_CLOCK_DIVIDE_4 |
MCAN_CLKDIV_RATIO_DIV_BY_4_ |
Divide MCAN clock by 4 |
enum DL_MCAN_IIDX
Enumerator |
Value |
Description |
|---|---|---|
DL_MCAN_IIDX_WAKEUP |
MCAN_IIDX_STAT_WAKEUP |
Interrupt index for MCAN clock stop wake up interrupt pending. |
DL_MCAN_IIDX_TIMESTAMP_OVERFLOW |
MCAN_IIDX_STAT_EXT_TS_CNTR_OVFL |
Interrupt index for MCAN external timestamp counter overflow interrupt pending. |
DL_MCAN_IIDX_DOUBLE_ERROR_DETECTION |
MCAN_IIDX_STAT_DED |
Interrupt index for MCAN message RAM double error detection interrupt pending. |
DL_MCAN_IIDX_SINGLE_ERROR_CORRECTION |
MCAN_IIDX_STAT_SEC |
Interrupt index for MCAN message RAM single error correction interrupt pending. |
DL_MCAN_IIDX_LINE1 |
MCAN_IIDX_STAT_INTL1 |
Interrupt index for MCAN interrupt line 1 interrupt pending. |
DL_MCAN_IIDX_LINE0 |
MCAN_IIDX_STAT_INTL0 |
Interrupt index for MCAN interrupt line 0 interrupt pending. |
Functions Documentation
function DL_MCAN_isReady
bool DL_MCAN_isReady(
DL_MCAN_INSTANCE instance
)
if MCAN instance is ready to be configured
Parameters:
instance Specifies the CANFD instance. One of DL_MCAN_INSTANCE
Return:
true if MCAN instance is ready to configured
false if MCAN instance clock synchronization is ongoing.
function DL_MCAN_setClockConfig
void DL_MCAN_setClockConfig(
MCAN_Regs * mcan,
const DL_MCAN_ClockConfig * config
)
Configure CANCLK source clock.
Parameters:
mcan Pointer to the register overlay for the peripheral
config Pointer to the clock configuration struct DL_MCAN_ClockConfig.
function DL_MCAN_getClockConfig
void DL_MCAN_getClockConfig(
MCAN_Regs * mcan,
DL_MCAN_ClockConfig * config
)
Get CANCLK clock configuration.
Parameters:
mcan Pointer to the register overlay for the peripheral
config Pointer to the clock configuration struct DL_MCAN_ClockConfig.
function DL_MCAN_isInReset
bool DL_MCAN_isInReset(
const MCAN_Regs * mcan
)
This function checks if the MCAN module is in Reset.
Parameters:
mcan Pointer to the register overlay for the peripheral
Returns:
state Returns TRUE if reset is in progress. Else returns FALSE.
function DL_MCAN_isFDOpEnable
bool DL_MCAN_isFDOpEnable(
const MCAN_Regs * mcan
)
This API will return flexible data rate operation status MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: state Returns TRUE if flexible data rate operation is enabled. Else returns FALSE.
function DL_MCAN_isMemInitDone
bool DL_MCAN_isMemInitDone(
const MCAN_Regs * mcan
)
This function checks if the memory initialization is done for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Returns:
state Returns TRUE if memory initialization is done. Else returns FALSE.
function DL_MCAN_setOpMode
void DL_MCAN_setOpMode(
MCAN_Regs * mcan,
uint32_t mode
)
This API will set MCAN module mode of operation.
Parameters:
mcan Pointer to the register overlay for the peripheral
mode Mode of operation. One of DL_MCAN_OPERATION_MODE.
function DL_MCAN_getOpMode
uint32_t DL_MCAN_getOpMode(
const MCAN_Regs * mcan
)
This API will return MCAN module mode of operation.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: mode Mode of operation. One of DL_MCAN_OPERATION_MODE.
function DL_MCAN_init
int32_t DL_MCAN_init(
MCAN_Regs * mcan,
const DL_MCAN_InitParams * initParams
)
This API will initialize MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
initParams Initialization parameters. DL_MCAN_InitParams.
Return: status Initialization status.
function DL_MCAN_setTDC
int32_t DL_MCAN_setTDC(
MCAN_Regs * mcan,
bool enable,
uint32_t tdco,
uint32_t tdcf
)
Configure Transmitter Delay Compensation (TDC)
Parameters:
mcan Pointer to the register overlay for the peripheral
enable true to enable TDC (MCAN_DBTP.TDC=1), false to disable
tdco TDC Offset (MCAN_TDCR.TDCO, 0-127 mtq)
tdcf TDC Filter Window Length (MCAN_TDCR.TDCF, 0-127 mtq)
Return: DL_STATUS_OK on success, DL_STATUS_FAIL if tdco or tdcf exceed 127
Writes MCAN_DBTP.TDC (enable/disable) and MCAN_TDCR.TDCO/TDCF without touching any other CCCR or DBTP fields. Must be called while CCCR.CCE=1.
function DL_MCAN_config
int32_t DL_MCAN_config(
MCAN_Regs * mcan,
const DL_MCAN_ConfigParams * configParams
)
This API will configure MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
configParams Configuration parameters. DL_MCAN_ConfigParams.
Return: status Configuration status.
function 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:
mcan Pointer to the register overlay for the peripheral
configParams MCAN ECC Configuration Parameters. DL_MCAN_ECCConfigParams.
function 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:
mcan Pointer to the register overlay for the peripheral
configParams Configuration parameters for MCAN bit timing. DL_MCAN_BitTimingParams.
Return: status Bit Timings configuration status.
function 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:
mcan Pointer to the register overlay for the peripheral
msgRAMConfigParams Message RAM Configuration parameters. DL_MCAN_MsgRAMConfigParams.
Return: status Configuration Status.
function DL_MCAN_setExtIDAndMask
int32_t DL_MCAN_setExtIDAndMask(
MCAN_Regs * mcan,
uint32_t idMask
)
This API will configure Extended ID AND Mask.
Parameters:
mcan Pointer to the register overlay for the peripheral
idMask Configuration parameters for MCAN Extended Id mask. This value is 29 bit wide.
Return: status Extended ID AND Mask configuration status.
function 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:
mcan Pointer to the register overlay for the peripheral
memType Part of message ram to which given message to write. One of DL_MCAN_MEM_TYPE.
bufNum Buffer number where message to write. This parameter will ignored if memType is FIFO/Q.
elem Message Object. DL_MCAN_TxBufElement.
function DL_MCAN_TXBufAddReq
int32_t DL_MCAN_TXBufAddReq(
MCAN_Regs * mcan,
uint32_t bufNum
)
This API will set Tx Buffer Add Request.
Parameters:
mcan Pointer to the register overlay for the peripheral
bufNum Tx Buffer number for which request is to be added.
Return: status Configuration Status.
function DL_MCAN_getNewDataStatus
void DL_MCAN_getNewDataStatus(
const MCAN_Regs * mcan,
DL_MCAN_RxNewDataStatus * newDataStatus
)
This API will return New Data Message Status.
Parameters:
mcan Pointer to the register overlay for the peripheral
newDataStatus Rx Buffer new data status. DL_MCAN_RxNewDataStatus.
function DL_MCAN_clearNewDataStatus
void DL_MCAN_clearNewDataStatus(
MCAN_Regs * mcan,
const DL_MCAN_RxNewDataStatus * newDataStatus
)
This API clear New Data Message Status.
Parameters:
mcan Pointer to the register overlay for the peripheral
newDataStatus Rx Buffer new data status. DL_MCAN_RxNewDataStatus.
function DL_MCAN_readMsgRam
void DL_MCAN_readMsgRam(
const 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:
mcan Pointer to the register overlay for the peripheral
memType Part of message ram to which given message to write.One of DL_MCAN_MEM_TYPE.
bufNum Buffer number from where message is to read. This parameter will ignored if memType is FIFO/Q.
fifoNum FIFOs number from where message is to read. One of DL_MCAN_RX_FIFO_NUM. This parameter will ignored if memType is buffer.
elem Message Object. DL_MCAN_RxBufElement.
function DL_MCAN_readTxEventFIFO
void DL_MCAN_readTxEventFIFO(
const MCAN_Regs * mcan,
DL_MCAN_TxEventFIFOElement * txEventElem
)
This API is used to read message form Tx Event FIFO.
Parameters:
mcan Pointer to the register overlay for the peripheral
txEventElem Tx Event FIFO Message Object. DL_MCAN_TxEventFIFOElement.
function 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:
mcan Pointer to the register overlay for the peripheral
filtNum Filter number.
elem Filter Object. DL_MCAN_StdMsgIDFilterElement.
See: DL_MCAN_msgRAMConfig
Note: MCAN RAM must be configured DL_MCAN_msgRAMConfig before calling this API.
function 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:
mcan Pointer to the register overlay for the peripheral
filtNum Filter number.
elem Filter Object. DL_MCAN_ExtMsgIDFilterElement.
See: DL_MCAN_msgRAMConfig
Note: MCAN RAM must be configured DL_MCAN_msgRAMConfig before calling this API.
function 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:
mcan Pointer to the register overlay for the peripheral
lpbkMode Loopback mode for MCAN. One of DL_MCAN_LPBK_MODE.
enable Loop Back Mode is enabled if it is TRUE. Loop Back Mode is disabled if it is FALSE.
Note: This API can be called only when MCAN is in Software Initialization mode of operation.
function DL_MCAN_getErrCounters
void DL_MCAN_getErrCounters(
const MCAN_Regs * mcan,
DL_MCAN_ErrCntStatus * errCounter
)
This API will return error counter status for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
errCounter Error Counter Status. DL_MCAN_ErrCntStatus.
function DL_MCAN_getProtocolStatus
void DL_MCAN_getProtocolStatus(
const MCAN_Regs * mcan,
DL_MCAN_ProtocolStatus * protStatus
)
This API will return protocol status for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
protStatus Protocol Status. DL_MCAN_ProtocolStatus.
function DL_MCAN_enableIntr
void DL_MCAN_enableIntr(
MCAN_Regs * mcan,
uint32_t intrMask,
bool enable
)
This API is used to enable/disable interrupts.
Parameters:
mcan Pointer to the register overlay for the peripheral
intrMask Interrupts to enable. One of [DL_MCAN_INTR_SRC].
enable Interrupt is enabled if it is TRUE. Interrupt is disabled if it is FALSE.
function 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:
mcan Pointer to the register overlay for the peripheral
intrMask Interrupt Number for which interrupt line is to be selected. One of [DL_MCAN_INTR_SRC].
lineNum Interrupt Line to select. One of DL_MCAN_INTR_LINE_NUM,
function DL_MCAN_getIntrLineSelectStatus
uint32_t DL_MCAN_getIntrLineSelectStatus(
const MCAN_Regs * mcan
)
This API is used to get interrupt line selected for each interrupt.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Interrupt Line Select Status.
function 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:
mcan Pointer to the register overlay for the peripheral
lineNum Interrupt Line to select. One of DL_MCAN_INTR_LINE_NUM,
enable Interrupt Line is enabled if it is TRUE. Interrupt Line is disabled if it is FALSE.
function DL_MCAN_getIntrStatus
uint32_t DL_MCAN_getIntrStatus(
const MCAN_Regs * mcan
)
This API will return interrupt status.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Interrupt Status.
function 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:
mcan Pointer to the register overlay for the peripheral
intrMask Interrupts to clear status.
eoi Specified the associated. [DL_MCAN_INTR_SRC]
function DL_MCAN_getHighPriorityMsgStatus
void DL_MCAN_getHighPriorityMsgStatus(
const MCAN_Regs * mcan,
DL_MCAN_HighPriorityMsgInfo * hpm
)
This API will return High Priority Message Status.
Parameters:
mcan Pointer to the register overlay for the peripheral
hpm High Priority Message Status. DL_MCAN_HighPriorityMsgInfo.
function DL_MCAN_getRxFIFOStatus
void DL_MCAN_getRxFIFOStatus(
const MCAN_Regs * mcan,
DL_MCAN_RxFIFOStatus * fifoStatus
)
This API will Rx FIFO status.
Parameters:
mcan Pointer to the register overlay for the peripheral
fifoStatus Rx FIFO Status. DL_MCAN_RxFIFOStatus.
function 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:
mcan Pointer to the register overlay for the peripheral
fifoNum FIFO Number. One of DL_MCAN_RX_FIFO_NUM.
idx Rx FIFO Acknowledge Index
Return: status Acknowledgement Status.
function DL_MCAN_getTxFIFOQueStatus
void DL_MCAN_getTxFIFOQueStatus(
const MCAN_Regs * mcan,
DL_MCAN_TxFIFOStatus * fifoStatus
)
This API will Tx FIFO status.
Parameters:
mcan Pointer to the register overlay for the peripheral
fifoStatus Tx FIFO Status. DL_MCAN_TxFIFOStatus.
function DL_MCAN_getTxBufReqPend
uint32_t DL_MCAN_getTxBufReqPend(
const MCAN_Regs * mcan
)
This API will return Tx Buffer Request Pending status.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Tx Buffer Request Pending status.
function DL_MCAN_txBufCancellationReq
int32_t DL_MCAN_txBufCancellationReq(
MCAN_Regs * mcan,
uint32_t buffNum
)
This API will set Tx Buffer Cancellation Request.
Parameters:
mcan Pointer to the register overlay for the peripheral
buffNum Tx Buffer number for which request is to be added.
Return: status Configuration Status.
function DL_MCAN_getTxBufTransmissionStatus
uint32_t DL_MCAN_getTxBufTransmissionStatus(
const MCAN_Regs * mcan
)
This API will return Tx Buffer Transmission Occurred status.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Tx Buffer Transmission Occurred status.
function DL_MCAN_txBufCancellationStatus
uint32_t DL_MCAN_txBufCancellationStatus(
const MCAN_Regs * mcan
)
This API will return Transmit Buffer Cancellation Finished status.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Transmit Buffer Cancellation Finished status.
function 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:
mcan Pointer to the register overlay for the peripheral
bufNum Buffer number for which interrupt is to enable.
enable Interrupt is enabled if it is TRUE. Interrupt is disabled if it is FALSE.
Return: status Configuration status.
function 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:
mcan Pointer to the register overlay for the peripheral
bufNum Buffer number for which interrupt is to enable.
enable Interrupt is enabled if it is TRUE. Interrupt is disabled if it is FALSE.
Return: status Configuration status.
function 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:
mcan Pointer to the register overlay for the peripheral
enable Add Clock Stop Request. Adds Clock Stop Request is TRUE otherwise removes it.
function DL_MCAN_getTxEventFIFOStatus
void DL_MCAN_getTxEventFIFOStatus(
const MCAN_Regs * mcan,
DL_MCAN_TxEventFIFOStatus * fifoStatus
)
This API will Tx Event FIFO status.
Parameters:
mcan Pointer to the register overlay for the peripheral
fifoStatus Tx Event FIFO Status. DL_MCAN_TxEventFIFOStatus.
function DL_MCAN_writeTxEventFIFOAck
int32_t DL_MCAN_writeTxEventFIFOAck(
MCAN_Regs * mcan,
uint32_t idx
)
This API will write Event FIFO Acknowledge Index.
Parameters:
mcan Pointer to the register overlay for the peripheral
idx Event FIFO Acknowledge Index
Return: status Acknowledgement Status.
function DL_MCAN_eccForceError
void DL_MCAN_eccForceError(
MCAN_Regs * mcan,
const DL_MCAN_ECCErrForceParams * eccErr
)
This API will Force Error on ECC.
Parameters:
mcan Pointer to the register overlay for the peripheral
eccErr Force Error on ECC configuration. DL_MCAN_ECCErrForceParams.
function DL_MCAN_eccGetErrorStatus
void DL_MCAN_eccGetErrorStatus(
MCAN_Regs * mcan,
DL_MCAN_ECCErrStatus * eccErr
)
This API will return ECC Error status.
Parameters:
mcan Pointer to the register overlay for the peripheral
eccErr ECC error status. DL_MCAN_ECCErrStatus.
function DL_MCAN_eccClearErrorStatus
void DL_MCAN_eccClearErrorStatus(
MCAN_Regs * mcan,
uint32_t errType
)
This API is used to clear the ECC Error status.
Parameters:
mcan Pointer to the register overlay for the peripheral
errType Error type to clear status. One of DL_MCAN_ECC_ERR_TYPE.
function 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:
mcan Pointer to the register overlay for the peripheral
errType Interrupt to enable. One of DL_MCAN_ECC_ERR_TYPE.
function DL_MCAN_eccEnableIntr
void DL_MCAN_eccEnableIntr(
MCAN_Regs * mcan,
uint32_t errType,
bool enable
)
This API is used to enable ECC interrupt.
Parameters:
mcan Pointer to the register overlay for the peripheral
errType Interrupt to enable. One of DL_MCAN_ECC_ERR_TYPE.
enable ECC Interrupt is enabled if it is TRUE. ECC Interrupt is disabled if it is FALSE.
function DL_MCAN_eccGetIntrStatus
uint32_t DL_MCAN_eccGetIntrStatus(
const MCAN_Regs * mcan,
uint32_t errType
)
This API is used to get ECC interrupt status.
Parameters:
mcan Pointer to the register overlay for the peripheral
errType Interrupt status to read. One of DL_MCAN_ECC_ERR_TYPE.
function DL_MCAN_eccClearIntrStatus
void DL_MCAN_eccClearIntrStatus(
MCAN_Regs * mcan,
uint32_t errType
)
This API is used to clear ECC interrupt status.
Parameters:
mcan Pointer to the register overlay for the peripheral
errType Interrupt status to clear. One of DL_MCAN_ECC_ERR_TYPE.
function DL_MCAN_extTSCounterConfig
void DL_MCAN_extTSCounterConfig(
MCAN_Regs * mcan,
uint32_t prescalar
)
This API will configure external timestamp counter for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
prescalar Timestamp Counter Prescaler. Range:[0x0-0xFFFFFF]
Note: Actual value programmed prescalar values is (prescalar - 1).
function 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:
mcan Pointer to the register overlay for the peripheral
enable External TS is enabled if it is TRUE. External TS is disabled if it is FALSE.
function 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:
mcan Pointer to the register overlay for the peripheral
enable External TimeStamp Counter Overflow Interrupt is enabled if it is TRUE. External TimeStamp Counter Overflow Interrupt is disabled if it is FALSE.
function 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:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_extTSGetUnservicedIntrCount
uint32_t DL_MCAN_extTSGetUnservicedIntrCount(
const MCAN_Regs * mcan
)
This API returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter. Maximum number of unserviced interrupts is 0xF.
function DL_MCAN_getRevisionId
void DL_MCAN_getRevisionId(
const MCAN_Regs * mcan,
DL_MCAN_RevisionId * revId
)
This API is used get the MCAN revision ID.
Parameters:
mcan Pointer to the register overlay for the peripheral
revId Contains Revision ID of MCAN module. DL_MCAN_RevisionId.
function DL_MCAN_getClockStopAck
uint32_t DL_MCAN_getClockStopAck(
const MCAN_Regs * mcan
)
This API get clock stop acknowledgement for MCAN module. It return whether MCAN is power down mode or not.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Return Clock Stop Acknowledgement status. Return ‘1’ if M_CAN is set in power down mode else returns ‘0’.
function 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:
mcan Pointer to the register overlay for the peripheral
function 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:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_getRxPinState
uint32_t DL_MCAN_getRxPinState(
const MCAN_Regs * mcan
)
This API will return Rx pin state of MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: state MCAN Rx Pin State. 0= The CAN bus is dominant 1= The CAN bus is recessive
function DL_MCAN_setTxPinState
void DL_MCAN_setTxPinState(
MCAN_Regs * mcan,
uint32_t state
)
This API will set Tx pin state of MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
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 other= It will treated as 11.
function DL_MCAN_getTxPinState
uint32_t DL_MCAN_getTxPinState(
const MCAN_Regs * mcan
)
This API will return Tx pin state of MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: 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
function DL_MCAN_getTSCounterVal
uint32_t DL_MCAN_getTSCounterVal(
const MCAN_Regs * mcan
)
This API will return current timestamp counter value.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: val Current Timestamp counter value.
function DL_MCAN_getClkStopAck
uint32_t DL_MCAN_getClkStopAck(
const MCAN_Regs * mcan
)
This API will return clock stop acknowledgement for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: ack Clock Stop Acknowledge 0= No clock stop acknowledged 1= M_CAN may be set in power down
function DL_MCAN_getBitTime
void DL_MCAN_getBitTime(
const MCAN_Regs * mcan,
DL_MCAN_BitTimingParams * configParams
)
This API will get the configured bit timings for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
configParams Configuration parameters for MCAN bit timing. DL_MCAN_BitTimingParams.
function DL_MCAN_resetTSCounter
void DL_MCAN_resetTSCounter(
MCAN_Regs * mcan
)
This API will reset timestamp counter value.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_getTOCounterVal
uint32_t DL_MCAN_getTOCounterVal(
const MCAN_Regs * mcan
)
This API will return current time-out counter value.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: val Current Time-out counter value.
function DL_MCAN_eccAggrGetRevisionId
void DL_MCAN_eccAggrGetRevisionId(
const MCAN_Regs * mcan,
DL_MCAN_ECCAggrRevisionId * revId
)
This API is used get the ECC AGGR revision ID.
Parameters:
mcan Pointer to the register overlay for the peripheral
revId Contains Revision ID of ECC AGGR. DL_MCAN_ECCAggrRevisionId.
function 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:
mcan Pointer to the register overlay for the peripheral
revId Contains Revision ID of ECC Wrapper DL_MCAN_ECCWrapRevisionId.
function DL_MCAN_extTSIsIntrEnable
bool DL_MCAN_extTSIsIntrEnable(
const MCAN_Regs * mcan
)
This API returns External TimeStamp Counter Overflow Interrupt enable status for MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: status Returns TRUE if External TimeStamp Counter Overflow Interrupt is enabled. Else returns FALSE.
function DL_MCAN_getEndianVal
uint32_t DL_MCAN_getEndianVal(
const MCAN_Regs * mcan
)
This function return endianness value of MCAN module.
Parameters:
mcan Pointer to the register overlay for the peripheral
Returns:
val Endianness value. (0x87654321)
function DL_MCAN_getExtIDANDMask
uint32_t DL_MCAN_getExtIDANDMask(
const MCAN_Regs * mcan
)
This API will get the configured Extended ID AND Mask.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: idMask Extended ID AND Mask.
function DL_MCAN_enablePower
__STATIC_INLINE void DL_MCAN_enablePower(
MCAN_Regs * mcan
)
Enables the Peripheral Write Enable (PWREN) register for the MCAN.
Parameters:
mcan Pointer to the register overlay for the peripheral
Before any peripheral registers can be configured by software, the peripheral itself must be enabled by writing the ENABLE bit together with the appropriate KEY value to the peripheral’s PWREN register. This also has some delay to allow IP stabilization.
function DL_MCAN_disablePower
__STATIC_INLINE void DL_MCAN_disablePower(
MCAN_Regs * mcan
)
Disables the Peripheral Write Enable (PWREN) register for the MCAN.
Parameters:
mcan Pointer to the register overlay for the peripheral
Note: This API does not provide large power savings.
When the PWREN.ENABLE bit is cleared, the peripheral’s registers are not accessible for read/write operations.
function DL_MCAN_isPowerEnabled
__STATIC_INLINE bool DL_MCAN_isPowerEnabled(
const MCAN_Regs * mcan
)
Returns if the Peripheral Write Enable (PWREN) register for the MCAN is enabled.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return:
true if peripheral register access is enabled
false if peripheral register access is disabled
Before any peripheral registers can be configured by software, the peripheral itself must be enabled by writing the ENABLE bit together with the appropriate KEY value to the peripheral’s PWREN register.
When the PWREN.ENABLE bit is cleared, the peripheral’s registers are not accessible for read/write operations.
function DL_MCAN_reset
__STATIC_INLINE void DL_MCAN_reset(
MCAN_Regs * mcan
)
Resets mcan peripheral.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_isReset
__STATIC_INLINE bool DL_MCAN_isReset(
const MCAN_Regs * mcan
)
Returns if mcan peripheral was reset.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return:
true if peripheral was reset
false if peripheral wasn’t reset
function DL_MCAN_enableInterrupt
__STATIC_INLINE void DL_MCAN_enableInterrupt(
MCAN_Regs * mcan,
uint32_t interruptMask
)
Enable MCAN interrupts.
Parameters:
mcan Pointer to the register overlay for the peripheral
interruptMask Bit mask of interrupts to enable. Bitwise OR of [DL_MCAN_INTERRUPT_IMASK].
function DL_MCAN_disableInterrupt
__STATIC_INLINE void DL_MCAN_disableInterrupt(
MCAN_Regs * mcan,
uint32_t interruptMask
)
Disable MCAN interrupts.
Parameters:
mcan Pointer to the register overlay for the peripheral
interruptMask Bit mask of interrupts to disable. Bitwise OR of mcan interrupts.
function DL_MCAN_getEnabledInterrupts
__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterrupts(
const MCAN_Regs * mcan,
uint32_t interruptMask
)
Check which MCAN interrupts are enabled.
Parameters:
mcan Pointer to the register overlay for the peripheral
interruptMask Bit mask of interrupts to check. Bitwise OR of [DL_MCAN_INTERRUPT_IMASK].
Returns:
Bitwise OR of [DL_MCAN_INTERRUPT_IMASK] values
Return: Which of the requested MCAN interrupts are enabled
function DL_MCAN_getEnabledInterruptStatus
__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterruptStatus(
const MCAN_Regs * mcan,
uint32_t interruptMask
)
Check interrupt flag of enabled MCAN interrupts.
Parameters:
mcan Pointer to the register overlay for the peripheral
interruptMask Bit mask of interrupts to check. Bitwise OR of [DL_MCAN_INTERRUPT_IMASK].
Returns:
Bitwise OR of [DL_MCAN_INTERRUPT_IMASK] values
Return: Which of the requested MCAN interrupts are pending
Checks if any of the MCAN interrupts that were previously enabled are pending.
function DL_MCAN_getRawInterruptStatus
__STATIC_INLINE uint32_t DL_MCAN_getRawInterruptStatus(
const MCAN_Regs * mcan,
uint32_t interruptMask
)
Check interrupt flag of any MCAN interrupt.
Parameters:
mcan Pointer to the register overlay for the peripheral
interruptMask Bit mask of interrupts to check. Bitwise OR of [DL_MCAN_INTERRUPT_IMASK].
Returns:
Bitwise OR of [DL_MCAN_INTERRUPT_IMASK] values
Return: Which of the requested MCAN interrupts are pending
Checks if any of the MCAN interrupts are pending. Interrupts do not have to be previously enabled.
function DL_MCAN_getPendingInterrupt
__STATIC_INLINE DL_MCAN_IIDX DL_MCAN_getPendingInterrupt(
const MCAN_Regs * mcan
)
Get highest priority pending MCAN interrupt.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: The highest priority pending MCAN interrupt. One of DL_MCAN_IIDX
Checks if any of the MCAN interrupts are pending. Interrupts do not have to be previously enabled.
function DL_MCAN_clearInterruptStatus
__STATIC_INLINE void DL_MCAN_clearInterruptStatus(
MCAN_Regs * mcan,
uint32_t interruptMask
)
Clear pending MCAN interrupts.
Parameters:
mcan Pointer to the register overlay for the peripheral
interruptMask Bit mask of interrupts to clear. Bitwise OR of [DL_MCAN_INTERRUPT_IMASK].
function DL_MCAN_isModuleClockEnabled
__STATIC_INLINE bool DL_MCAN_isModuleClockEnabled(
const MCAN_Regs * mcan
)
Checks if the MCAN module clock request is enabled.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: If the MCAN module clock request is enabled
function DL_MCAN_enableModuleClock
__STATIC_INLINE void DL_MCAN_enableModuleClock(
MCAN_Regs * mcan
)
Enables the MCAN functional module clock.
Parameters:
mcan Pointer to the register overlay for the peripheral
This function enables the MCAN module clock and includes the necessary delay cycles for clock stabilization. A delay is applied after enabling the clock to ensure proper stabilization.
function DL_MCAN_disableModuleClock
__STATIC_INLINE void DL_MCAN_disableModuleClock(
MCAN_Regs * mcan
)
Disables the MCAN functional module clock.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_getModuleClockDivider
__STATIC_INLINE uint32_t DL_MCAN_getModuleClockDivider(
const MCAN_Regs * mcan
)
Gets the MCAN functional module clock divide ratio.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: The current clock divide ratio, one of DL_MCAN_CLOCK_DIVIDE
function 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:
mcan Pointer to the register overlay for the peripheral
clkdiv The desired clock divide ratio, one of DL_MCAN_CLOCK_DIVIDE
function DL_MCAN_isClockStopGateRequestEnabled
__STATIC_INLINE bool DL_MCAN_isClockStopGateRequestEnabled(
const MCAN_Regs * mcan
)
Checks if the MCAN clock gating request is enabled.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: If the the MCAN module clock gating request is enabled/disabled
function DL_MCAN_enableClockStopGateRequest
__STATIC_INLINE void DL_MCAN_enableClockStopGateRequest(
MCAN_Regs * mcan
)
Enables the MCAN clock gating request.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_disableClockStopGateRequest
__STATIC_INLINE void DL_MCAN_disableClockStopGateRequest(
MCAN_Regs * mcan
)
Disables the MCAN clock gating request.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_isClockStopWakeupInterruptEnabled
__STATIC_INLINE bool DL_MCAN_isClockStopWakeupInterruptEnabled(
const MCAN_Regs * mcan
)
Checks if the MCAN clock stop wakeup interrupt is enabled.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: If the the MCAN module clock wakeup interrupt is enabled/disabled
function DL_MCAN_enableClockStopWakeupInterrupt
__STATIC_INLINE void DL_MCAN_enableClockStopWakeupInterrupt(
MCAN_Regs * mcan
)
Enables the MCAN clock stop wakeup interrupt.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_disableClockStopWakeupInterrupt
__STATIC_INLINE void DL_MCAN_disableClockStopWakeupInterrupt(
MCAN_Regs * mcan
)
Disables the MCAN clock stop wakeup interrupt.
Parameters:
mcan Pointer to the register overlay for the peripheral
function DL_MCAN_isGlitchFilterWakeupEnabled
__STATIC_INLINE bool DL_MCAN_isGlitchFilterWakeupEnabled(
const MCAN_Regs * mcan
)
Checks if the glitch filter on MCAN RXD input is enabled.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: If the the glitch filter on MCAN RXD input is enabled/disabled
When the glitch filter is enabled in MCAN RXD input, it wakes up the MCAN controller to exit clock gating
function DL_MCAN_enableGlitchFilterWakeup
__STATIC_INLINE void DL_MCAN_enableGlitchFilterWakeup(
MCAN_Regs * mcan
)
Enables the glitch filter on MCAN RXD input.
Parameters:
mcan Pointer to the register overlay for the peripheral
When the glitch filter is enabled in MCAN RXD input, it wakes up the MCAN controller to exit clock gating
function DL_MCAN_disableGlitchFilterWakeup
__STATIC_INLINE void DL_MCAN_disableGlitchFilterWakeup(
MCAN_Regs * mcan
)
Disables the glitch filter on MCAN RXD input.
Parameters:
mcan Pointer to the register overlay for the peripheral
When the glitch filter is enabled in MCAN RXD input, it wakes up the MCAN controller to exit clock gating
function DL_MCAN_getClockStopAcknowledgeStatus
__STATIC_INLINE bool DL_MCAN_getClockStopAcknowledgeStatus(
const MCAN_Regs * mcan
)
Gets the clock stop acknowledge status.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: The clock stop acknowledge status
function DL_MCAN_getClockStopHardwareOverrideStatus
__STATIC_INLINE bool DL_MCAN_getClockStopHardwareOverrideStatus(
const MCAN_Regs * mcan
)
Gets the clock stop hardware override status.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: 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
function DL_MCAN_getControllerClockRequestStatus
__STATIC_INLINE bool DL_MCAN_getControllerClockRequestStatus(
const MCAN_Regs * mcan
)
Gets the status of MCAN controller clock request from GPRCM.
Parameters:
mcan Pointer to the register overlay for the peripheral
Return: The status of the MCAN controller clock request from GPRCM
function DL_MCAN_saveConfiguration
bool DL_MCAN_saveConfiguration(
const MCAN_Regs * mcan,
DL_MCAN_backupConfig * ptr
)
Saves MCAN configuration before entering STOP or STANDBY mode.
Parameters:
mcan Pointer to the register overlay for the peripheral
ptr Configuration backup setup structure. See DL_MCAN_backupConfig.
Returns:
FALSE if a configuration already exists in ptr (will not be overwritten). TRUE if a configuration was successfully saved
function DL_MCAN_restoreConfiguration
bool DL_MCAN_restoreConfiguration(
MCAN_Regs * mcan,
DL_MCAN_backupConfig * ptr
)
Restore MCAN configuration after leaving STOP or STANDBY mode.
Parameters:
mcan Pointer to the register overlay for the peripheral
ptr Configuration backup setup structure. See DL_MCAN_backupConfig.
Returns:
FALSE if a configuration does not exist in ptr (will not be loaded). TRUE if a configuration successfully loaded
Stores actual state of Configuration Change Enable. CCE will be set during restore operation and will configure CCE actual state at the end.
MCAN configuration only overwrittring CCE configuration since INIT reset value is 0x1. CCE and INIT must be set to 0x1 to allow reconfiguration of MCAN.
Macros Documentation
define DL_MCAN_INTERRUPT_ARA
#define DL_MCAN_INTERRUPT_ARA (MCAN_IR_ARA_MASK)
Access to Reserved Address interrupt.
define DL_MCAN_INTERRUPT_PED
#define DL_MCAN_INTERRUPT_PED (MCAN_IR_PED_MASK)
Protocol Error in Data Phase interrupt.
define DL_MCAN_INTERRUPT_PEA
#define DL_MCAN_INTERRUPT_PEA (MCAN_IR_PEA_MASK)
Protocol Error in Arbitration Phase interrupt.
define DL_MCAN_INTERRUPT_WDI
#define DL_MCAN_INTERRUPT_WDI (MCAN_IR_WDI_MASK)
Watchdog interrupt.
define DL_MCAN_INTERRUPT_BO
#define DL_MCAN_INTERRUPT_BO (MCAN_IR_BO_MASK)
Bus_Off Status interrupt.
define DL_MCAN_INTERRUPT_EW
#define DL_MCAN_INTERRUPT_EW (MCAN_IR_EW_MASK)
Warning Status interrupt.
define DL_MCAN_INTERRUPT_EP
#define DL_MCAN_INTERRUPT_EP (MCAN_IR_EP_MASK)
Error Passive interrupt.
define DL_MCAN_INTERRUPT_ELO
#define DL_MCAN_INTERRUPT_ELO (MCAN_IR_ELO_MASK)
Error Logging Overflow interrupt.
define DL_MCAN_INTERRUPT_BEU
#define DL_MCAN_INTERRUPT_BEU (MCAN_IR_BEU_MASK)
Bit Error Uncorrected. Message RAM bit error detected, uncorrected interrupt.
define DL_MCAN_INTERRUPT_DRX
#define DL_MCAN_INTERRUPT_DRX (MCAN_IR_DRX_MASK)
Message Stored to Dedicated Rx Buffer interrupt.
define DL_MCAN_INTERRUPT_TOO
#define DL_MCAN_INTERRUPT_TOO (MCAN_IR_TOO_MASK)
Timeout Occurred interrupt.
define DL_MCAN_INTERRUPT_MRAF
#define DL_MCAN_INTERRUPT_MRAF (MCAN_IR_MRAF_MASK)
Message RAM Access Failure interrupt.
define DL_MCAN_INTERRUPT_TSW
#define DL_MCAN_INTERRUPT_TSW (MCAN_IR_TSW_MASK)
Timestamp Wraparound interrupt.
define DL_MCAN_INTERRUPT_TEFL
#define DL_MCAN_INTERRUPT_TEFL (MCAN_IR_TEFL_MASK)
Tx Event FIFO Element Lost interrupt.
define DL_MCAN_INTERRUPT_TEFF
#define DL_MCAN_INTERRUPT_TEFF (MCAN_IR_TEFF_MASK)
Tx Event FIFO Full interrupt.
define DL_MCAN_INTERRUPT_TEFW
#define DL_MCAN_INTERRUPT_TEFW (MCAN_IR_TEFW_MASK)
Tx Event FIFO Watermark Reached interrupt.
define DL_MCAN_INTERRUPT_TEFN
#define DL_MCAN_INTERRUPT_TEFN (MCAN_IR_TEFN_MASK)
Tx Event FIFO New Entry interrupt.
define DL_MCAN_INTERRUPT_TFE
#define DL_MCAN_INTERRUPT_TFE (MCAN_IR_TFE_MASK)
Tx FIFO Empty interrupt.
define DL_MCAN_INTERRUPT_TCF
#define DL_MCAN_INTERRUPT_TCF (MCAN_IR_TCF_MASK)
Transmission Cancellation Finished interrupt.
define DL_MCAN_INTERRUPT_TC
#define DL_MCAN_INTERRUPT_TC (MCAN_IR_TC_MASK)
Transmission Completed interrupt.
define DL_MCAN_INTERRUPT_HPM
#define DL_MCAN_INTERRUPT_HPM (MCAN_IR_HPM_MASK)
High Priority Message interrupt.
define DL_MCAN_INTERRUPT_RF1L
#define DL_MCAN_INTERRUPT_RF1L (MCAN_IR_RF1L_MASK)
Rx FIFO 1 Message Lost interrupt.
define DL_MCAN_INTERRUPT_RF1F
#define DL_MCAN_INTERRUPT_RF1F (MCAN_IR_RF1F_MASK)
Rx FIFO 1 Full interrupt.
define DL_MCAN_INTERRUPT_RF1W
#define DL_MCAN_INTERRUPT_RF1W (MCAN_IR_RF1W_MASK)
Rx FIFO 1 Watermark Reached interrupt.
define DL_MCAN_INTERRUPT_RF1N
#define DL_MCAN_INTERRUPT_RF1N (MCAN_IR_RF1N_MASK)
Rx FIFO 1 New Message interrupt.
define DL_MCAN_INTERRUPT_RF0L
#define DL_MCAN_INTERRUPT_RF0L (MCAN_IR_RF0L_MASK)
Rx FIFO 0 Message Lost interrupt.
define DL_MCAN_INTERRUPT_RF0F
#define DL_MCAN_INTERRUPT_RF0F (MCAN_IR_RF0F_MASK)
Rx FIFO 0 Full interrupt.
define DL_MCAN_INTERRUPT_RF0W
#define DL_MCAN_INTERRUPT_RF0W (MCAN_IR_RF0W_MASK)
Rx FIFO 0 Watermark interrupt.
define DL_MCAN_INTERRUPT_RF0N
#define DL_MCAN_INTERRUPT_RF0N (MCAN_IR_RF0N_MASK)
Rx FIFO 0 New Message interrupt.
define DL_MCAN_INTERRUPT_WAKEUP
#define DL_MCAN_INTERRUPT_WAKEUP (MCAN_IMASK_WAKEUP_SET)
Clock Stop Wake Up interrupt.
define DL_MCAN_INTERRUPT_TIMESTAMP_OVERFLOW
#define DL_MCAN_INTERRUPT_TIMESTAMP_OVERFLOW (MCAN_IMASK_EXT_TS_CNTR_OVFL_SET)
External Timestamp Counter Overflow interrupt.
define DL_MCAN_INTERRUPT_DOUBLE_ERROR_DETECTION
#define DL_MCAN_INTERRUPT_DOUBLE_ERROR_DETECTION (MCAN_IMASK_DED_SET)
Message RAM Double Error Detection interrupt.
define DL_MCAN_INTERRUPT_SINGLE_ERROR_CORRECTION
#define DL_MCAN_INTERRUPT_SINGLE_ERROR_CORRECTION (MCAN_IMASK_SEC_SET)
Message RAM Single Error Correction interrupt.
define DL_MCAN_INTERRUPT_LINE1
#define DL_MCAN_INTERRUPT_LINE1 (MCAN_IMASK_INTL1_SET)
MCAN Interrupt Line 1.
define DL_MCAN_INTERRUPT_LINE0
#define DL_MCAN_INTERRUPT_LINE0 (MCAN_IMASK_INTL0_SET)
MCAN Interrupt Line 0.
define DL_MCAN_INTR_SRC_RX_FIFO0_NEW_MSG
#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
#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
#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
#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
#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
#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
#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
#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
#define DL_MCAN_INTR_SRC_HIGH_PRIO_MSG (MCAN_IR_HPM_MASK)
High Priority Message interrupt.
define DL_MCAN_INTR_SRC_TRANS_COMPLETE
#define DL_MCAN_INTR_SRC_TRANS_COMPLETE (MCAN_IR_TC_MASK)
Transmission Completed interrupt.
define DL_MCAN_INTR_SRC_TRANS_CANCEL_FINISH
#define DL_MCAN_INTR_SRC_TRANS_CANCEL_FINISH (MCAN_IR_TCF_MASK)
Transmission Cancellation Finished interrupt.
define DL_MCAN_INTR_SRC_TX_FIFO_EMPTY
#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
#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
#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
#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
#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
#define DL_MCAN_INTR_SRC_TIMESTAMP_WRAPAROUND (MCAN_IR_TSW_MASK)
Timestamp Wraparound interrupt.
define DL_MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE
#define DL_MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE (MCAN_IR_MRAF_MASK)
Message RAM Access Failure interrupt.
define DL_MCAN_INTR_SRC_TIMEOUT
#define DL_MCAN_INTR_SRC_TIMEOUT (MCAN_IR_TOO_MASK)
Timeout Occurred interrupt.
define DL_MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG
#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
#define DL_MCAN_INTR_SRC_BIT_ERR_UNCORRECTED (MCAN_IR_BEU_MASK)
Bit Error Uncorrected interrupt.
define DL_MCAN_INTR_SRC_ERR_LOG_OVRFLW
#define DL_MCAN_INTR_SRC_ERR_LOG_OVRFLW (MCAN_IR_ELO_MASK)
Error Logging Overflow interrupt.
define DL_MCAN_INTR_SRC_ERR_PASSIVE
#define DL_MCAN_INTR_SRC_ERR_PASSIVE (MCAN_IR_EP_MASK)
Error Passive interrupt.
define DL_MCAN_INTR_SRC_WARNING_STATUS
#define DL_MCAN_INTR_SRC_WARNING_STATUS (MCAN_IR_EW_MASK)
Warning Status interrupt.
define DL_MCAN_INTR_SRC_BUS_OFF_STATUS
#define DL_MCAN_INTR_SRC_BUS_OFF_STATUS (MCAN_IR_BO_MASK)
Bus_Off Status interrupt.
define DL_MCAN_INTR_SRC_WATCHDOG
#define DL_MCAN_INTR_SRC_WATCHDOG (MCAN_IR_WDI_MASK)
Watchdog Interrupt interrupt.
define DL_MCAN_INTR_SRC_PROTOCOL_ERR_ARB
#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
#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
#define DL_MCAN_INTR_SRC_RES_ADDR_ACCESS (MCAN_IR_ARA_MASK)
Access to Reserved Address interrupt.
define DL_MCAN_INTR_MASK_ALL
#define DL_MCAN_INTR_MASK_ALL (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.
define DL_MCAN_MAX_PAYLOAD_BYTES
#define DL_MCAN_MAX_PAYLOAD_BYTES (64U)
Maximum payload supported by CAn-FD protocol in bytes.
define DL_MCAN_DBTP_DSJW_MAX
#define DL_MCAN_DBTP_DSJW_MAX (0xFU)
Maximum data synch jump width.
define DL_MCAN_DBTP_DTSEG2_MAX
#define DL_MCAN_DBTP_DTSEG2_MAX (0xFU)
Max data time segment 2.
define DL_MCAN_DBTP_DTSEG1_MAX
#define DL_MCAN_DBTP_DTSEG1_MAX (0x1FU)
Max data time segment 1.
define DL_MCAN_DBTP_DBRP_MAX
#define DL_MCAN_DBTP_DBRP_MAX (0x1FU)
Max data date rate prescalar.
define DL_MCAN_NBTP_NSJW_MAX
#define DL_MCAN_NBTP_NSJW_MAX (0x7FU)
Max nom synch jump width.
define DL_MCAN_NBTP_NTSEG2_MAX
#define DL_MCAN_NBTP_NTSEG2_MAX (0x7FU)
Max nom synch time segment 2.
define DL_MCAN_NBTP_NTSEG1_MAX
#define DL_MCAN_NBTP_NTSEG1_MAX (0xFFU)
Max nom synch time segment 1.
define DL_MCAN_NBTP_NBRP_MAX
#define DL_MCAN_NBTP_NBRP_MAX (0x1FFU)
Max nom data date rate prescalar.
define DL_MCAN_RWD_WDC_MAX
#define DL_MCAN_RWD_WDC_MAX (0xFFU)
Max wdc preload.
define DL_MCAN_TDCR_TDCF_MAX
#define DL_MCAN_TDCR_TDCF_MAX (0x7FU)
Transmitter Delay Compensation Filter Window Length.
define DL_MCAN_TDCR_TDCO_MAX
#define DL_MCAN_TDCR_TDCO_MAX (0x7FU)
Transmitter Delay Compensation Offset.
define DL_MCAN_XIDAM_EIDM_MAX
#define DL_MCAN_XIDAM_EIDM_MAX (0x1FFFFFFFU)
Max MCAN extended id mask.
define DL_MCAN_TSCC_TCP_MAX
#define DL_MCAN_TSCC_TCP_MAX (0xFU)
Max timestamp counter prescaler.
define DL_MCAN_TOCC_TOP_MAX
#define DL_MCAN_TOCC_TOP_MAX (0xFFFFU)
Max timeout preload.