|
AM263x MCU+ SDK
10.00.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_HEADER_SIZE_BYTES (8U)
149 #define MCAN_MAX_PAYLOAD_BYTES (64U)
159 #define MCAN_MSG_RAM_STD_ELEM_SIZE (1U)
161 #define MCAN_MSG_RAM_EXT_ELEM_SIZE (2U)
163 #define MCAN_MSG_RAM_TX_RX_ELEM_SIZE (18U)
176 #define MCAN_RX_FIFO_OPERATION_MODE_BLOCKING (0U)
178 #define MCAN_RX_FIFO_OPERATION_MODE_OVERWRITE (1U)
190 #define MCAN_TX_MEM_TYPE_BUF (0U)
192 #define MCAN_TX_MEM_TYPE_QUEUE (1U)
204 #define MCAN_DATA_SIZE_0BYTES (0U)
206 #define MCAN_DATA_SIZE_1BYTES (1U)
208 #define MCAN_DATA_SIZE_2BYTES (2U)
210 #define MCAN_DATA_SIZE_3BYTES (3U)
212 #define MCAN_DATA_SIZE_4BYTES (4U)
214 #define MCAN_DATA_SIZE_5BYTES (5U)
216 #define MCAN_DATA_SIZE_6BYTES (6U)
218 #define MCAN_DATA_SIZE_7BYTES (7U)
220 #define MCAN_DATA_SIZE_8BYTES (8U)
222 #define MCAN_DATA_SIZE_12BYTES (9U)
224 #define MCAN_DATA_SIZE_16BYTES (10U)
226 #define MCAN_DATA_SIZE_20BYTES (11U)
228 #define MCAN_DATA_SIZE_24BYTES (12U)
230 #define MCAN_DATA_SIZE_32BYTES (13U)
232 #define MCAN_DATA_SIZE_48BYTES (14U)
234 #define MCAN_DATA_SIZE_64BYTES (15U)
246 #define MCAN_STD_FILT_ELEM_DISABLE (0U)
248 #define MCAN_STD_FILT_ELEM_FIFO0 (1U)
250 #define MCAN_STD_FILT_ELEM_FIFO1 (2U)
252 #define MCAN_STD_FILT_ELEM_REJECT (3U)
254 #define MCAN_STD_FILT_ELEM_SET_PRIORITY (4U)
256 #define MCAN_STD_FILT_ELEM_SET_PRIORITY_FIFO0 (5U)
258 #define MCAN_STD_FILT_ELEM_SET_PRIORITY_FIFO1 (6U)
260 #define MCAN_STD_FILT_ELEM_BUFFER (7U)
273 #define MCAN_STD_FILT_TYPE_RANGE (0U)
275 #define MCAN_STD_FILT_TYPE_DUAL (1U)
277 #define MCAN_STD_FILT_TYPE_CLASSIC (2U)
279 #define MCAN_STD_FILT_TYPE_DISABLE (3U)
291 #define MCAN_EXT_FILT_ELEM_DISABLE (0U)
293 #define MCAN_EXT_FILT_ELEM_FIFO0 (1U)
295 #define MCAN_EXT_FILT_ELEM_FIFO1 (2U)
297 #define MCAN_EXT_FILT_ELEM_REJECT (3U)
299 #define MCAN_EXT_FILT_ELEM_SET_PRIORITY (4U)
301 #define MCAN_EXT_FILT_ELEM_SET_PRIORITY_FIFO0 (5U)
303 #define MCAN_EXT_FILT_ELEM_SET_PRIORITY_FIFO1 (6U)
305 #define MCAN_EXT_FILT_ELEM_BUFFER (7U)
318 #define MCAN_EXT_FILT_TYPE_RANGE (0U)
320 #define MCAN_EXT_FILT_TYPE_DUAL (1U)
322 #define MCAN_EXT_FILT_TYPE_CLASSIC (2U)
324 #define MCAN_EXT_FILT_TYPE_DISABLE (3U)
331 #define MCAN_MAX_TX_MSG_OBJECTS (32U)
336 #define MCAN_MAX_RX_MSG_OBJECTS (32U)
341 #define MCAN_MAX_MSG_OBJECTS (MCAN_MAX_TX_MSG_OBJECTS + MCAN_MAX_RX_MSG_OBJECTS)
353 #define MCAN_INTR_LINE_NUM_0 (0U)
355 #define MCAN_INTR_LINE_NUM_1 (1U)
369 #define MCAN_ID_TYPE_11_BIT (0U)
371 #define MCAN_ID_TYPE_29_BIT (1U)
385 #define MCAN_OPERATION_MODE_NORMAL (0U)
387 #define MCAN_OPERATION_MODE_SW_INIT (1U)
401 #define MCAN_MEM_TYPE_BUF (0U)
403 #define MCAN_MEM_TYPE_FIFO (1U)
417 #define MCAN_RX_FIFO_NUM_0 (0U)
419 #define MCAN_RX_FIFO_NUM_1 (1U)
433 #define MCAN_PIN_TYPE_RX (0U)
435 #define MCAN_PIN_TYPE_TX (1U)
449 #define MCAN_ELEM_SIZE_8BYTES (0U)
451 #define MCAN_ELEM_SIZE_12BYTES (1U)
453 #define MCAN_ELEM_SIZE_16BYTES (2U)
455 #define MCAN_ELEM_SIZE_20BYTES (3U)
457 #define MCAN_ELEM_SIZE_24BYTES (4U)
459 #define MCAN_ELEM_SIZE_32BYTES (5U)
461 #define MCAN_ELEM_SIZE_48BYTES (6U)
463 #define MCAN_ELEM_SIZE_64BYTES (7U)
477 #define MCAN_TIMEOUT_SELECT_CONT (0U)
479 #define MCAN_TIMEOUT_SELECT_TX_EVENT_FIFO (1U)
481 #define MCAN_TIMEOUT_SELECT_RX_FIFO0 (2U)
483 #define MCAN_TIMEOUT_SELECT_RX_FIFO1 (3U)
497 #define MCAN_INTR_SRC_RX_FIFO0_NEW_MSG (MCAN_IR_RF0N_MASK)
499 #define MCAN_INTR_SRC_RX_FIFO0_WATERMARK (MCAN_IR_RF0W_MASK)
501 #define MCAN_INTR_SRC_RX_FIFO0_FULL (MCAN_IR_RF0F_MASK)
503 #define MCAN_INTR_SRC_RX_FIFO0_MSG_LOST (MCAN_IR_RF0L_MASK)
505 #define MCAN_INTR_SRC_RX_FIFO1_NEW_MSG (MCAN_IR_RF1N_MASK)
507 #define MCAN_INTR_SRC_RX_FIFO1_WATERMARK (MCAN_IR_RF1W_MASK)
509 #define MCAN_INTR_SRC_RX_FIFO1_FULL (MCAN_IR_RF1F_MASK)
511 #define MCAN_INTR_SRC_RX_FIFO1_MSG_LOST (MCAN_IR_RF1L_MASK)
513 #define MCAN_INTR_SRC_HIGH_PRIO_MSG (MCAN_IR_HPM_MASK)
515 #define MCAN_INTR_SRC_TRANS_COMPLETE (MCAN_IR_TC_MASK)
517 #define MCAN_INTR_SRC_TRANS_CANCEL_FINISH (MCAN_IR_TCF_MASK)
519 #define MCAN_INTR_SRC_TX_FIFO_EMPTY (MCAN_IR_TFE_MASK)
521 #define MCAN_INTR_SRC_TX_EVT_FIFO_NEW_ENTRY (MCAN_IR_TEFN_MASK)
523 #define MCAN_INTR_SRC_TX_EVT_FIFO_WATERMARK (MCAN_IR_TEFW_MASK)
525 #define MCAN_INTR_SRC_TX_EVT_FIFO_FULL (MCAN_IR_TEFF_MASK)
527 #define MCAN_INTR_SRC_TX_EVT_FIFO_ELEM_LOST (MCAN_IR_TEFL_MASK)
529 #define MCAN_INTR_SRC_TIMESTAMP_WRAPAROUND (MCAN_IR_TSW_MASK)
531 #define MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE (MCAN_IR_MRAF_MASK)
533 #define MCAN_INTR_SRC_TIMEOUT (MCAN_IR_TOO_MASK)
535 #define MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG (MCAN_IR_DRX_MASK)
537 #define MCAN_INTR_SRC_BIT_ERR_CORRECTED (MCAN_IR_BEC_MASK)
539 #define MCAN_INTR_SRC_BIT_ERR_UNCORRECTED (MCAN_IR_BEU_MASK)
541 #define MCAN_INTR_SRC_ERR_LOG_OVRFLW (MCAN_IR_ELO_MASK)
543 #define MCAN_INTR_SRC_ERR_PASSIVE (MCAN_IR_EP_MASK)
545 #define MCAN_INTR_SRC_WARNING_STATUS (MCAN_IR_EW_MASK)
547 #define MCAN_INTR_SRC_BUS_OFF_STATUS (MCAN_IR_BO_MASK)
549 #define MCAN_INTR_SRC_WATCHDOG (MCAN_IR_WDI_MASK)
551 #define MCAN_INTR_SRC_PROTOCOL_ERR_ARB (MCAN_IR_PEA_MASK)
553 #define MCAN_INTR_SRC_PROTOCOL_ERR_DATA (MCAN_IR_PED_MASK)
555 #define MCAN_INTR_SRC_RES_ADDR_ACCESS (MCAN_IR_ARA_MASK)
569 #define MCAN_ECC_ERR_TYPE_SEC (0U)
571 #define MCAN_ECC_ERR_TYPE_DED (1U)
585 #define MCAN_LPBK_MODE_INTERNAL (0U)
590 #define MCAN_LPBK_MODE_EXTERNAL (1U)
608 #define MCAN_COM_STATE_SYNCHRONIZING (0U)
610 #define MCAN_COM_STATE_IDLE (1U)
612 #define MCAN_COM_STATE_RECEIVER (2U)
614 #define MCAN_COM_STATE_TRANSMITTER (3U)
628 #define MCAN_ERR_CODE_NO_ERROR (0U)
632 #define MCAN_ERR_CODE_STUFF_ERROR (1U)
636 #define MCAN_ERR_CODE_FORM_ERROR (2U)
638 #define MCAN_ERR_CODE_ACK_ERROR (3U)
642 #define MCAN_ERR_CODE_BIT1_ERROR (4U)
648 #define MCAN_ERR_CODE_BIT0_ERROR (5U)
658 #define MCAN_ERR_CODE_CRC_ERROR (6U)
663 #define MCAN_ERR_CODE_NO_CHANGE (7U)
1824 uint32_t *elemAddr);
1920 uint32_t *elemAddr);
2331 uint32_t prescalar);
2596 *msgRAMConfigParams);
2607 *msgRAMConfigParams);
uint8_t * data
Definition: mcan.h:1539
uint32_t bu
Definition: mcan.h:1239
uint32_t secErr
Definition: mcan.h:1208
uint32_t rfdf
Definition: mcan.h:948
uint32_t tdcv
Definition: mcan.h:959
uint32_t getIdx
Definition: mcan.h:1121
uint32_t scheme
Definition: mcan.h:1313
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:736
uint32_t fdf
Definition: mcan.h:1470
uint32_t emulationFAck
Definition: mcan.h:814
uint32_t rbrs
Definition: mcan.h:943
void MCAN_eccGetErrorStatus(uint32_t baseAddr, MCAN_ECCErrStatus *eccErr)
This API will return ECC Error status.
uint32_t freeLvl
Definition: mcan.h:1139
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:1163
uint32_t lse
Definition: mcan.h:980
uint32_t esi
Definition: mcan.h:1401
Structure for MCAN ECC configuration parameters.
Definition: mcan.h:1290
uint32_t sfec
Definition: mcan.h:1606
uint32_t errType
Definition: mcan.h:1183
Structure for MCAN Rx Buffer element.
Definition: mcan.h:1439
uint32_t efbi
Definition: mcan.h:782
uint32_t mm
Definition: mcan.h:1593
uint32_t act
Definition: mcan.h:914
uint32_t MCAN_IntrLineNum
Enum to select the MCAN interrupt lines.
Definition: mcan.h:351
uint32_t xtd
Definition: mcan.h:1447
Structure for MCAN Tx Event FIFO element.
Definition: mcan.h:1549
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:870
uint32_t anmf
Definition: mcan.h:1477
uint32_t minor
Definition: mcan.h:1282
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:1059
uint32_t xtd
Definition: mcan.h:1396
uint32_t pxe
Definition: mcan.h:954
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:1562
uint32_t xtd
Definition: mcan.h:1341
uint32_t esi
Definition: mcan.h:1509
void MCAN_setOpMode(uint32_t baseAddr, uint32_t mode)
This API will set MCAN module mode of operation.
MCAN_TDCConfig tdcConfig
Definition: mcan.h:828
uint32_t fifoFull
Definition: mcan.h:1125
void MCAN_eccClearIntrStatus(uint32_t baseAddr, uint32_t errType)
This API is used to clear ECC interrupt status.
uint32_t et
Definition: mcan.h:1585
uint32_t msgLost
Definition: mcan.h:1130
Structure for MCAN configuration parameters.
Definition: mcan.h:843
uint32_t MCAN_PinType
Enum to represent the MCAN pin type.
Definition: mcan.h:431
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:1333
void MCAN_getRevisionId(uint32_t baseAddr, MCAN_RevisionId *revId)
This API is used get the MCAN revision ID.
uint32_t rxFIFO0StartAddr
Definition: mcan.h:1065
uint32_t xtd
Definition: mcan.h:1557
uint32_t MCAN_isFDOpEnable(uint32_t baseAddr)
This API will return flexible data rate operation status MCAN module.
uint32_t dlec
Definition: mcan.h:934
uint32_t rxFIFO0ElemSize
Definition: mcan.h:1033
uint32_t MCAN_getRxPinState(uint32_t baseAddr)
This API will return Rx pin state of MCAN module.
uint32_t rxFIFO1OpMode
Definition: mcan.h:1026
uint32_t wdcPreload
Definition: mcan.h:824
uint32_t efid1
Definition: mcan.h:1634
uint32_t rxBufStartAddr
Definition: mcan.h:1069
uint32_t dlc
Definition: mcan.h:1406
uint32_t efid2
Definition: mcan.h:1650
uint32_t txBufElemSize
Definition: mcan.h:1061
uint32_t MCAN_txBufCancellationStatus(uint32_t baseAddr)
This API will return Transmit Buffer Cancellation Finished status.
uint32_t busOffStatus
Definition: mcan.h:929
Structure for ECC Error forcing.
Definition: mcan.h:1182
uint32_t txEventFIFOStartAddr
Definition: mcan.h:1063
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:567
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:1043
uint32_t rxBufElemSize
Definition: mcan.h:1031
uint32_t MCAN_LpbkMode
Enum to select the MCAN Loopback mode.
Definition: mcan.h:583
uint32_t txEventFIFOWaterMark
Definition: mcan.h:1037
uint32_t MCAN_IntrSrc
Enum for MCAN interrupts.
Definition: mcan.h:495
uint32_t fifoFull
Definition: mcan.h:1165
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:1516
uint32_t efec
Definition: mcan.h:1636
uint32_t MCAN_RxFIFONum
Enum to represent the MCAN Rx FIFO number.
Definition: mcan.h:415
uint32_t rpStatus
Definition: mcan.h:896
uint32_t fillLvl
Definition: mcan.h:1159
uint32_t putIdx
Definition: mcan.h:1123
uint32_t flssa
Definition: mcan.h:1055
uint32_t dedErr
Definition: mcan.h:1213
uint32_t nomRatePrescalar
Definition: mcan.h:683
uint8_t * data
Definition: mcan.h:1429
uint32_t major
Definition: mcan.h:1321
uint32_t enable
Definition: mcan.h:1291
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:1532
uint32_t fdMode
Definition: mcan.h:766
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:788
uint32_t fifoFull
Definition: mcan.h:1147
uint32_t enableRdModWr
Definition: mcan.h:1301
uint32_t rtlRev
Definition: mcan.h:1243
uint32_t anfe
Definition: mcan.h:747
void MCAN_reset(uint32_t baseAddr)
This API is used to initiate reset for MCAN module.
uint32_t modId
Definition: mcan.h:1241
uint32_t MCAN_ComState
Enum to represent MCAN's communication state.
Definition: mcan.h:606
uint32_t brsEnable
Definition: mcan.h:771
uint32_t MCAN_TimeOutSelect
Enum to represent the MCAN time-out counter configuration.
Definition: mcan.h:475
uint32_t MCAN_getExtIDANDMassk(uint32_t baseAddr)
This API will get the configured Extended ID AND Mask.
uint32_t rtr
Definition: mcan.h:1442
uint32_t MCAN_isInReset(uint32_t baseAddr)
This function checks if the MCAN module is in Reset.
uint32_t rxFIFO1WaterMark
Definition: mcan.h:1049
uint32_t anfs
Definition: mcan.h:753
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:1580
uint32_t resi
Definition: mcan.h:938
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:1459
uint32_t monEnable
Definition: mcan.h:844
uint32_t MCAN_getEndianVal(uint32_t baseAddr)
This function return endianness value of MCAN module.
uint32_t major
Definition: mcan.h:1278
uint32_t MCAN_getTxBufReqPend(uint32_t baseAddr)
This API will return Tx Buffer Request Pending status.
uint32_t filterIdx
Definition: mcan.h:1090
void MCAN_eccForceError(uint32_t baseAddr, const MCAN_ECCErrForceParams *eccErr)
This API will Force Error on ECC.
uint32_t nomTimeSeg2
Definition: mcan.h:691
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:909
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:682
void MCAN_resetTSCounter(uint32_t baseAddr)
This API will reset timestamp counter value.
uint32_t xtd
Definition: mcan.h:1504
uint32_t brs
Definition: mcan.h:1575
uint32_t errPassive
Definition: mcan.h:918
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:1346
uint32_t warningStatus
Definition: mcan.h:923
uint32_t fidx
Definition: mcan.h:1475
uint32_t txpEnable
Definition: mcan.h:777
uint32_t MCAN_getClkStopAck(uint32_t baseAddr)
This API will return clock stop acknowledgement for MCAN module.
uint32_t putIdx
Definition: mcan.h:1145
uint32_t dataTimeSeg1
Definition: mcan.h:703
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:1514
uint32_t autoWkupEnable
Definition: mcan.h:804
uint32_t tsSelect
Definition: mcan.h:859
uint32_t efc
Definition: mcan.h:1422
uint32_t MCAN_ElemSize
Enum to represent FIFO/Buffer element Size.
Definition: mcan.h:447
uint32_t transErrLogCnt
Definition: mcan.h:892
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:1391
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:1092
void MCAN_getHighPriorityMsgStatus(uint32_t baseAddr, MCAN_HighPriorityMsgInfo *hpm)
This API will return High Priority Message Status.
uint32_t id
Definition: mcan.h:1497
uint32_t eleLost
Definition: mcan.h:1170
Structure for accessing Revision ID of ECC AGGR.
Definition: mcan.h:1269
Structure for MCAN Standard Message ID Filter Element.
Definition: mcan.h:1601
uint32_t mon
Definition: mcan.h:1253
Structure for MCAN Rx FIFO Status.
Definition: mcan.h:1114
Structure for MCAN Rx Buffer element which takes data as a pointer. Using this the MCAL CAN driver ca...
Definition: mcan.h:1496
uint32_t modId
Definition: mcan.h:1317
uint32_t tdcf
Definition: mcan.h:722
uint32_t custom
Definition: mcan.h:1323
uint32_t rxFIFO1StartAddr
Definition: mcan.h:1067
uint32_t num
Definition: mcan.h:1115
Structure for MCAN High Priority Message.
Definition: mcan.h:1077
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:855
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:383
MCAN_GlobalFiltConfig filterConfig
Definition: mcan.h:881
uint32_t statusHigh
Definition: mcan.h:1106
uint32_t getIdx
Definition: mcan.h:1161
uint32_t lastErrCode
Definition: mcan.h:910
uint32_t msi
Definition: mcan.h:1082
uint32_t MCAN_MemType
Enum to represent the MCAN Message RAM type.
Definition: mcan.h:399
uint32_t MCAN_IdType
Enum to represent the MCAN Identifier Type.
Definition: mcan.h:367
uint32_t brs
Definition: mcan.h:1522
uint32_t tdcEnable
Definition: mcan.h:832
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:1222
Structure for MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: ...
Definition: mcan.h:973
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:1236
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:1015
uint32_t wkupReqEnable
Definition: mcan.h:799
uint32_t id
Definition: mcan.h:1550
uint32_t year
Definition: mcan.h:1255
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:1261
uint32_t brs
Definition: mcan.h:1465
uint32_t rrfs
Definition: mcan.h:742
void MCAN_getProtocolStatus(uint32_t baseAddr, MCAN_ProtocolStatus *protStatus)
This API will return protocol status for MCAN module.
uint32_t dataTimeSeg2
Definition: mcan.h:707
uint32_t subStep
Definition: mcan.h:1257
Structure for ECC Error Status.
Definition: mcan.h:1207
uint32_t row
Definition: mcan.h:1218
uint32_t custom
Definition: mcan.h:1280
Structure for MCAN Tx FIFO Status.
Definition: mcan.h:1138
uint32_t anmf
Definition: mcan.h:1534
#define MCAN_MAX_PAYLOAD_BYTES
Maximum payload supported by CAN-FD protocol in bytes.
Definition: mcan.h:149
uint32_t errOnce
Definition: mcan.h:1195
uint32_t custom
Definition: mcan.h:1247
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:1412
uint32_t dlc
Definition: mcan.h:1569
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:1270
uint32_t darEnable
Definition: mcan.h:793
uint32_t rowNum
Definition: mcan.h:1187
uint32_t rtlRev
Definition: mcan.h:1276
uint32_t rtlRev
Definition: mcan.h:1319
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:992
int32_t MCAN_init(uint32_t baseAddr, const MCAN_InitParams *initParams)
This API will initialize MCAN module.
uint32_t txEventFIFOCnt
Definition: mcan.h:1003
uint32_t scheme
Definition: mcan.h:1237
Structure for MCAN Extended Message ID Filter Element.
Definition: mcan.h:1633
uint32_t recErrCnt
Definition: mcan.h:894
uint32_t sft
Definition: mcan.h:1620
Structure for MCAN initialization parameters.
Definition: mcan.h:765
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:1499
uint32_t esi
Definition: mcan.h:1452
uint32_t flesa
Definition: mcan.h:1057
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:1388
uint32_t fdf
Definition: mcan.h:1417
uint32_t canErrLogCnt
Definition: mcan.h:901
uint32_t tdco
Definition: mcan.h:726
uint32_t errForce
Definition: mcan.h:1199
Structure for MCAN error logging counters status.
Definition: mcan.h:891
uint32_t brs
Definition: mcan.h:1357
uint32_t bit1
Definition: mcan.h:1189
uint32_t id
Definition: mcan.h:1334
uint32_t mm
Definition: mcan.h:1427
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:1312
Structure for MCAN new data flag for Rx buffer.
Definition: mcan.h:1103
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:711
uint32_t MCAN_ErrCode
Enum to represent MCAN's Error Code.
Definition: mcan.h:626
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:1272
uint32_t timeoutCntEnable
Definition: mcan.h:876
uint32_t day
Definition: mcan.h:1251
uint32_t id
Definition: mcan.h:1389
uint32_t fillLvl
Definition: mcan.h:1119
int32_t MCAN_writeTxEventFIFOAck(uint32_t baseAddr, uint32_t idx)
This API will write Event FIFO Acknowledge Index.
uint32_t modId
Definition: mcan.h:1274
Structure for MCAN Transmitter Delay Compensation parameters.
Definition: mcan.h:721
uint32_t mm
Definition: mcan.h:1372
uint32_t txts
Definition: mcan.h:1567
uint32_t MCAN_getIntrStatus(uint32_t baseAddr)
This API will return interrupt status.
uint32_t eft
Definition: mcan.h:1652
uint32_t MCAN_getTxBufTransmissionStatus(uint32_t baseAddr)
This API will return Tx Buffer Transmission Occurred status.
uint32_t getIdx
Definition: mcan.h:1141
uint32_t enableChk
Definition: mcan.h:1296
uint32_t bit2
Definition: mcan.h:1225
uint32_t sfid2
Definition: mcan.h:1602
void MCAN_initGlobalFilterConfigParams(MCAN_ConfigParams *configParams)
This API will initialize MCAN Global Filter config params with default values.
uint32_t txBufCnt
Definition: mcan.h:986
uint32_t major
Definition: mcan.h:1245
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:1158
uint32_t fdf
Definition: mcan.h:1527
uint32_t asmEnable
Definition: mcan.h:849
uint32_t rtr
Definition: mcan.h:1552
uint32_t id
Definition: mcan.h:1440
uint32_t efc
Definition: mcan.h:1367
uint32_t bu
Definition: mcan.h:1315
int32_t MCAN_setExtIDAndMask(uint32_t baseAddr, uint32_t idMask)
This API will configure Extended ID AND Mask.
uint32_t rxts
Definition: mcan.h:1457
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:1035
uint32_t lss
Definition: mcan.h:974
uint32_t nomSynchJumpWidth
Definition: mcan.h:695
uint32_t statusLow
Definition: mcan.h:1104
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:1249
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:1078
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:1325
uint32_t step
Definition: mcan.h:1259
uint32_t fdf
Definition: mcan.h:1362
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:866
uint32_t dataRatePrescalar
Definition: mcan.h:699
uint32_t dlc
Definition: mcan.h:1351
uint32_t rrfe
Definition: mcan.h:737
uint32_t rxFIFO1Cnt
Definition: mcan.h:1020
uint32_t rtr
Definition: mcan.h:1336
uint32_t nomTimeSeg1
Definition: mcan.h:687
uint32_t clkStopFAck
Definition: mcan.h:819
uint32_t sfid1
Definition: mcan.h:1604
void MCAN_initTxBufElement(MCAN_TxBufElement *txMsg)
This API will initialize TX message object with default values.
uint32_t emulationEnable
Definition: mcan.h:809
uint32_t rxFIFO0Cnt
Definition: mcan.h:1009
uint32_t bit2
Definition: mcan.h:1193
uint32_t txBufMode
Definition: mcan.h:998
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.