|
AM263Px MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
57 #include <drivers/hw_include/cslr.h>
58 #include <drivers/hw_include/cslr_mcan.h>
59 #include <drivers/hw_include/csl_types.h>
74 #define MCAN_STATUS_SUCCESS ((int32_t)0)
79 #define MCAN_STATUS_FAILURE ((int32_t)-1)
84 #define MCAN_TIMEOUT ((int32_t)-2)
89 #define MCAN_INVALID_PARAM ((int32_t)-3)
94 #define MCAN_STATUS_BUSY ((int32_t)-4)
99 #define MCAN_INVALID_STATE ((int32_t)-5)
104 #define MCAN_OUT_OF_RESOURCES ((int32_t)-6) //TODO
109 #define MCAN_INTR_MASK_ALL (MCAN_IR_RF0N_MASK | \
110 MCAN_IR_RF0W_MASK | \
111 MCAN_IR_RF0F_MASK | \
112 MCAN_IR_RF0L_MASK | \
113 MCAN_IR_RF1N_MASK | \
114 MCAN_IR_RF1W_MASK | \
115 MCAN_IR_RF1F_MASK | \
116 MCAN_IR_RF1L_MASK | \
121 MCAN_IR_TEFN_MASK | \
122 MCAN_IR_TEFW_MASK | \
123 MCAN_IR_TEFF_MASK | \
124 MCAN_IR_TEFL_MASK | \
126 MCAN_IR_MRAF_MASK | \
143 #define MCAN_INTR_MASK_TX (MCAN_IR_TSW_MASK | \
144 MCAN_IR_MRAF_MASK | \
160 MCAN_IR_TEFN_MASK | \
161 MCAN_IR_TEFW_MASK | \
162 MCAN_IR_TEFF_MASK | \
168 #define MCAN_INTR_MASK_RX (MCAN_IR_RF0N_MASK | \
170 MCAN_IR_MRAF_MASK | \
184 MCAN_IR_RF0W_MASK | \
185 MCAN_IR_RF0F_MASK | \
186 MCAN_IR_RF0L_MASK | \
187 MCAN_IR_RF1N_MASK | \
188 MCAN_IR_RF1W_MASK | \
189 MCAN_IR_RF1F_MASK | \
195 #define MCAN_HEADER_SIZE_BYTES (8U)
201 #define MCAN_MAX_PAYLOAD_BYTES (64U)
211 #define MCAN_MSG_RAM_STD_ELEM_SIZE (1U)
213 #define MCAN_MSG_RAM_EXT_ELEM_SIZE (2U)
215 #define MCAN_MSG_RAM_TX_RX_ELEM_SIZE (18U)
228 #define MCAN_RX_FIFO_OPERATION_MODE_BLOCKING (0U)
230 #define MCAN_RX_FIFO_OPERATION_MODE_OVERWRITE (1U)
242 #define MCAN_TX_MEM_TYPE_BUF (0U)
244 #define MCAN_TX_MEM_TYPE_QUEUE (1U)
256 #define MCAN_DATA_SIZE_0BYTES (0U)
258 #define MCAN_DATA_SIZE_1BYTES (1U)
260 #define MCAN_DATA_SIZE_2BYTES (2U)
262 #define MCAN_DATA_SIZE_3BYTES (3U)
264 #define MCAN_DATA_SIZE_4BYTES (4U)
266 #define MCAN_DATA_SIZE_5BYTES (5U)
268 #define MCAN_DATA_SIZE_6BYTES (6U)
270 #define MCAN_DATA_SIZE_7BYTES (7U)
272 #define MCAN_DATA_SIZE_8BYTES (8U)
274 #define MCAN_DATA_SIZE_12BYTES (9U)
276 #define MCAN_DATA_SIZE_16BYTES (10U)
278 #define MCAN_DATA_SIZE_20BYTES (11U)
280 #define MCAN_DATA_SIZE_24BYTES (12U)
282 #define MCAN_DATA_SIZE_32BYTES (13U)
284 #define MCAN_DATA_SIZE_48BYTES (14U)
286 #define MCAN_DATA_SIZE_64BYTES (15U)
298 #define MCAN_STD_FILT_ELEM_DISABLE (0U)
300 #define MCAN_STD_FILT_ELEM_FIFO0 (1U)
302 #define MCAN_STD_FILT_ELEM_FIFO1 (2U)
304 #define MCAN_STD_FILT_ELEM_REJECT (3U)
306 #define MCAN_STD_FILT_ELEM_SET_PRIORITY (4U)
308 #define MCAN_STD_FILT_ELEM_SET_PRIORITY_FIFO0 (5U)
310 #define MCAN_STD_FILT_ELEM_SET_PRIORITY_FIFO1 (6U)
312 #define MCAN_STD_FILT_ELEM_BUFFER (7U)
325 #define MCAN_STD_FILT_TYPE_RANGE (0U)
327 #define MCAN_STD_FILT_TYPE_DUAL (1U)
329 #define MCAN_STD_FILT_TYPE_CLASSIC (2U)
331 #define MCAN_STD_FILT_TYPE_DISABLE (3U)
343 #define MCAN_EXT_FILT_ELEM_DISABLE (0U)
345 #define MCAN_EXT_FILT_ELEM_FIFO0 (1U)
347 #define MCAN_EXT_FILT_ELEM_FIFO1 (2U)
349 #define MCAN_EXT_FILT_ELEM_REJECT (3U)
351 #define MCAN_EXT_FILT_ELEM_SET_PRIORITY (4U)
353 #define MCAN_EXT_FILT_ELEM_SET_PRIORITY_FIFO0 (5U)
355 #define MCAN_EXT_FILT_ELEM_SET_PRIORITY_FIFO1 (6U)
357 #define MCAN_EXT_FILT_ELEM_BUFFER (7U)
370 #define MCAN_EXT_FILT_TYPE_RANGE (0U)
372 #define MCAN_EXT_FILT_TYPE_DUAL (1U)
374 #define MCAN_EXT_FILT_TYPE_CLASSIC (2U)
376 #define MCAN_EXT_FILT_TYPE_DISABLE (3U)
383 #define MCAN_MAX_TX_MSG_OBJECTS (32U)
388 #define MCAN_MAX_RX_MSG_OBJECTS (32U)
393 #define MCAN_MAX_MSG_OBJECTS (MCAN_MAX_TX_MSG_OBJECTS + MCAN_MAX_RX_MSG_OBJECTS)
405 #define MCAN_INTR_LINE_NUM_0 (0U)
407 #define MCAN_INTR_LINE_NUM_1 (1U)
421 #define MCAN_ID_TYPE_11_BIT (0U)
423 #define MCAN_ID_TYPE_29_BIT (1U)
437 #define MCAN_OPERATION_MODE_NORMAL (0U)
439 #define MCAN_OPERATION_MODE_SW_INIT (1U)
453 #define MCAN_MEM_TYPE_BUF (0U)
455 #define MCAN_MEM_TYPE_FIFO (1U)
469 #define MCAN_RX_FIFO_NUM_0 (0U)
471 #define MCAN_RX_FIFO_NUM_1 (1U)
485 #define MCAN_PIN_TYPE_RX (0U)
487 #define MCAN_PIN_TYPE_TX (1U)
501 #define MCAN_ELEM_SIZE_8BYTES (0U)
503 #define MCAN_ELEM_SIZE_12BYTES (1U)
505 #define MCAN_ELEM_SIZE_16BYTES (2U)
507 #define MCAN_ELEM_SIZE_20BYTES (3U)
509 #define MCAN_ELEM_SIZE_24BYTES (4U)
511 #define MCAN_ELEM_SIZE_32BYTES (5U)
513 #define MCAN_ELEM_SIZE_48BYTES (6U)
515 #define MCAN_ELEM_SIZE_64BYTES (7U)
529 #define MCAN_TIMEOUT_SELECT_CONT (0U)
531 #define MCAN_TIMEOUT_SELECT_TX_EVENT_FIFO (1U)
533 #define MCAN_TIMEOUT_SELECT_RX_FIFO0 (2U)
535 #define MCAN_TIMEOUT_SELECT_RX_FIFO1 (3U)
549 #define MCAN_INTR_SRC_RX_FIFO0_NEW_MSG (MCAN_IR_RF0N_MASK)
551 #define MCAN_INTR_SRC_RX_FIFO0_WATERMARK (MCAN_IR_RF0W_MASK)
553 #define MCAN_INTR_SRC_RX_FIFO0_FULL (MCAN_IR_RF0F_MASK)
555 #define MCAN_INTR_SRC_RX_FIFO0_MSG_LOST (MCAN_IR_RF0L_MASK)
557 #define MCAN_INTR_SRC_RX_FIFO1_NEW_MSG (MCAN_IR_RF1N_MASK)
559 #define MCAN_INTR_SRC_RX_FIFO1_WATERMARK (MCAN_IR_RF1W_MASK)
561 #define MCAN_INTR_SRC_RX_FIFO1_FULL (MCAN_IR_RF1F_MASK)
563 #define MCAN_INTR_SRC_RX_FIFO1_MSG_LOST (MCAN_IR_RF1L_MASK)
565 #define MCAN_INTR_SRC_HIGH_PRIO_MSG (MCAN_IR_HPM_MASK)
567 #define MCAN_INTR_SRC_TRANS_COMPLETE (MCAN_IR_TC_MASK)
569 #define MCAN_INTR_SRC_TRANS_CANCEL_FINISH (MCAN_IR_TCF_MASK)
571 #define MCAN_INTR_SRC_TX_FIFO_EMPTY (MCAN_IR_TFE_MASK)
573 #define MCAN_INTR_SRC_TX_EVT_FIFO_NEW_ENTRY (MCAN_IR_TEFN_MASK)
575 #define MCAN_INTR_SRC_TX_EVT_FIFO_WATERMARK (MCAN_IR_TEFW_MASK)
577 #define MCAN_INTR_SRC_TX_EVT_FIFO_FULL (MCAN_IR_TEFF_MASK)
579 #define MCAN_INTR_SRC_TX_EVT_FIFO_ELEM_LOST (MCAN_IR_TEFL_MASK)
581 #define MCAN_INTR_SRC_TIMESTAMP_WRAPAROUND (MCAN_IR_TSW_MASK)
583 #define MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE (MCAN_IR_MRAF_MASK)
585 #define MCAN_INTR_SRC_TIMEOUT (MCAN_IR_TOO_MASK)
587 #define MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG (MCAN_IR_DRX_MASK)
589 #define MCAN_INTR_SRC_BIT_ERR_CORRECTED (MCAN_IR_BEC_MASK)
591 #define MCAN_INTR_SRC_BIT_ERR_UNCORRECTED (MCAN_IR_BEU_MASK)
593 #define MCAN_INTR_SRC_ERR_LOG_OVRFLW (MCAN_IR_ELO_MASK)
595 #define MCAN_INTR_SRC_ERR_PASSIVE (MCAN_IR_EP_MASK)
597 #define MCAN_INTR_SRC_WARNING_STATUS (MCAN_IR_EW_MASK)
599 #define MCAN_INTR_SRC_BUS_OFF_STATUS (MCAN_IR_BO_MASK)
601 #define MCAN_INTR_SRC_WATCHDOG (MCAN_IR_WDI_MASK)
603 #define MCAN_INTR_SRC_PROTOCOL_ERR_ARB (MCAN_IR_PEA_MASK)
605 #define MCAN_INTR_SRC_PROTOCOL_ERR_DATA (MCAN_IR_PED_MASK)
607 #define MCAN_INTR_SRC_RES_ADDR_ACCESS (MCAN_IR_ARA_MASK)
621 #define MCAN_ECC_ERR_TYPE_SEC (0U)
623 #define MCAN_ECC_ERR_TYPE_DED (1U)
637 #define MCAN_LPBK_MODE_INTERNAL (0U)
642 #define MCAN_LPBK_MODE_EXTERNAL (1U)
660 #define MCAN_COM_STATE_SYNCHRONIZING (0U)
662 #define MCAN_COM_STATE_IDLE (1U)
664 #define MCAN_COM_STATE_RECEIVER (2U)
666 #define MCAN_COM_STATE_TRANSMITTER (3U)
680 #define MCAN_ERR_CODE_NO_ERROR (0U)
684 #define MCAN_ERR_CODE_STUFF_ERROR (1U)
688 #define MCAN_ERR_CODE_FORM_ERROR (2U)
690 #define MCAN_ERR_CODE_ACK_ERROR (3U)
694 #define MCAN_ERR_CODE_BIT1_ERROR (4U)
700 #define MCAN_ERR_CODE_BIT0_ERROR (5U)
710 #define MCAN_ERR_CODE_CRC_ERROR (6U)
715 #define MCAN_ERR_CODE_NO_CHANGE (7U)
1876 uint32_t *elemAddr);
1972 uint32_t *elemAddr);
2383 uint32_t prescalar);
2648 *msgRAMConfigParams);
2659 *msgRAMConfigParams);
uint8_t * data
Definition: mcan.h:1591
uint32_t bu
Definition: mcan.h:1291
uint32_t secErr
Definition: mcan.h:1260
uint32_t rfdf
Definition: mcan.h:1000
uint32_t tdcv
Definition: mcan.h:1011
uint32_t getIdx
Definition: mcan.h:1173
uint32_t scheme
Definition: mcan.h:1365
void MCAN_getBitTime(uint32_t baseAddr, MCAN_BitTimingParams *configParams)
This API will get the configured bit timings for MCAN module.
void MCAN_readMsgRamNoCpy(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, uint32_t fifoNum, MCAN_RxBufElementNoCpy *elem)
This API is used to read received message from message RAM. This uses the MCAN_RxBufElementNoCpy stru...
Structure for MCAN Global Filter Configuration parameters.
Definition: mcan.h:788
uint32_t fdf
Definition: mcan.h:1522
uint32_t emulationFAck
Definition: mcan.h:866
uint32_t rbrs
Definition: mcan.h:995
void MCAN_eccGetErrorStatus(uint32_t baseAddr, MCAN_ECCErrStatus *eccErr)
This API will return ECC Error status.
uint32_t freeLvl
Definition: mcan.h:1191
int32_t MCAN_getWriteMsgElemAddress(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, uint32_t *elemAddr)
This API is used to get the address of Tx buffer in message ram.
uint32_t putIdx
Definition: mcan.h:1215
uint32_t lse
Definition: mcan.h:1032
uint32_t esi
Definition: mcan.h:1453
Structure for MCAN ECC configuration parameters.
Definition: mcan.h:1342
uint32_t sfec
Definition: mcan.h:1658
uint32_t errType
Definition: mcan.h:1235
Structure for MCAN Rx Buffer element.
Definition: mcan.h:1491
uint32_t efbi
Definition: mcan.h:834
uint32_t mm
Definition: mcan.h:1645
uint32_t act
Definition: mcan.h:966
uint32_t MCAN_IntrLineNum
Enum to select the MCAN interrupt lines.
Definition: mcan.h:403
uint32_t xtd
Definition: mcan.h:1499
Structure for MCAN Tx Event FIFO element.
Definition: mcan.h:1601
void MCAN_extTSClearRawStatus(uint32_t baseAddr)
This API will clear External TimeStamp Counter Overflow Interrupt raw status for MCAN module.
uint32_t timeoutPreload
Definition: mcan.h:922
uint32_t anmf
Definition: mcan.h:1529
uint32_t minor
Definition: mcan.h:1334
void MCAN_eccAggrGetRevisionId(uint32_t baseAddr, MCAN_ECCAggrRevisionId *revId)
This API is used get the ECC AGGR revision ID.
uint32_t txStartAddr
Definition: mcan.h:1111
uint32_t xtd
Definition: mcan.h:1448
uint32_t pxe
Definition: mcan.h:1006
void MCAN_enableIntr(uint32_t baseAddr, uint32_t intrMask, uint32_t enable)
This API is used to enable/disable interrupts.
uint32_t esi
Definition: mcan.h:1614
uint32_t xtd
Definition: mcan.h:1393
uint32_t esi
Definition: mcan.h:1561
void MCAN_setOpMode(uint32_t baseAddr, uint32_t mode)
This API will set MCAN module mode of operation.
MCAN_TDCConfig tdcConfig
Definition: mcan.h:880
uint32_t fifoFull
Definition: mcan.h:1177
void MCAN_eccClearIntrStatus(uint32_t baseAddr, uint32_t errType)
This API is used to clear ECC interrupt status.
uint32_t et
Definition: mcan.h:1637
uint32_t msgLost
Definition: mcan.h:1182
Structure for MCAN configuration parameters.
Definition: mcan.h:895
uint32_t MCAN_PinType
Enum to represent the MCAN pin type.
Definition: mcan.h:483
void MCAN_getTxEventFIFOStatus(uint32_t baseAddr, MCAN_TxEventFIFOStatus *fifoStatus)
This API will Tx Event FIFO status.
Structure for MCAN Tx Buffer element.
Definition: mcan.h:1385
void MCAN_getRevisionId(uint32_t baseAddr, MCAN_RevisionId *revId)
This API is used get the MCAN revision ID.
uint32_t rxFIFO0StartAddr
Definition: mcan.h:1117
uint32_t xtd
Definition: mcan.h:1609
uint32_t MCAN_isFDOpEnable(uint32_t baseAddr)
This API will return flexible data rate operation status MCAN module.
uint32_t dlec
Definition: mcan.h:986
uint32_t rxFIFO0ElemSize
Definition: mcan.h:1085
uint32_t MCAN_getRxPinState(uint32_t baseAddr)
This API will return Rx pin state of MCAN module.
uint32_t rxFIFO1OpMode
Definition: mcan.h:1078
uint32_t wdcPreload
Definition: mcan.h:876
uint32_t efid1
Definition: mcan.h:1686
uint32_t rxBufStartAddr
Definition: mcan.h:1121
uint32_t dlc
Definition: mcan.h:1458
uint32_t efid2
Definition: mcan.h:1702
uint32_t txBufElemSize
Definition: mcan.h:1113
uint32_t MCAN_txBufCancellationStatus(uint32_t baseAddr)
This API will return Transmit Buffer Cancellation Finished status.
uint32_t busOffStatus
Definition: mcan.h:981
Structure for ECC Error forcing.
Definition: mcan.h:1234
uint32_t txEventFIFOStartAddr
Definition: mcan.h:1115
uint32_t MCAN_getOpMode(uint32_t baseAddr)
This API will return MCAN module mode of operation.
void MCAN_eccConfig(uint32_t baseAddr, const MCAN_ECCConfigParams *configParams)
This API will enable/disable ECC on the Message RAM.
uint32_t MCAN_ECCErrType
Enum to represent the ECC Error Types.
Definition: mcan.h:619
void MCAN_enableIntrLine(uint32_t baseAddr, uint32_t lineNum, uint32_t enable)
This API is used to enable/disable selected interrupt line.
uint32_t rxFIFO0WaterMark
Definition: mcan.h:1095
uint32_t rxBufElemSize
Definition: mcan.h:1083
uint32_t MCAN_LpbkMode
Enum to select the MCAN Loopback mode.
Definition: mcan.h:635
uint32_t txEventFIFOWaterMark
Definition: mcan.h:1089
uint32_t MCAN_IntrSrc
Enum for MCAN interrupts.
Definition: mcan.h:547
uint32_t fifoFull
Definition: mcan.h:1217
void MCAN_selectIntrLine(uint32_t baseAddr, uint32_t intrMask, uint32_t lineNum)
This API is used to select interrupt line.
void MCAN_initMsgRamConfigParams(MCAN_MsgRAMConfigParams *msgRAMConfigParams)
This API will initialize MCAN message config RAM params to default.
uint32_t dlc
Definition: mcan.h:1568
uint32_t efec
Definition: mcan.h:1688
uint32_t MCAN_RxFIFONum
Enum to represent the MCAN Rx FIFO number.
Definition: mcan.h:467
uint32_t rpStatus
Definition: mcan.h:948
uint32_t fillLvl
Definition: mcan.h:1211
uint32_t putIdx
Definition: mcan.h:1175
uint32_t flssa
Definition: mcan.h:1107
uint32_t dedErr
Definition: mcan.h:1265
uint32_t nomRatePrescalar
Definition: mcan.h:735
uint8_t * data
Definition: mcan.h:1481
uint32_t major
Definition: mcan.h:1373
uint32_t enable
Definition: mcan.h:1343
int32_t MCAN_calcMsgRamParamsStartAddr(MCAN_MsgRAMConfigParams *msgRAMConfigParams)
This API will calculate start addresses of message RAM params.
void MCAN_getErrCounters(uint32_t baseAddr, MCAN_ErrCntStatus *errCounter)
This API will return error counter status for MCAN module.
uint32_t fidx
Definition: mcan.h:1584
uint32_t fdMode
Definition: mcan.h:818
void MCAN_initSetBitTimeParams(MCAN_BitTimingParams *bitTimes)
This API will initialize MCAN GBit Timing params with default 1Mbps and 5Mbps as nominal and data bit...
uint32_t pxhddisable
Definition: mcan.h:840
uint32_t fifoFull
Definition: mcan.h:1199
uint32_t enableRdModWr
Definition: mcan.h:1353
uint32_t rtlRev
Definition: mcan.h:1295
uint32_t anfe
Definition: mcan.h:799
void MCAN_reset(uint32_t baseAddr)
This API is used to initiate reset for MCAN module.
uint32_t modId
Definition: mcan.h:1293
uint32_t MCAN_ComState
Enum to represent MCAN's communication state.
Definition: mcan.h:658
uint32_t brsEnable
Definition: mcan.h:823
uint32_t MCAN_TimeOutSelect
Enum to represent the MCAN time-out counter configuration.
Definition: mcan.h:527
uint32_t MCAN_getExtIDANDMassk(uint32_t baseAddr)
This API will get the configured Extended ID AND Mask.
uint32_t rtr
Definition: mcan.h:1494
uint32_t MCAN_isInReset(uint32_t baseAddr)
This function checks if the MCAN module is in Reset.
uint32_t rxFIFO1WaterMark
Definition: mcan.h:1101
uint32_t anfs
Definition: mcan.h:805
void MCAN_getRxFIFOStatus(uint32_t baseAddr, MCAN_RxFIFOStatus *fifoStatus)
This API will Rx FIFO status.
uint32_t MCAN_extTSIsIntrEnable(uint32_t baseAddr)
This API returns External TimeStamp Counter Overflow Interrupt enable status for MCAN module.
uint32_t fdf
Definition: mcan.h:1632
uint32_t resi
Definition: mcan.h:990
int32_t MCAN_txBufCancellationIntrEnable(uint32_t baseAddr, uint32_t bufNum, uint32_t enable)
This API is used to enable/disable Tx Buffer Cancellation Finished Interrupt.
uint32_t dlc
Definition: mcan.h:1511
uint32_t monEnable
Definition: mcan.h:896
uint32_t MCAN_getEndianVal(uint32_t baseAddr)
This function return endianness value of MCAN module.
uint32_t major
Definition: mcan.h:1330
uint32_t MCAN_getTxBufReqPend(uint32_t baseAddr)
This API will return Tx Buffer Request Pending status.
uint32_t filterIdx
Definition: mcan.h:1142
void MCAN_eccForceError(uint32_t baseAddr, const MCAN_ECCErrForceParams *eccErr)
This API will Force Error on ECC.
uint32_t nomTimeSeg2
Definition: mcan.h:743
void MCAN_eccWrapGetRevisionId(uint32_t baseAddr, MCAN_ECCWrapRevisionId *revId)
This API is used get the ECC Wrapper revision ID.
void MCAN_clearNewDataStatus(uint32_t baseAddr, const MCAN_RxNewDataStatus *newDataStatus)
This API clear New Data Message Status.
Structure for MCAN protocol status.
Definition: mcan.h:961
int32_t MCAN_setBitTime(uint32_t baseAddr, const MCAN_BitTimingParams *configParams)
This API will configure a bit timings for MCAN module.
Structure for bit timing calculation. Bit timing related to data phase will be valid only in case whe...
Definition: mcan.h:734
void MCAN_resetTSCounter(uint32_t baseAddr)
This API will reset timestamp counter value.
uint32_t xtd
Definition: mcan.h:1556
uint32_t brs
Definition: mcan.h:1627
uint32_t errPassive
Definition: mcan.h:970
void MCAN_writeHeaderToMsgRam(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, const MCAN_TxBufElement *elem)
This API is used to write Tx message Header to message RAM.
uint32_t esi
Definition: mcan.h:1398
uint32_t warningStatus
Definition: mcan.h:975
uint32_t fidx
Definition: mcan.h:1527
uint32_t txpEnable
Definition: mcan.h:829
uint32_t MCAN_getClkStopAck(uint32_t baseAddr)
This API will return clock stop acknowledgement for MCAN module.
uint32_t putIdx
Definition: mcan.h:1197
uint32_t dataTimeSeg1
Definition: mcan.h:755
uint32_t MCAN_getTOCounterVal(uint32_t baseAddr)
This API will return current time-out counter value.
void MCAN_clearIntrStatus(uint32_t baseAddr, uint32_t intrMask)
This API is used to clear the interrupt status.
void MCAN_initOperModeParams(MCAN_InitParams *initParams)
This API will initialize MCAN Operating mode params with default values.
uint32_t rxts
Definition: mcan.h:1566
uint32_t autoWkupEnable
Definition: mcan.h:856
uint32_t tsSelect
Definition: mcan.h:911
uint32_t efc
Definition: mcan.h:1474
uint32_t MCAN_ElemSize
Enum to represent FIFO/Buffer element Size.
Definition: mcan.h:499
uint32_t transErrLogCnt
Definition: mcan.h:944
void MCAN_writeMsgRam(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, const MCAN_TxBufElement *elem)
This API is used to write Tx message to message RAM.
uint32_t rtr
Definition: mcan.h:1443
uint32_t MCAN_extTSGetUnservicedIntrCount(uint32_t baseAddr)
This API returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter.
uint32_t filterList
Definition: mcan.h:1144
void MCAN_getHighPriorityMsgStatus(uint32_t baseAddr, MCAN_HighPriorityMsgInfo *hpm)
This API will return High Priority Message Status.
uint32_t id
Definition: mcan.h:1549
uint32_t eleLost
Definition: mcan.h:1222
Structure for accessing Revision ID of ECC AGGR.
Definition: mcan.h:1321
Structure for MCAN Standard Message ID Filter Element.
Definition: mcan.h:1653
uint32_t mon
Definition: mcan.h:1305
Structure for MCAN Rx FIFO Status.
Definition: mcan.h:1166
Structure for MCAN Rx Buffer element which takes data as a pointer. Using this the MCAL CAN driver ca...
Definition: mcan.h:1548
uint32_t modId
Definition: mcan.h:1369
uint32_t tdcf
Definition: mcan.h:774
uint32_t custom
Definition: mcan.h:1375
uint32_t rxFIFO1StartAddr
Definition: mcan.h:1119
uint32_t num
Definition: mcan.h:1167
Structure for MCAN High Priority Message.
Definition: mcan.h:1129
void MCAN_extTSSetRawStatus(uint32_t baseAddr)
This API will set External TimeStamp Counter Overflow Interrupt Raw status for MCAN module.
uint32_t tsPrescalar
Definition: mcan.h:907
int32_t MCAN_msgRAMConfig(uint32_t baseAddr, const MCAN_MsgRAMConfigParams *msgRAMConfigParams)
This API will configure Different sections of Message RAM.
uint32_t MCAN_OperationMode
Enum to represent the MCAN mode of operation.
Definition: mcan.h:435
MCAN_GlobalFiltConfig filterConfig
Definition: mcan.h:933
uint32_t statusHigh
Definition: mcan.h:1158
uint32_t getIdx
Definition: mcan.h:1213
uint32_t lastErrCode
Definition: mcan.h:962
uint32_t msi
Definition: mcan.h:1134
uint32_t MCAN_MemType
Enum to represent the MCAN Message RAM type.
Definition: mcan.h:451
uint32_t MCAN_IdType
Enum to represent the MCAN Identifier Type.
Definition: mcan.h:419
uint32_t brs
Definition: mcan.h:1574
uint32_t tdcEnable
Definition: mcan.h:884
void MCAN_getNewDataStatus(uint32_t baseAddr, MCAN_RxNewDataStatus *newDataStatus)
This API will return New Data Message Status.
void MCAN_eccEnableIntr(uint32_t baseAddr, uint32_t errType, uint32_t enable)
This API is used to enable ECC interrupt.
uint32_t bit1
Definition: mcan.h:1274
Structure for MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: ...
Definition: mcan.h:1025
void MCAN_eccClearErrorStatus(uint32_t baseAddr, uint32_t errType)
This API is used to clear the ECC Error status.
Structure for accessing Revision ID and Core Release Info. of MCAN module.
Definition: mcan.h:1288
void MCAN_extTSWriteEOI(uint32_t baseAddr)
This API is used to write End of Interrupt for External TimeStamp Counter Overflow Interrupt.
void MCAN_readMsgRam(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, uint32_t fifoNum, MCAN_RxBufElement *elem)
This API is used to read received message form message RAM.
uint32_t rxFIFO0OpMode
Definition: mcan.h:1067
uint32_t wkupReqEnable
Definition: mcan.h:851
uint32_t id
Definition: mcan.h:1602
uint32_t year
Definition: mcan.h:1307
void MCAN_addExtMsgIDFilter(uint32_t baseAddr, uint32_t filtNum, const MCAN_ExtMsgIDFilterElement *elem)
This API is used to add Extended Message ID Filter Element.
uint32_t rel
Definition: mcan.h:1313
uint32_t brs
Definition: mcan.h:1517
uint32_t rrfs
Definition: mcan.h:794
void MCAN_getProtocolStatus(uint32_t baseAddr, MCAN_ProtocolStatus *protStatus)
This API will return protocol status for MCAN module.
uint32_t dataTimeSeg2
Definition: mcan.h:759
uint32_t subStep
Definition: mcan.h:1309
Structure for ECC Error Status.
Definition: mcan.h:1259
uint32_t row
Definition: mcan.h:1270
uint32_t custom
Definition: mcan.h:1332
Structure for MCAN Tx FIFO Status.
Definition: mcan.h:1190
uint32_t anmf
Definition: mcan.h:1586
#define MCAN_MAX_PAYLOAD_BYTES
Maximum payload supported by CAN-FD protocol in bytes.
Definition: mcan.h:201
uint32_t errOnce
Definition: mcan.h:1247
uint32_t custom
Definition: mcan.h:1299
void MCAN_eccWriteEOI(uint32_t baseAddr, uint32_t errType)
This API is used to write End of Interrupt for ECC interrupt.
void MCAN_extTSEnableIntr(uint32_t baseAddr, uint32_t enable)
This API will enable/disable External TimeStamp Counter Overflow Interrupt for MCAN module.
uint32_t brs
Definition: mcan.h:1464
uint32_t dlc
Definition: mcan.h:1621
uint32_t MCAN_getTSCounterVal(uint32_t baseAddr)
This API will return current timestamp counter value.
int32_t MCAN_getReadMsgElemAddress(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, uint32_t fifoNum, uint32_t *elemAddr)
This API is used to get the address of Rx buffer in message ram.
uint32_t scheme
Definition: mcan.h:1322
uint32_t darEnable
Definition: mcan.h:845
uint32_t rowNum
Definition: mcan.h:1239
uint32_t rtlRev
Definition: mcan.h:1328
uint32_t rtlRev
Definition: mcan.h:1371
int32_t MCAN_writeRxFIFOAck(uint32_t baseAddr, uint32_t fifoNum, uint32_t idx)
This API will write Rx FIFO Acknowledgement.
uint32_t txFIFOCnt
Definition: mcan.h:1044
int32_t MCAN_init(uint32_t baseAddr, const MCAN_InitParams *initParams)
This API will initialize MCAN module.
uint32_t txEventFIFOCnt
Definition: mcan.h:1055
uint32_t scheme
Definition: mcan.h:1289
Structure for MCAN Extended Message ID Filter Element.
Definition: mcan.h:1685
uint32_t recErrCnt
Definition: mcan.h:946
uint32_t sft
Definition: mcan.h:1672
Structure for MCAN initialization parameters.
Definition: mcan.h:817
void MCAN_addStdMsgIDFilter(uint32_t baseAddr, uint32_t filtNum, const MCAN_StdMsgIDFilterElement *elem)
This API is used to add Standard Message ID Filter Element.
int32_t MCAN_txBufCancellationReq(uint32_t baseAddr, uint32_t buffNum)
This API will set Tx Buffer Cancellation Request.
void MCAN_writeMsgRamNoCpy(uint32_t baseAddr, uint32_t memType, uint32_t bufNum, const MCAN_TxBufElementNoCpy *elem)
This API is used to write Tx message to message RAM. This uses the MCAN_TxBufElementNoCpy structure e...
int32_t MCAN_writeDmaHeader(const void *data, const MCAN_TxBufElement *elem)
This API is used to write only the message header to MCAN TX data buffer and is required in DMA mode.
uint32_t rtr
Definition: mcan.h:1551
uint32_t esi
Definition: mcan.h:1504
uint32_t flesa
Definition: mcan.h:1109
int32_t MCAN_config(uint32_t baseAddr, const MCAN_ConfigParams *configParams)
This API will configure MCAN module.
Structure for MCAN Tx Buffer element which takes data as a pointer. Using this the MCAL CAN driver ca...
Definition: mcan.h:1440
uint32_t fdf
Definition: mcan.h:1469
uint32_t canErrLogCnt
Definition: mcan.h:953
uint32_t tdco
Definition: mcan.h:778
uint32_t errForce
Definition: mcan.h:1251
Structure for MCAN error logging counters status.
Definition: mcan.h:943
uint32_t brs
Definition: mcan.h:1409
uint32_t bit1
Definition: mcan.h:1241
uint32_t id
Definition: mcan.h:1386
uint32_t mm
Definition: mcan.h:1479
void MCAN_setTxPinState(uint32_t baseAddr, uint32_t state)
This API will set Tx pin state of MCAN module.
Structure for accessing Revision ID of ECC wrapper.
Definition: mcan.h:1364
Structure for MCAN new data flag for Rx buffer.
Definition: mcan.h:1155
void MCAN_lpbkModeEnable(uint32_t baseAddr, uint32_t lpbkMode, uint32_t enable)
This API will enable/disable Loop Back Test Mode for MCAN module.
uint32_t dataSynchJumpWidth
Definition: mcan.h:763
uint32_t MCAN_ErrCode
Enum to represent MCAN's Error Code.
Definition: mcan.h:678
uint32_t MCAN_getIntrLineSelectStatus(uint32_t baseAddr)
This API is used to get interrupt line selected for each interrupt.
uint32_t bu
Definition: mcan.h:1324
uint32_t timeoutCntEnable
Definition: mcan.h:928
uint32_t day
Definition: mcan.h:1303
uint32_t id
Definition: mcan.h:1441
uint32_t fillLvl
Definition: mcan.h:1171
int32_t MCAN_writeTxEventFIFOAck(uint32_t baseAddr, uint32_t idx)
This API will write Event FIFO Acknowledge Index.
uint32_t modId
Definition: mcan.h:1326
Structure for MCAN Transmitter Delay Compensation parameters.
Definition: mcan.h:773
uint32_t mm
Definition: mcan.h:1424
uint32_t txts
Definition: mcan.h:1619
uint32_t MCAN_getIntrStatus(uint32_t baseAddr)
This API will return interrupt status.
uint32_t eft
Definition: mcan.h:1704
uint32_t MCAN_getTxBufTransmissionStatus(uint32_t baseAddr)
This API will return Tx Buffer Transmission Occurred status.
uint32_t getIdx
Definition: mcan.h:1193
uint32_t enableChk
Definition: mcan.h:1348
uint32_t bit2
Definition: mcan.h:1277
uint32_t sfid2
Definition: mcan.h:1654
void MCAN_initGlobalFilterConfigParams(MCAN_ConfigParams *configParams)
This API will initialize MCAN Global Filter config params with default values.
uint32_t txBufCnt
Definition: mcan.h:1038
uint32_t major
Definition: mcan.h:1297
uint32_t MCAN_eccGetIntrStatus(uint32_t baseAddr, uint32_t errType)
This API is used to get ECC interrupt status.
Structure for MCAN Tx Event FIFO Status.
Definition: mcan.h:1210
uint32_t fdf
Definition: mcan.h:1579
uint32_t asmEnable
Definition: mcan.h:901
uint32_t rtr
Definition: mcan.h:1604
uint32_t id
Definition: mcan.h:1492
uint32_t efc
Definition: mcan.h:1419
uint32_t bu
Definition: mcan.h:1367
int32_t MCAN_setExtIDAndMask(uint32_t baseAddr, uint32_t idMask)
This API will configure Extended ID AND Mask.
uint32_t rxts
Definition: mcan.h:1509
void MCAN_getTxFIFOQueStatus(uint32_t baseAddr, MCAN_TxFIFOStatus *fifoStatus)
This API will Tx FIFO status.
void MCAN_extTSCounterEnable(uint32_t baseAddr, uint32_t enable)
This API will enable/disable fast external time stamp counter for MCAN module.
uint32_t rxFIFO1ElemSize
Definition: mcan.h:1087
uint32_t lss
Definition: mcan.h:1026
uint32_t nomSynchJumpWidth
Definition: mcan.h:747
uint32_t statusLow
Definition: mcan.h:1156
uint32_t MCAN_getClockStopAck(uint32_t baseAddr)
This API get clock stop acknowledgement for MCAN module. It return whether MCAN is power down mode or...
uint32_t minor
Definition: mcan.h:1301
void MCAN_readTxEventFIFO(uint32_t baseAddr, MCAN_TxEventFIFOElement *txEventElem)
This API is used to read message form Tx Event FIFO.
int32_t MCAN_txBufAddReq(uint32_t baseAddr, uint32_t bufNum)
This API will set Tx Buffer Add Request.
uint32_t bufIdx
Definition: mcan.h:1130
uint32_t MCAN_isMemInitDone(uint32_t baseAddr)
This function checks if the memory initialization is done for MCAN module.
uint32_t minor
Definition: mcan.h:1377
uint32_t step
Definition: mcan.h:1311
uint32_t fdf
Definition: mcan.h:1414
uint32_t MCAN_getTxPinState(uint32_t baseAddr)
This API will return Tx pin state of MCAN module.
int32_t MCAN_txBufTransIntrEnable(uint32_t baseAddr, uint32_t bufNum, uint32_t enable)
This API is used to enable/disable Tx Buffer Transmission Interrupt.
void MCAN_extTSCounterConfig(uint32_t baseAddr, uint32_t prescalar)
This API will configure external timestamp counter for MCAN module.
uint32_t timeoutSelect
Definition: mcan.h:918
uint32_t dataRatePrescalar
Definition: mcan.h:751
uint32_t dlc
Definition: mcan.h:1403
uint32_t rrfe
Definition: mcan.h:789
uint32_t rxFIFO1Cnt
Definition: mcan.h:1072
uint32_t rtr
Definition: mcan.h:1388
uint32_t nomTimeSeg1
Definition: mcan.h:739
uint32_t clkStopFAck
Definition: mcan.h:871
uint32_t sfid1
Definition: mcan.h:1656
void MCAN_initTxBufElement(MCAN_TxBufElement *txMsg)
This API will initialize TX message object with default values.
uint32_t emulationEnable
Definition: mcan.h:861
uint32_t rxFIFO0Cnt
Definition: mcan.h:1061
uint32_t bit2
Definition: mcan.h:1245
uint32_t txBufMode
Definition: mcan.h:1050
void MCAN_addClockStopRequest(uint32_t baseAddr, uint32_t enable)
This API add clock stop request for MCAN module to put it in power down mode.