AM261x MCU+ SDK  10.02.00
canfd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
90 #ifndef CANFD__H_
91 #define CANFD__H_
92 
93 #ifdef __cplusplus
94 extern "C" {
95 #endif
96 
97 #include <stdint.h>
98 #include <stddef.h>
99 #include <stdbool.h>
100 #include <drivers/mcan/v0/mcan.h>
101 #include <drivers/hw_include/cslr_soc.h>
102 #include <kernel/dpl/SemaphoreP.h>
103 #include <kernel/dpl/HwiP.h>
104 
106 typedef void *CANFD_Handle;
107 
109 extern uint32_t gCANFDConfigNum;
110 
117 #define MCAN_STATUS_SUCCESS ((int32_t)0)
118 
122 #define MCAN_STATUS_FAILURE ((int32_t)-1)
123 
144 #define CANFD_TRANSFER_MODE_BLOCKING (0U)
145 
149 #define CANFD_TRANSFER_MODE_CALLBACK (1U)
150 
160 #define CANFD_OPER_MODE_POLLED (0U)
161 #define CANFD_OPER_MODE_INTERRUPT (1U)
162 #define CANFD_OPER_MODE_DMA (2U)
163 
173 #define MCAN_MSG_RAM_STD_ELEM_SIZE (1U)
174 
176 #define MCAN_MSG_RAM_EXT_ELEM_SIZE (2U)
177 
179 #define MCAN_MSG_HEADER_SIZE (8U)
180 
182 #define MCAN_FRAME_TYPE_FD (1U)
183 
186 #define MCAN_MSG_RAM_TX_RX_ELEM_SIZE (18U)
187 
189 #define XTD_MSGID_MASK (0x1fffffffU)
190 #define STD_MSGID_MASK (0x7ffU)
191 #define STD_MSGID_SHIFT (18U)
192 
194 #define MCAN_MAX_PAYLOAD_BYTES (64U)
195 
197 #define MCAN_MAX_RX_BUFFERS (64U)
198 
200 #define MCAN_MAX_TX_BUFFERS (32U)
201 
203 #define CANFD_UTILS_ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))
204 
206 #define CANFD_UTILS_GETARRAYINDEX(member, array) (member - &array[0])
207 
209 #define CANFD_UTILS_ARRAYISMEMBER(member, array) \
210  (((((uint32)member - (uint32) & array[0]) % sizeof(array[0])) == 0) \
211  && (member >= &array[0]) \
212  && (CANFD_UTILS_GETARRAYINDEX(member, array) < CANFD_UTILS_ARRAYSIZE(array)))
213 
217 #define MCAN_INTR_MASK ((uint32_t)MCAN_INTR_SRC_RX_FIFO0_NEW_MSG | \
218  (uint32_t)MCAN_INTR_SRC_RX_FIFO0_MSG_LOST | \
219  (uint32_t)MCAN_INTR_SRC_RX_FIFO1_NEW_MSG | \
220  (uint32_t)MCAN_INTR_SRC_TRANS_COMPLETE | \
221  (uint32_t)MCAN_INTR_SRC_TRANS_CANCEL_FINISH | \
222  (uint32_t)MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG | \
223  (uint32_t)MCAN_INTR_SRC_PROTOCOL_ERR_ARB | \
224  (uint32_t)MCAN_INTR_SRC_PROTOCOL_ERR_DATA | \
225  (uint32_t)MCAN_INTR_SRC_RX_FIFO1_MSG_LOST | \
226  (uint32_t)MCAN_INTR_SRC_BUS_OFF_STATUS)
227 
229 #define CANFD_DMA_TX_COMPLETION_INTERMEDIATE (1U)
230 
231 #define CANFD_DMA_TX_COMPLETION_FINAL (2U)
232 
233 #define CANFD_DMA_RX_COMPLETION_INTERMEDIATE (1U)
234 
235 #define CANFD_DMA_RX_COMPLETION_FINAL (2U)
236 
238 #define CANFD_MAX_DLC_MAPPING (16U)
239 
251 #define CANFD_DRIVER_STATE_UNINIT (0U)
252 
253 #define CANFD_DRIVER_STATE_STARTED (1U)
254 
255 #define CANFD_DRIVER_STATE_STOPPED (2U)
256 
257 #define CCANFD_DRIVER_STATE_SLEEP (3U)
258 
266 typedef enum CANFD_MCANElemSize_t
267 {
270 
273 
276 
279 
282 
285 
288 
292 
300 typedef enum CANFD_MCANOperationMode_t
301 {
304 
308 
316 typedef enum CANFD_Direction_t
317 {
320 
324 
332 typedef enum CANFD_MCANXidType_t
333 {
336 
340 
347 typedef enum CANFD_MCANFrameType_t
348 {
351 
355 
362 typedef enum CANFD_MCANTimeOutSelect_t
363 {
366 
369 
372 
376 
385 typedef uint32_t CANFD_MCANECCErrType;
386 
387 #define CANFD_MCAN_ECC_ERR_TYPE_SEC (0U)
388 
389 #define CANFD_MCAN_ECC_ERR_TYPE_DED (1U)
390 
399 typedef enum CANFD_MCANLoopBackMode_t
400 {
403 
410 
418 typedef enum CANFD_MCANCommState_t
419 {
422 
425 
428 
432 
439 typedef enum CANFD_MCANErrCode_t
440 {
445 
450 
453 
456 
463 
474 
480 
487 
495 typedef enum CANFD_Reason_t
496 {
502 
507 
512 
517 
522 
527 
532 
537 
543 
553 typedef enum CANFD_Option_t
554 {
562 
570 
581 
589 
598 
610 
611 typedef void *CANFD_DmaHandle;
612 
613 typedef void *CANFD_DmaChConfig;
614 
621 typedef struct CANFD_MCANLoopbackCfgParams_t
622 {
628  uint32_t enable;
629 
633 
642 typedef struct CANFD_MCANBitTimingParams_t
643 {
645  uint32_t nomBrp;
646 
648  uint32_t nomPropSeg;
649 
651  uint32_t nomPseg1;
652 
654  uint32_t nomPseg2;
655 
657  uint32_t nomSjw;
658 
660  uint32_t dataBrp;
661 
663  uint32_t dataPropSeg;
664 
666  uint32_t dataPseg1;
667 
669  uint32_t dataPseg2;
670 
672  uint32_t dataSjw;
674 
681 typedef struct CANFD_MCANTdcConfig_t
682 {
686  uint32_t tdcf;
687 
691  uint32_t tdco;
693 
700 typedef struct CANFD_MCANGlobalFiltConfig_t
701 {
706  uint32_t rrfe;
707 
712  uint32_t rrfs;
713 
719  uint32_t anfe;
720 
726  uint32_t anfs;
728 
741 typedef struct CANFD_MCANMsgRAMCfgParams_t
742 {
748  uint32_t lss;
749 
755  uint32_t lse;
756 
762  uint32_t txBufNum;
763 
769  uint32_t txFIFOSize;
770 
775  uint32_t txBufMode;
776 
782  uint32_t txEventFIFOSize;
783 
790 
796  uint32_t rxFIFO0size;
797 
804 
809  uint32_t rxFIFO0OpMode;
810 
816  uint32_t rxFIFO1size;
817 
824 
829  uint32_t rxFIFO1OpMode;
831 
838 typedef struct CANFD_MCANECCConfigParams_t
839 {
844  uint32_t enable;
845 
850  uint32_t enableChk;
851 
856  uint32_t enableRdModWr;
858 
865 typedef struct CANFD_MCANErrCntStatus_t
866 {
868  uint32_t transErrLogCnt;
869 
871  uint32_t recErrCnt;
872 
877  uint32_t rpStatus;
878 
880  uint32_t canErrLogCnt;
882 
889 typedef struct CANFD_MCANProtocolStatus_t
890 {
894  uint32_t lastErrCode;
895 
899  uint32_t act;
900 
905  uint32_t errPassive;
906 
912  uint32_t warningStatus;
913 
918  uint32_t busOffStatus;
919 
923  uint32_t dlec;
924 
929  uint32_t resi;
930 
935  uint32_t rbrs;
936 
942  uint32_t rfdf;
943 
948  uint32_t pxe;
949 
951  uint32_t tdcv;
953 
960 typedef struct CANFD_MCANECCErrForceParams_t
961 {
965  uint32_t errType;
966 
968  uint32_t rowNum;
969 
973  uint32_t bit1;
974 
976  uint32_t bit2;
977 
981  uint32_t errOnce;
982 
984  uint32_t errForce;
986 
994 typedef struct CANFD_MCANECCErrStatus_t
995 {
1000  uint32_t secErr;
1001 
1006  uint32_t dedErr;
1007 
1011  uint32_t row;
1012 
1015  uint32_t bit1;
1016 
1020  uint32_t bit2;
1022 
1030 typedef union CANFD_ErrStatusResp_t
1031 {
1034 
1038 
1039 
1047 typedef struct CANFD_Attrs_s
1048 {
1049  /* Peripheral base address */
1050  uint32_t baseAddr;
1051 
1053  uint32_t intrNum0;
1054 
1056  uint32_t intrNum1;
1057 
1059  uint32_t operMode;
1060 
1062  uint8_t intrPriority;
1063 
1065  uint32_t OptionTLVtype;
1066 
1067  /* MCAN Loopback parameters. */
1069 
1070  /* parameters for bit timing calculation. */
1072 
1074  uint32_t txMemType;
1075 
1077  uint32_t rxMemType;
1078 
1085 } CANFD_Attrs;
1086 
1097 typedef struct CANFD_OptionTLV_t
1098 {
1103 
1107  int32_t length;
1108 
1112  void* value;
1114 
1122 typedef void (*CANFD_TransferCallbackFxn) (void *args, CANFD_Reason reason);
1123 
1132 typedef void (*CANFD_ErrorCallbackFxn) (void *args, CANFD_Reason reason,
1133  CANFD_ErrStatusResp* errStatusResp);
1134 
1135 
1144 typedef struct CANFD_OpenParams_t
1145 {
1148  uint32_t transferMode;
1149 
1152 
1155 
1160  uint32_t fdMode;
1161 
1167  uint32_t brsEnable;
1168 
1173  uint32_t txpEnable;
1174 
1180  uint32_t efbi;
1181 
1186  uint32_t pxhddisable;
1187 
1193  uint32_t darEnable;
1194 
1199  uint32_t wkupReqEnable;
1200 
1205  uint32_t autoWkupEnable;
1206 
1212 
1217  uint32_t emulationFAck;
1218 
1223  uint32_t clkStopFAck;
1224 
1228  uint32_t wdcPreload;
1229 
1234  uint32_t tdcEnable;
1235 
1240 
1245  uint32_t monEnable;
1246 
1252  uint32_t asmEnable;
1253 
1257  uint32_t tsPrescalar;
1258 
1265  uint32_t tsSelect;
1266 
1271 
1277  uint32_t timeoutPreload;
1278 
1284 
1289 
1294 
1299 
1303 
1308 
1320 typedef struct CANFD_Object_t
1321 {
1326 
1330  uint32_t regBaseAddress;
1331 
1335  uint32_t state;
1336 
1341 
1345  uint8_t mcanDataSize[CANFD_MAX_DLC_MAPPING];
1346 
1350  struct CANFD_MessageObject_t* msgObjectHandle[MCAN_MAX_MSG_OBJECTS];
1351 
1355  struct CANFD_MessageObject_t* txMapping[MCAN_MAX_TX_MSG_OBJECTS];
1356 
1360  struct CANFD_MessageObject_t* rxMapping[MCAN_MAX_RX_MSG_OBJECTS];
1361 
1366 
1370  uint32_t interrupts;
1371 
1375  uint32_t eccInterrupts;
1376 
1381 
1386 
1391 
1395  uint8_t txStatus[MCAN_MAX_TX_MSG_OBJECTS];
1396 
1400  uint32_t useFifoNum;
1401 
1406 
1411 
1416 
1420  void* args;
1421 
1425 
1429 
1433 
1437 
1439  void *hwiHandle;
1440 
1443 
1446 
1447  /* Revision ID and Core Release Info */
1449 
1450 }CANFD_Object;
1451 
1464 typedef struct CANFD_Config_s
1465 {
1470 } CANFD_Config;
1471 
1479 typedef struct CANFD_DmaMsgConfig_s
1480 {
1488  uint32_t numMsgs;
1492  const void *data;
1496  uint32_t currentMsgNum;
1498 
1511 typedef struct CANFD_DmaRxBuf_s
1512 {
1513  /* Header word 1 in Rx buffer in message ram */
1514  uint32_t header1;
1515  /* Header word 2 in Rx buffer in message ram */
1516  uint32_t header2;
1517  /* Data Bytes Rx buffer in message ram */
1518  uint8_t data[MCAN_MAX_RX_BUFFERS];
1520 
1531 typedef struct CANFD_MessageObject_t
1532 {
1537  uint32_t startMsgId;
1538 
1543  uint32_t endMsgId;
1544 
1549 
1554 
1559 
1563  uint32_t messageObjNum;
1564 
1569  uint32_t dataLength;
1570 
1574  uint32_t txElement;
1575 
1579  uint32_t rxElement;
1580 
1586 
1592 
1596  uint32_t rxFifoNum;
1597 
1601  uint32_t interruptsRxed;
1602 
1607 
1611  uint32_t dmaEventNo;
1616 
1620  void *args;
1621 
1629 
1637 
1644 typedef struct CANFD_MCANMsgObjectStats_t
1645 {
1648 
1650  uint32_t direction;
1651 
1657 
1663 
1665  uint32_t interruptsRxed;
1666 
1670 
1678 typedef struct CANFD_DmaConfig_s
1679 {
1681  /* Arguments specific to a DMA driver. This will be typecasted to the
1682  * specific DMA driver args structwhen used by the appropriate callback.
1683  * This struct will be defined in the specific DMA driver header file.
1684  * Allocation of this struct will be done statically using Sysconfig
1685  * code generation in the example code
1686  */
1687 } CANFD_DmaConfig;
1688 
1689 
1693 void CANFD_init(void);
1694 
1698 void CANFD_deinit(void);
1699 
1712 CANFD_Handle CANFD_open(uint32_t index, CANFD_OpenParams *openPrms);
1713 
1723 
1736 int32_t CANFD_configBitTime(CANFD_Handle handle, const CANFD_MCANBitTimingParams* bitTimeParams);
1737 
1757  CANFD_MessageObject* ptrCanMsgObj);
1758 
1776  CANFD_MessageObject* ptrCanMsgObj);
1777 
1789 
1808 int32_t CANFD_write(CANFD_MsgObjHandle handle, uint32_t id,
1809  CANFD_MCANFrameType frameType, uint32_t numMsgs,
1810  const uint8_t* data);
1811 
1823 
1847 int32_t CANFD_writeDma(CANFD_MsgObjHandle handle, uint32_t id,
1848  CANFD_MCANFrameType frameType,
1849  uint32_t numMsgs, const void* data);
1850 
1865 
1866 uint32_t CANFD_getFilterEventConfig(uint32_t eventNum);
1867 
1884 int32_t CANFD_read(CANFD_MsgObjHandle rxMsgHandle, uint32_t numMsgs, uint8_t* data);
1885 
1903 int32_t CANFD_readDmaConfig(CANFD_MsgObjHandle handle, const void* data, uint32_t numMsgs);
1904 
1916 int32_t CANFD_getOptions(CANFD_Handle handle, const CANFD_OptionTLV* ptrOptInfo);
1917 
1928 int32_t CANFD_setOptions(CANFD_Handle handle, const CANFD_OptionTLV* ptrOptInfo);
1929 
1933 void CANFD_int0Isr (void *args);
1934 
1938 void CANFD_int1Isr (void *args);
1939 
1953 
1969  CANFD_ErrStatusResp* errStatusResp);
1970 
1982 int32_t CANFD_dmaOpen(CANFD_Handle canfdHandle, CANFD_DmaChConfig dmaChCfg);
1983 
1991 int32_t CANFD_dmaClose(CANFD_Handle canfdHandle);
1992 
2002 int32_t CANFD_createDmaTxMsgObject(const CANFD_Object *ptrCanFdObj,
2003  CANFD_MessageObject* ptrCanMsgObj);
2004 
2014 int32_t CANFD_deleteDmaTxMsgObject(const CANFD_Object *ptrCanFdObj,
2015  const CANFD_MessageObject* ptrCanMsgObj);
2016 
2028 int32_t CANFD_configureDmaTx(const CANFD_Object *ptrCanFdObj,
2029  CANFD_MessageObject* ptrCanMsgObj, uint32_t dataLengthPerMsg,
2030  uint32_t numMsgs, const void* data);
2031 
2040 int32_t CANFD_cancelDmaTx(const CANFD_Object *ptrCanFdObj,
2041  const CANFD_MessageObject* ptrCanMsgObj);
2042 
2057  const void *data, uint32_t completionType);
2058 
2068 int32_t CANFD_createDmaRxMsgObject(const CANFD_Object *ptrCanFdObj,
2069  CANFD_MessageObject* ptrCanMsgObj);
2070 
2080 int32_t CANFD_deleteDmaRxMsgObject(const CANFD_Object *ptrCanFdObj,
2081  const CANFD_MessageObject* ptrCanMsgObj);
2082 
2093 int32_t CANFD_configureDmaRx(const CANFD_Object *ptrCanFdObj,
2094  CANFD_MessageObject* ptrCanMsgObj,
2095  uint32_t dataLengthPerMsg, uint32_t numMsgs,
2096  const void* data);
2097 
2111 void CANFD_dmaRxCompletionCallback(CANFD_MessageObject* ptrCanMsgObj, const void *data,
2112  uint32_t completionType);
2113 
2114 
2121 int32_t CANFD_isDataSizeValid(uint32_t dataSize);
2122 
2123 /* ========================================================================== */
2124 /* Advance Functions */
2125 /* ========================================================================== */
2126 
2134 int32_t CANFD_getEndianVal(CANFD_Handle canfdHandle);
2135 
2143 
2153 void CANFD_addClockStopRequest(CANFD_Handle canfdHandle, uint32_t enable);
2154 
2164 uint32_t CANFD_clockStopReq(CANFD_Handle canfdHandle);
2165 
2175 uint32_t CANFD_getClkStopAck(CANFD_Handle canfdHandle);
2176 
2185 uint32_t CANFD_getRxPinState(CANFD_Handle canfdHandle);
2186 
2198 void CANFD_setTxPinState(CANFD_Handle canfdHandle, uint32_t state);
2199 
2210 uint32_t CANFD_getTxPinState(CANFD_Handle canfdHandle);
2211 
2217 void CANFD_getBitTime(CANFD_Handle canfdHandle);
2218 
2226 uint32_t CANFD_getTSCounterVal(CANFD_Handle canfdHandle);
2227 
2235 
2238 #ifdef __cplusplus
2239 }
2240 #endif
2241 
2242 #endif /* #ifndef CANFD__H_ */
2243 
CANFD_ErrStatusResp::eccErrStatus
CANFD_MCANECCErrStatus eccErrStatus
Definition: canfd.h:1033
CANFD_dmaClose
int32_t CANFD_dmaClose(CANFD_Handle canfdHandle)
API to close an CANFD DMA channel.
CANFD_MCANTdcConfig::tdco
uint32_t tdco
Definition: canfd.h:691
CANFD_Object::handle
CANFD_Handle handle
Instance handle to which this object belongs.
Definition: canfd.h:1325
CANFD_MCANECCErrForceParams::errType
uint32_t errType
Definition: canfd.h:965
CANFD_MCANMsgRAMCfgParams::txBufMode
uint32_t txBufMode
Definition: canfd.h:775
CANFD_MCANMsgRAMCfgParams::txEventFIFOWaterMark
uint32_t txEventFIFOWaterMark
Definition: canfd.h:789
CANFD_MCANElemSize_64BYTES
@ CANFD_MCANElemSize_64BYTES
Definition: canfd.h:290
CANFD_MCANProtocolStatus::warningStatus
uint32_t warningStatus
Definition: canfd.h:912
CANFD_MCANTimeOutSelect_RX_FIFO0
@ CANFD_MCANTimeOutSelect_RX_FIFO0
Definition: canfd.h:371
CANFD_configureDmaTx
int32_t CANFD_configureDmaTx(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject *ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void *data)
API to enable dma event transfer for the Tx. Called from the API CANFD_writeDma.
CANFD_Attrs::rxMemType
uint32_t rxMemType
Definition: canfd.h:1077
CANFD_MCANProtocolStatus::tdcv
uint32_t tdcv
Definition: canfd.h:951
CANFD_MCANGlobalFiltConfig::rrfe
uint32_t rrfe
Definition: canfd.h:706
CANFD_MCANCommState_TRANSMITTER
@ CANFD_MCANCommState_TRANSMITTER
Definition: canfd.h:430
CANFD_MCANProtocolStatus::rbrs
uint32_t rbrs
Definition: canfd.h:935
args
void * args
Definition: hsmclient_msg.h:4
CANFD_getClkStopAck
uint32_t CANFD_getClkStopAck(CANFD_Handle canfdHandle)
This API will return clock stop acknowledgement for MCAN module.
CANFD_OptionTLV
Definition: canfd.h:1098
CANFD_MCANProtocolStatus::busOffStatus
uint32_t busOffStatus
Definition: canfd.h:918
CANFD_Config::object
CANFD_Object * object
Definition: canfd.h:1468
CANFD_deinit
void CANFD_deinit(void)
This function de-initializes each driver instance object and delete a driver lock.
CANFD_Object::hwiObj0
HwiP_Object hwiObj0
Definition: canfd.h:1442
CANFD_MCANBitTimingParams::dataPseg2
uint32_t dataPseg2
Definition: canfd.h:669
CANFD_setTxPinState
void CANFD_setTxPinState(CANFD_Handle canfdHandle, uint32_t state)
This API will set Tx pin state of MCAN module.
CANFD_writeCancel
int32_t CANFD_writeCancel(CANFD_MsgObjHandle handle)
Function used by the application to cancel a pending data transmit.
CANFD_MCANBitTimingParams::dataSjw
uint32_t dataSjw
Definition: canfd.h:672
CANFD_Object::args
void * args
Pointer to be used by application to store miscellaneous data.
Definition: canfd.h:1420
CANFD_MCANErrCode_STUFF_ERROR
@ CANFD_MCANErrCode_STUFF_ERROR
Definition: canfd.h:449
CANFD_dmaOpen
int32_t CANFD_dmaOpen(CANFD_Handle canfdHandle, CANFD_DmaChConfig dmaChCfg)
API to open an CANFD DMA channel.
CANFD_MCANProtocolStatus::errPassive
uint32_t errPassive
Definition: canfd.h:905
CANFD_OpenParams::timeoutPreload
uint32_t timeoutPreload
Definition: canfd.h:1277
CANFD_OpenParams
Definition: canfd.h:1145
CANFD_MCANErrCode
CANFD_MCANErrCode
Definition: canfd.h:440
CANFD_MCANElemSize
CANFD_MCANElemSize
Definition: canfd.h:267
CANFD_errStatusCallBack
void CANFD_errStatusCallBack(CANFD_Handle handle, CANFD_Reason reason, CANFD_ErrStatusResp *errStatusResp)
Application specified callback function which is invoked by the CANFD driver on error or status chang...
CANFD_getEndianVal
int32_t CANFD_getEndianVal(CANFD_Handle canfdHandle)
This function return endianness value of MCAN module.
CANFD_MCANErrCntStatus
Definition: canfd.h:866
CANFD_DmaMsgConfig::currentMsgNum
uint32_t currentMsgNum
Used by driver to store current message count out of the numMsgs already processed.
Definition: canfd.h:1496
CANFD_MCANProtocolStatus::act
uint32_t act
Definition: canfd.h:899
CANFD_MCANErrCntStatus::transErrLogCnt
uint32_t transErrLogCnt
Definition: canfd.h:868
MCAN_RxBufElement
Structure for MCAN Rx Buffer element.
Definition: mcan.h:1491
CANFD_Option_MCAN_MSG_OBJECT_STATS
@ CANFD_Option_MCAN_MSG_OBJECT_STATS
Definition: canfd.h:580
CANFD_configBitTime
int32_t CANFD_configBitTime(CANFD_Handle handle, const CANFD_MCANBitTimingParams *bitTimeParams)
Function configures the bit time parameters for the CANFD module.
CANFD_MCANMsgObjectStats::endMsgIdentifier
uint32_t endMsgIdentifier
Definition: canfd.h:1662
CANFD_MCANLoopbackCfgParams
Definition: canfd.h:622
CANFD_OpenParams::asmEnable
uint32_t asmEnable
Definition: canfd.h:1252
CANFD_deleteDmaRxMsgObject
int32_t CANFD_deleteDmaRxMsgObject(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject *ptrCanMsgObj)
API to delete dma configuration for the Rx message object. Called from the CANFD_deleteMsgObject.
CANFD_MCANElemSize_32BYTES
@ CANFD_MCANElemSize_32BYTES
Definition: canfd.h:284
CANFD_Option_MCAN_LOOPBACK
@ CANFD_Option_MCAN_LOOPBACK
Definition: canfd.h:597
CANFD_MCANBitTimingParams::nomSjw
uint32_t nomSjw
Definition: canfd.h:657
CANFD_Object::interrupts
uint32_t interrupts
Number of interrupts received for message Tx or Rx.
Definition: canfd.h:1370
CANFD_Reason_BUSOFF
@ CANFD_Reason_BUSOFF
Bus Off condition detected.
Definition: canfd.h:521
CANFD_MCANProtocolStatus::dlec
uint32_t dlec
Definition: canfd.h:923
CANFD_OpenParams::darEnable
uint32_t darEnable
Definition: canfd.h:1193
CANFD_MCANTimeOutSelect_TX_EVENT_FIFO
@ CANFD_MCANTimeOutSelect_TX_EVENT_FIFO
Definition: canfd.h:368
CANFD_Reason_PROTOCOL_ERR_DATA_PHASE
@ CANFD_Reason_PROTOCOL_ERR_DATA_PHASE
Protocol error in data phase detected.
Definition: canfd.h:526
gCANFDConfigNum
uint32_t gCANFDConfigNum
Externally defined driver configuration array size.
CANFD_OpenParams::brsEnable
uint32_t brsEnable
Definition: canfd.h:1167
CANFD_MCANECCConfigParams::enableChk
uint32_t enableChk
Definition: canfd.h:850
CANFD_MCANBitTimingParams
Definition: canfd.h:643
CANFD_MessageObject::dmaEventNo
uint32_t dmaEventNo
Dma Event number allocated for this message object.
Definition: canfd.h:1611
CANFD_Option_MCAN_POWER_DOWN
@ CANFD_Option_MCAN_POWER_DOWN
Definition: canfd.h:608
CANFD_DmaConfig
Definition: canfd.h:1679
CANFD_MCANTimeOutSelect_RX_FIFO1
@ CANFD_MCANTimeOutSelect_RX_FIFO1
Definition: canfd.h:374
CANFD_OpenParams::timeoutCntEnable
uint32_t timeoutCntEnable
Definition: canfd.h:1283
CANFD_DmaMsgConfig::data
const void * data
pointer to the data buffer. This should a 2d array of uint8[numMsgs][dataLengthPerMsg]
Definition: canfd.h:1492
CANFD_Object::protoArbErrInterrupts
uint32_t protoArbErrInterrupts
Number of Protocol error in arbitration phase interrupts received.
Definition: canfd.h:1390
CANFD_MCANCommState
CANFD_MCANCommState
Definition: canfd.h:419
CANFD_MCANLoopBackMode
CANFD_MCANLoopBackMode
Definition: canfd.h:400
CANFD_OpenParams::tsPrescalar
uint32_t tsPrescalar
Definition: canfd.h:1257
CANFD_Object::canfdDmaHandle
CANFD_DmaHandle canfdDmaHandle
Dma driver handle.
Definition: canfd.h:1410
CANFD_MCANECCErrForceParams
Definition: canfd.h:961
CANFD_OpenParams::transferCallbackFxn
CANFD_TransferCallbackFxn transferCallbackFxn
Definition: canfd.h:1151
CANFD_MCANFrameType
CANFD_MCANFrameType
Definition: canfd.h:348
CANFD_Object::protoDataErrInterrupts
uint32_t protoDataErrInterrupts
Number of Protocol error in data phase interrupts received.
Definition: canfd.h:1385
CANFD_OpenParams::emulationEnable
uint32_t emulationEnable
Definition: canfd.h:1211
CANFD_MessageObject::msgIdType
CANFD_MCANXidType msgIdType
Message object type.
Definition: canfd.h:1558
CANFD_Reason_ECC_ERROR
@ CANFD_Reason_ECC_ERROR
Data has been succesfully transmitted.
Definition: canfd.h:516
CANFD_Object::readTransferSem
void * readTransferSem
Definition: canfd.h:1424
CANFD_MCANGlobalFiltConfig::rrfs
uint32_t rrfs
Definition: canfd.h:712
CANFD_transferCallBack
void CANFD_transferCallBack(void *args, CANFD_Reason reason)
Application specified callback function which is invoked by the CANFD driver once transmit is complet...
CANFD_Object::canfdDmaChCfg
CANFD_DmaChConfig canfdDmaChCfg
Pointer to Dma channel configuration.
Definition: canfd.h:1415
MCAN_MAX_MSG_OBJECTS
#define MCAN_MAX_MSG_OBJECTS
Maximum number of message objects that can be supported by CANFD.
Definition: mcan.h:393
CANFD_MCANBitTimingParams::nomPseg2
uint32_t nomPseg2
Definition: canfd.h:654
CANFD_MCANMsgObjectStats
Definition: canfd.h:1645
CANFD_DmaChConfig
void * CANFD_DmaChConfig
Definition: canfd.h:613
CANFD_Object::busOffInterrupts
uint32_t busOffInterrupts
Number of Bus-Off interrupts received.
Definition: canfd.h:1380
CANFD_Object::writeTransferSem
void * writeTransferSem
Definition: canfd.h:1432
CANFD_MCANFrameType_CLASSIC
@ CANFD_MCANFrameType_CLASSIC
Definition: canfd.h:350
CANFD_MCANMsgObjectStats::handle
CANFD_MsgObjHandle handle
Definition: canfd.h:1647
CANFD_MCANCommState_SYNCHRONIZING
@ CANFD_MCANCommState_SYNCHRONIZING
Definition: canfd.h:421
CANFD_Reason_SRC_RX_FIFO1_MSG_LOST
@ CANFD_Reason_SRC_RX_FIFO1_MSG_LOST
Rx FIFO 1 Message Lost.
Definition: canfd.h:541
CANFD_ErrStatusResp
Definition: canfd.h:1031
MCAN_MAX_RX_MSG_OBJECTS
#define MCAN_MAX_RX_MSG_OBJECTS
Maximum number of Rx message objects that can be supported by CANFD.
Definition: mcan.h:388
CANFD_cancelDmaTx
int32_t CANFD_cancelDmaTx(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject *ptrCanMsgObj)
API to disbale dma event transfer for the Tx to cancel the transfer.
CANFD_MessageObject::dataLength
uint32_t dataLength
Data Length used by application for transmission and reception. Valid values: 1 to 64 bytes.
Definition: canfd.h:1569
SemaphoreP.h
CANFD_dmaTxCompletionCallback
void CANFD_dmaTxCompletionCallback(CANFD_MessageObject *ptrCanMsgObj, const void *data, uint32_t completionType)
Callback function for the Tx completion. This is called for each message in the array of msgs provide...
CANFD_read
int32_t CANFD_read(CANFD_MsgObjHandle rxMsgHandle, uint32_t numMsgs, uint8_t *data)
Function is used by the application to get the CAN message from message RAM using a receive message o...
CANFD_MessageObject::endMsgId
uint32_t endMsgId
Ending range of the Message Id to which the configuration belongs For Tx and single Message Id object...
Definition: canfd.h:1543
CANFD_TransferCallbackFxn
void(* CANFD_TransferCallbackFxn)(void *args, CANFD_Reason reason)
The definition of a callback function used by the CANFD driver when used in CANFD_TRANSFER_MODE_CALLB...
Definition: canfd.h:1122
CANFD_MCANECCErrForceParams::bit1
uint32_t bit1
Definition: canfd.h:973
CANFD_MCANErrCode_NO_CHANGE
@ CANFD_MCANErrCode_NO_CHANGE
Definition: canfd.h:485
CANFD_MCANProtocolStatus::resi
uint32_t resi
Definition: canfd.h:929
CANFD_Config
Definition: canfd.h:1465
CANFD_createDmaRxMsgObject
int32_t CANFD_createDmaRxMsgObject(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject *ptrCanMsgObj)
API to configure dma for the Rx message object. Called from the CANFD_createMsgObject.
CANFD_OpenParams::dataInterruptEnable
uint32_t dataInterruptEnable
Definition: canfd.h:1306
CANFD_MCANElemSize_16BYTES
@ CANFD_MCANElemSize_16BYTES
Definition: canfd.h:275
CANFD_Option_MCAN_MODE
@ CANFD_Option_MCAN_MODE
Definition: canfd.h:588
CANFD_DmaHandle
void * CANFD_DmaHandle
Definition: canfd.h:611
CANFD_MsgObjHandle
CANFD_MessageObject * CANFD_MsgObjHandle
Definition: canfd.h:1636
CANFD_Object::hwiHandle
void * hwiHandle
Definition: canfd.h:1439
CANFD_MCANErrCntStatus::canErrLogCnt
uint32_t canErrLogCnt
Definition: canfd.h:880
CANFD_Object::revId
MCAN_RevisionId revId
Definition: canfd.h:1448
CANFD_resetTSCounter
void CANFD_resetTSCounter(CANFD_Handle canfdHandle)
This API will reset timestamp counter value.
CANFD_ErrStatusResp::protocolStatus
CANFD_MCANProtocolStatus protocolStatus
Definition: canfd.h:1036
CANFD_MCANErrCode_BIT1_ERROR
@ CANFD_MCANErrCode_BIT1_ERROR
Definition: canfd.h:462
CANFD_MCANXidType_29_BIT
@ CANFD_MCANXidType_29_BIT
Definition: canfd.h:338
CANFD_Attrs::operMode
uint32_t operMode
Definition: canfd.h:1059
CANFD_MessageObject::dmaMsgConfig
CANFD_DmaMsgConfig dmaMsgConfig
Dma message configuration.
Definition: canfd.h:1615
CANFD_Direction_TX
@ CANFD_Direction_TX
Definition: canfd.h:322
CANFD_Reason_RX
@ CANFD_Reason_RX
Data has been received and the application is required to read and process the data.
Definition: canfd.h:501
CANFD_OptionTLV::value
void * value
Option Value.
Definition: canfd.h:1112
CANFD_MCANECCConfigParams::enable
uint32_t enable
Definition: canfd.h:844
CANFD_dmaRxCompletionCallback
void CANFD_dmaRxCompletionCallback(CANFD_MessageObject *ptrCanMsgObj, const void *data, uint32_t completionType)
Callback function for the Rx completion. This is called for each message in the array of msgs provide...
CANFD_MessageObject::startMsgId
uint32_t startMsgId
Starting range of the Message Id to which the configuration belongs. For Tx and single Message Id obj...
Definition: canfd.h:1537
CANFD_init
void CANFD_init(void)
This function initializes each driver instance object and create a driver lock.
CANFD_MessageObject::txElement
uint32_t txElement
Tx buffer number used to send data.
Definition: canfd.h:1574
CANFD_MCANECCConfigParams::enableRdModWr
uint32_t enableRdModWr
Definition: canfd.h:856
CANFD_close
void CANFD_close(CANFD_Handle handle)
Function to close a CANFD peripheral specified by the CANFD handle.
CANFD_MCANMsgRAMCfgParams::rxFIFO1size
uint32_t rxFIFO1size
Definition: canfd.h:816
CANFD_MessageObject::messageObjNum
uint32_t messageObjNum
Allocated message object number.
Definition: canfd.h:1563
CANFD_isDataSizeValid
int32_t CANFD_isDataSizeValid(uint32_t dataSize)
Function to validate the data Size.
CANFD_Object::openParams
CANFD_OpenParams * openParams
CANFD driver init parameters.
Definition: canfd.h:1340
CANFD_getRxPinState
uint32_t CANFD_getRxPinState(CANFD_Handle canfdHandle)
This API will return Rx pin state of MCAN module.
CANFD_Attrs::CANFDMcanloopbackParams
CANFD_MCANLoopbackCfgParams CANFDMcanloopbackParams
Definition: canfd.h:1068
CANFD_MessageObject
Definition: canfd.h:1532
CANFD_OpenParams::txpEnable
uint32_t txpEnable
Definition: canfd.h:1173
CANFD_Attrs::intrPriority
uint8_t intrPriority
Definition: canfd.h:1062
CANFD_Reason_TX_COMPLETION
@ CANFD_Reason_TX_COMPLETION
Data has been succesfully transmitted.
Definition: canfd.h:506
CANFD_ErrorCallbackFxn
void(* CANFD_ErrorCallbackFxn)(void *args, CANFD_Reason reason, CANFD_ErrStatusResp *errStatusResp)
The definition of a callback function used by the CANFD driver when used in CANFD_TRANSFER_MODE_CALLB...
Definition: canfd.h:1132
CANFD_MCANECCErrType
uint32_t CANFD_MCANECCErrType
This enumeration defines the MCAN ECC Error Types.
Definition: canfd.h:385
CANFD_Attrs::OptionTLVtype
uint32_t OptionTLVtype
Definition: canfd.h:1065
CANFD_MCANECCErrStatus::row
uint32_t row
Definition: canfd.h:1011
CANFD_DmaRxBuf
Definition: canfd.h:1512
CANFD_MCANElemSize_20BYTES
@ CANFD_MCANElemSize_20BYTES
Definition: canfd.h:278
CANFD_MCANErrCode_BIT0_ERROR
@ CANFD_MCANErrCode_BIT0_ERROR
Definition: canfd.h:473
CANFD_MCANTimeOutSelect_CONT
@ CANFD_MCANTimeOutSelect_CONT
Definition: canfd.h:365
CANFD_MCANElemSize_8BYTES
@ CANFD_MCANElemSize_8BYTES
Definition: canfd.h:269
CANFD_MCANElemSize_24BYTES
@ CANFD_MCANElemSize_24BYTES
Definition: canfd.h:281
CANFD_MCANBitTimingParams::dataPseg1
uint32_t dataPseg1
Definition: canfd.h:666
CANFD_Attrs::intrNum0
uint32_t intrNum0
Definition: canfd.h:1053
CANFD_MCANGlobalFiltConfig::anfs
uint32_t anfs
Definition: canfd.h:726
CANFD_MCANProtocolStatus
Definition: canfd.h:890
CANFD_Attrs::CANFDMcanBitTimingParams
CANFD_MCANBitTimingParams CANFDMcanBitTimingParams
Definition: canfd.h:1071
CANFD_MCANLoopbackCfgParams::mode
CANFD_MCANLoopBackMode mode
Definition: canfd.h:631
CANFD_MCANErrCntStatus::rpStatus
uint32_t rpStatus
Definition: canfd.h:877
CANFD_MCANMsgRAMCfgParams::txBufNum
uint32_t txBufNum
Definition: canfd.h:762
CANFD_DmaConfig::canfdDmaArgs
void * canfdDmaArgs
Definition: canfd.h:1680
CANFD_MCANOperationMode_SW_INIT
@ CANFD_MCANOperationMode_SW_INIT
Definition: canfd.h:306
HwiP.h
CANFD_MCANFrameType_FD
@ CANFD_MCANFrameType_FD
Definition: canfd.h:353
CANFD_OptionTLV::type
CANFD_Option type
Option Name.
Definition: canfd.h:1102
CANFD_createMsgObject
int32_t CANFD_createMsgObject(CANFD_Handle handle, CANFD_MessageObject *ptrCanMsgObj)
Function configures the receive or transmit message object. It also enables Tx completion and Tx canc...
CANFD_createDmaTxMsgObject
int32_t CANFD_createDmaTxMsgObject(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject *ptrCanMsgObj)
API to configure dma for the Tx message object. Called from the API CANFD_createMsgObject.
MCAN_MAX_TX_MSG_OBJECTS
#define MCAN_MAX_TX_MSG_OBJECTS
Maximum number of Tx message objects that can be supported by CANFD.
Definition: mcan.h:383
CANFD_MessageObject::interruptsRxed
uint32_t interruptsRxed
Number of interrupts received.
Definition: canfd.h:1601
CANFD_Object::readTransferSemObj
SemaphoreP_Object readTransferSemObj
Definition: canfd.h:1428
CANFD_open
CANFD_Handle CANFD_open(uint32_t index, CANFD_OpenParams *openPrms)
This function opens a given CANFD peripheral.
CANFD_Option_MCAN_ERROR_COUNTER
@ CANFD_Option_MCAN_ERROR_COUNTER
Definition: canfd.h:561
CANFD_OpenParams::tdcEnable
uint32_t tdcEnable
Definition: canfd.h:1234
CANFD_MCANLoopBackMode_INTERNAL
@ CANFD_MCANLoopBackMode_INTERNAL
Definition: canfd.h:402
CANFD_MCANECCErrForceParams::errOnce
uint32_t errOnce
Definition: canfd.h:981
CANFD_MCANProtocolStatus::rfdf
uint32_t rfdf
Definition: canfd.h:942
CANFD_OpenParams::efbi
uint32_t efbi
Definition: canfd.h:1180
CANFD_OpenParams::clkStopFAck
uint32_t clkStopFAck
Definition: canfd.h:1223
MCAN_MAX_RX_BUFFERS
#define MCAN_MAX_RX_BUFFERS
Maximum number of Rx buffers.
Definition: canfd.h:197
CANFD_getBitTime
void CANFD_getBitTime(CANFD_Handle canfdHandle)
This API will get the configured bit timings for MCAN module.
CANFD_OpenParams::errorCallbackFxn
CANFD_ErrorCallbackFxn errorCallbackFxn
Definition: canfd.h:1154
CANFD_MCANLoopBackMode_EXTERNAL
@ CANFD_MCANLoopBackMode_EXTERNAL
Definition: canfd.h:408
CANFD_getFilterEventConfig
uint32_t CANFD_getFilterEventConfig(uint32_t eventNum)
CANFD_MCANErrCode_FORM_ERROR
@ CANFD_MCANErrCode_FORM_ERROR
Definition: canfd.h:452
CANFD_OpenParams::pxhddisable
uint32_t pxhddisable
Definition: canfd.h:1186
CANFD_addClockStopRequest
void CANFD_addClockStopRequest(CANFD_Handle canfdHandle, uint32_t enable)
This API add clock stop request for MCAN module to put it in power down mode.
CANFD_MCANXidType
CANFD_MCANXidType
Definition: canfd.h:333
CANFD_MCANErrCode_CRC_ERROR
@ CANFD_MCANErrCode_CRC_ERROR
Definition: canfd.h:479
CANFD_MCANElemSize_12BYTES
@ CANFD_MCANElemSize_12BYTES
Definition: canfd.h:272
CANFD_MCANECCErrStatus::dedErr
uint32_t dedErr
Definition: canfd.h:1006
CANFD_MCANMsgRAMCfgParams::rxFIFO1OpMode
uint32_t rxFIFO1OpMode
Definition: canfd.h:829
CANFD_MCANTdcConfig::tdcf
uint32_t tdcf
Definition: canfd.h:686
CANFD_MCANXidType_11_BIT
@ CANFD_MCANXidType_11_BIT
Definition: canfd.h:335
CANFD_deleteDmaTxMsgObject
int32_t CANFD_deleteDmaTxMsgObject(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject *ptrCanMsgObj)
API to delete dma configuration for the Tx message object. Called from the API CANFD_deleteMsgObject.
CANFD_MessageObject::rxMemType
MCAN_MemType rxMemType
Part of message ram to accessed by this message object. Refer enum MCAN_MemType.
Definition: canfd.h:1591
MCAN_MemType
uint32_t MCAN_MemType
Enum to represent the MCAN Message RAM type.
Definition: mcan.h:451
CANFD_MCANMsgRAMCfgParams::lss
uint32_t lss
Definition: canfd.h:748
CANFD_configureDmaRx
int32_t CANFD_configureDmaRx(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject *ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void *data)
API to enable dma event transfer for the Rx. Called from the API CANFD_readDma.
CANFD_MCANErrCode_ACK_ERROR
@ CANFD_MCANErrCode_ACK_ERROR
Definition: canfd.h:455
CANFD_MCANMsgObjectStats::startMsgIdentifier
uint32_t startMsgIdentifier
Definition: canfd.h:1656
MCAN_RevisionId
Structure for accessing Revision ID and Core Release Info. of MCAN module.
Definition: mcan.h:1288
CANFD_int1Isr
void CANFD_int1Isr(void *args)
The function is the registered interrupt 1 ISR for the CANFD Driver.
CANFD_MCANCommState_IDLE
@ CANFD_MCANCommState_IDLE
Definition: canfd.h:424
CANFD_OpenParams::fdMode
uint32_t fdMode
Definition: canfd.h:1160
CANFD_OpenParams::transferMode
uint32_t transferMode
Definition: canfd.h:1148
CANFD_MCANMsgRAMCfgParams::lse
uint32_t lse
Definition: canfd.h:755
CANFD_MCANECCErrStatus
Definition: canfd.h:995
CANFD_writeDmaTriggerNext
int32_t CANFD_writeDmaTriggerNext(CANFD_MsgObjHandle handle)
Function used by the application to start transmission of next msg in dma mode. Transfer should be in...
CANFD_Object::hwiObj1
HwiP_Object hwiObj1
Definition: canfd.h:1445
CANFD_OpenParams::tdcConfig
CANFD_MCANTdcConfig tdcConfig
Definition: canfd.h:1239
CANFD_deleteMsgObject
int32_t CANFD_deleteMsgObject(CANFD_MsgObjHandle handle)
Function deletes a message object.
CANFD_MCANBitTimingParams::dataPropSeg
uint32_t dataPropSeg
Definition: canfd.h:663
CANFD_DmaMsgConfig::numMsgs
uint32_t numMsgs
Number of messages.
Definition: canfd.h:1488
CANFD_OpenParams::filterConfig
CANFD_MCANGlobalFiltConfig filterConfig
Definition: canfd.h:1288
CANFD_Object::useFifoNum
uint32_t useFifoNum
Flag to toggle the usage of FIFO 0 and FIFO 1. Valid values are 0 and 1.
Definition: canfd.h:1400
CANFD_Attrs::filterConfig
void * filterConfig
void pointer to MCAN_ExtMsgIDFilterElement or MCAN_StdMsgIDFilterElement structure....
Definition: canfd.h:1084
CANFD_MCANMsgRAMCfgParams::txFIFOSize
uint32_t txFIFOSize
Definition: canfd.h:769
CANFD_DmaRxBuf::header1
uint32_t header1
Definition: canfd.h:1514
CANFD_OpenParams::msgRAMConfig
CANFD_MCANMsgRAMCfgParams msgRAMConfig
Definition: canfd.h:1293
CANFD_Reason_SRC_RX_FIFO0_MSG_LOST
@ CANFD_Reason_SRC_RX_FIFO0_MSG_LOST
Rx FIFO 0 Message Lost.
Definition: canfd.h:536
CANFD_MCANErrCntStatus::recErrCnt
uint32_t recErrCnt
Definition: canfd.h:871
CANFD_getTxPinState
uint32_t CANFD_getTxPinState(CANFD_Handle canfdHandle)
This API will return Tx pin state of MCAN module.
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
CANFD_Handle
void * CANFD_Handle
A handle that is returned from a CANFD_open() call.
Definition: canfd.h:106
CANFD_int0Isr
void CANFD_int0Isr(void *args)
The function is the registered interrupt 0 ISR for the CANFD Driver.
CANFD_OpenParams::autoWkupEnable
uint32_t autoWkupEnable
Definition: canfd.h:1205
CANFD_Direction
CANFD_Direction
Definition: canfd.h:317
CANFD_MCANBitTimingParams::nomPropSeg
uint32_t nomPropSeg
Definition: canfd.h:648
CANFD_MCANMsgRAMCfgParams::rxFIFO0OpMode
uint32_t rxFIFO0OpMode
Definition: canfd.h:809
CANFD_DmaMsgConfig
Definition: canfd.h:1480
CANFD_Option_MCAN_PROTOCOL_STATUS
@ CANFD_Option_MCAN_PROTOCOL_STATUS
Definition: canfd.h:569
CANFD_MCANGlobalFiltConfig::anfe
uint32_t anfe
Definition: canfd.h:719
CANFD_MCANECCErrForceParams::errForce
uint32_t errForce
Definition: canfd.h:984
CANFD_OpenParams::monEnable
uint32_t monEnable
Definition: canfd.h:1245
CANFD_MCANMsgRAMCfgParams
Definition: canfd.h:742
CANFD_Object
Definition: canfd.h:1321
CANFD_MCANECCErrStatus::bit2
uint32_t bit2
Definition: canfd.h:1020
CANFD_MCANErrCode_NO_ERROR
@ CANFD_MCANErrCode_NO_ERROR
Definition: canfd.h:444
CANFD_MAX_DLC_MAPPING
#define CANFD_MAX_DLC_MAPPING
Maximum data to DLC mapping supported. Refer MCAN_DataLengthSize.
Definition: canfd.h:238
CANFD_Reason_PROTOCOL_ERR_ARB_PHASE
@ CANFD_Reason_PROTOCOL_ERR_ARB_PHASE
Protocol error in arbitration phase detected.
Definition: canfd.h:531
CANFD_MCANOperationMode
CANFD_MCANOperationMode
Definition: canfd.h:301
CANFD_MCANProtocolStatus::lastErrCode
uint32_t lastErrCode
Definition: canfd.h:894
CANFD_MCANBitTimingParams::nomPseg1
uint32_t nomPseg1
Definition: canfd.h:651
CANFD_MCANTimeOutSelect
CANFD_MCANTimeOutSelect
Definition: canfd.h:363
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
CANFD_Attrs
Definition: canfd.h:1048
CANFD_Direction_RX
@ CANFD_Direction_RX
Definition: canfd.h:319
CANFD_OpenParams::timeoutSelect
CANFD_MCANTimeOutSelect timeoutSelect
Definition: canfd.h:1270
CANFD_OpenParams::eccConfig
CANFD_MCANECCConfigParams eccConfig
Definition: canfd.h:1298
CANFD_MCANCommState_RECEIVER
@ CANFD_MCANCommState_RECEIVER
Definition: canfd.h:427
CANFD_Object::rxBuffElem
MCAN_RxBufElement rxBuffElem
Buffer used to read message RAM.
Definition: canfd.h:1405
CANFD_Object::regBaseAddress
uint32_t regBaseAddress
Base address of the register address space to be used.
Definition: canfd.h:1330
CANFD_DmaRxBuf::header2
uint32_t header2
Definition: canfd.h:1516
CANFD_MCANMsgRAMCfgParams::txEventFIFOSize
uint32_t txEventFIFOSize
Definition: canfd.h:782
CANFD_MCANMsgRAMCfgParams::rxFIFO0waterMark
uint32_t rxFIFO0waterMark
Definition: canfd.h:803
CANFD_OpenParams::wdcPreload
uint32_t wdcPreload
Definition: canfd.h:1228
CANFD_MCANOperationMode_NORMAL
@ CANFD_MCANOperationMode_NORMAL
Definition: canfd.h:303
CANFD_MCANECCErrForceParams::bit2
uint32_t bit2
Definition: canfd.h:976
CANFD_OptionTLV::length
int32_t length
Option Length.
Definition: canfd.h:1107
CANFD_Attrs::intrNum1
uint32_t intrNum1
Definition: canfd.h:1056
CANFD_getOptions
int32_t CANFD_getOptions(CANFD_Handle handle, const CANFD_OptionTLV *ptrOptInfo)
Function is used by the application to get the error and status information from the driver.
CANFD_OpenParams::wkupReqEnable
uint32_t wkupReqEnable
Definition: canfd.h:1199
CANFD_setOptions
int32_t CANFD_setOptions(CANFD_Handle handle, const CANFD_OptionTLV *ptrOptInfo)
Function is used by the application to configure the driver options.
CANFD_MCANTdcConfig
Definition: canfd.h:682
CANFD_MessageObject::rxElement
uint32_t rxElement
Rx buffer number used to receive data.
Definition: canfd.h:1579
CANFD_MessageObject::direction
CANFD_Direction direction
Message object direction.
Definition: canfd.h:1553
CANFD_Object::errStatusInterrupts
uint32_t errStatusInterrupts
Number of error and status interrupts received.
Definition: canfd.h:1365
CANFD_Reason_TX_CANCELED
@ CANFD_Reason_TX_CANCELED
Data transmission is succesfully canceled.
Definition: canfd.h:511
CANFD_MCANECCErrStatus::bit1
uint32_t bit1
Definition: canfd.h:1015
CANFD_getRevisionId
void CANFD_getRevisionId(CANFD_Handle canfdHandle)
This API is used get the MCAN revision ID.
CANFD_MCANBitTimingParams::nomBrp
uint32_t nomBrp
Definition: canfd.h:645
CANFD_write
int32_t CANFD_write(CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t numMsgs, const uint8_t *data)
Function used by the application to transmit data.
CANFD_MCANECCErrForceParams::rowNum
uint32_t rowNum
Definition: canfd.h:968
CANFD_MCANMsgObjectStats::interruptsRxed
uint32_t interruptsRxed
Definition: canfd.h:1665
CANFD_Object::writeTransferSemObj
SemaphoreP_Object writeTransferSemObj
Definition: canfd.h:1436
CANFD_Reason
CANFD_Reason
Definition: canfd.h:496
CANFD_Attrs::txMemType
uint32_t txMemType
Definition: canfd.h:1074
mcan.h
This file contains the prototypes of the APIs present in the device abstraction layer file of MCAN....
CANFD_MCANMsgRAMCfgParams::rxFIFO1waterMark
uint32_t rxFIFO1waterMark
Definition: canfd.h:823
CANFD_Config::attrs
CANFD_Attrs * attrs
Definition: canfd.h:1466
CANFD_MCANProtocolStatus::pxe
uint32_t pxe
Definition: canfd.h:948
CANFD_Object::eccInterrupts
uint32_t eccInterrupts
Number of ECC interrupts received.
Definition: canfd.h:1375
CANFD_MCANECCConfigParams
Definition: canfd.h:839
CANFD_MessageObject::filterConfig
void * filterConfig
void pointer to MCAN_ExtMsgIDFilterElement or MCAN_StdMsgIDFilterElement structure....
Definition: canfd.h:1627
CANFD_MCANECCErrStatus::secErr
uint32_t secErr
Definition: canfd.h:1000
CANFD_Option
CANFD_Option
Definition: canfd.h:554
CANFD_MCANBitTimingParams::dataBrp
uint32_t dataBrp
Definition: canfd.h:660
CANFD_readDmaConfig
int32_t CANFD_readDmaConfig(CANFD_MsgObjHandle handle, const void *data, uint32_t numMsgs)
Function is used by the application to configure reading the received msgs from message ram....
CANFD_MCANMsgObjectStats::direction
uint32_t direction
Definition: canfd.h:1650
CANFD_OpenParams::emulationFAck
uint32_t emulationFAck
Definition: canfd.h:1217
CANFD_MCANElemSize_48BYTES
@ CANFD_MCANElemSize_48BYTES
Definition: canfd.h:287
CANFD_OpenParams::tsSelect
uint32_t tsSelect
Definition: canfd.h:1265
CANFD_MessageObject::args
void * args
Pointer to be used by application to store rx buffer.
Definition: canfd.h:1620
CANFD_Object::state
uint32_t state
CANFD driver internal state.
Definition: canfd.h:1335
CANFD_OpenParams::errInterruptEnable
uint32_t errInterruptEnable
Definition: canfd.h:1302
CANFD_MCANMsgObjectStats::messageProcessed
uint32_t messageProcessed
Definition: canfd.h:1668
CANFD_MCANMsgRAMCfgParams::rxFIFO0size
uint32_t rxFIFO0size
Definition: canfd.h:796
CANFD_MCANGlobalFiltConfig
Definition: canfd.h:701
CANFD_MessageObject::txMemType
MCAN_MemType txMemType
Part of message ram to accessed by this message object. Refer enum MCAN_MemType.
Definition: canfd.h:1585
CANFD_getTSCounterVal
uint32_t CANFD_getTSCounterVal(CANFD_Handle canfdHandle)
This API will return current timestamp counter value.
CANFD_clockStopReq
uint32_t CANFD_clockStopReq(CANFD_Handle canfdHandle)
This API get clock stop acknowledgement for MCAN module. It return whether MCAN is power down mode or...
CANFD_Attrs::baseAddr
uint32_t baseAddr
Definition: canfd.h:1050
CANFD_MessageObject::rxFifoNum
uint32_t rxFifoNum
FIFO Num (MCAN_RX_FIFO_NUM_0/MCAN_RX_FIFO_NUM_1).
Definition: canfd.h:1596
CANFD_writeDma
int32_t CANFD_writeDma(CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t numMsgs, const void *data)
Function used by the application to initiate transmit data in dma mode. DMA mode is recommended to be...
CANFD_MessageObject::canfdHandle
CANFD_Config * canfdHandle
Pointer to the CANFD driver object.
Definition: canfd.h:1548
CANFD_MCANLoopbackCfgParams::enable
uint32_t enable
Definition: canfd.h:628
CANFD_DmaMsgConfig::dataLengthPerMsg
uint32_t dataLengthPerMsg
data length in Bytes for every message.
Definition: canfd.h:1484
CANFD_MessageObject::messageProcessed
uint32_t messageProcessed
Number of messages processed.
Definition: canfd.h:1606
CANFD_createRxRangeMsgObject
int32_t CANFD_createRxRangeMsgObject(CANFD_Handle handle, CANFD_MessageObject *ptrCanMsgObj)
Function configures a receive message objects for a range of message identifiers. It also enables Rx ...