AM263Px MCU+ SDK  10.01.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 
172 #define MCAN_MSG_RAM_STD_ELEM_SIZE (1U)
173 
175 #define MCAN_MSG_RAM_EXT_ELEM_SIZE (2U)
176 
178 #define MCAN_MSG_HEADER_SIZE (8U)
179 
181 #define MCAN_FRAME_TYPE_FD (1U)
182 
185 #define MCAN_MSG_RAM_TX_RX_ELEM_SIZE (18U)
186 
188 #define XTD_MSGID_MASK (0x1fffffffU)
189 #define STD_MSGID_MASK (0x7ffU)
190 #define STD_MSGID_SHIFT (18U)
191 
193 #define MCAN_MAX_PAYLOAD_BYTES (64U)
194 
196 #define MCAN_MAX_RX_BUFFERS (64U)
197 
199 #define MCAN_MAX_TX_BUFFERS (32U)
200 
202 #define CANFD_UTILS_ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))
203 
205 #define CANFD_UTILS_GETARRAYINDEX(member, array) (member - &array[0])
206 
208 #define CANFD_UTILS_ARRAYISMEMBER(member, array) \
209  (((((uint32)member - (uint32) & array[0]) % sizeof(array[0])) == 0) \
210  && (member >= &array[0]) \
211  && (CANFD_UTILS_GETARRAYINDEX(member, array) < CANFD_UTILS_ARRAYSIZE(array)))
212 
216 #define MCAN_INTR_MASK ((uint32_t)MCAN_INTR_SRC_RX_FIFO0_NEW_MSG | \
217  (uint32_t)MCAN_INTR_SRC_RX_FIFO0_MSG_LOST | \
218  (uint32_t)MCAN_INTR_SRC_RX_FIFO1_NEW_MSG | \
219  (uint32_t)MCAN_INTR_SRC_TRANS_COMPLETE | \
220  (uint32_t)MCAN_INTR_SRC_TRANS_CANCEL_FINISH | \
221  (uint32_t)MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG | \
222  (uint32_t)MCAN_INTR_SRC_PROTOCOL_ERR_ARB | \
223  (uint32_t)MCAN_INTR_SRC_PROTOCOL_ERR_DATA | \
224  (uint32_t)MCAN_INTR_SRC_BUS_OFF_STATUS)
225 
227 #define CANFD_DMA_TX_COMPLETION_INTERMEDIATE (1U)
228 
229 #define CANFD_DMA_TX_COMPLETION_FINAL (2U)
230 
231 #define CANFD_DMA_RX_COMPLETION_INTERMEDIATE (1U)
232 
233 #define CANFD_DMA_RX_COMPLETION_FINAL (2U)
234 
236 #define CANFD_MAX_DLC_MAPPING (16U)
237 
249 #define CANFD_DRIVER_STATE_UNINIT (0U)
250 
251 #define CANFD_DRIVER_STATE_STARTED (1U)
252 
253 #define CANFD_DRIVER_STATE_STOPPED (2U)
254 
255 #define CCANFD_DRIVER_STATE_SLEEP (3U)
256 
264 typedef enum CANFD_MCANElemSize_t
265 {
268 
271 
274 
277 
280 
283 
286 
290 
298 typedef enum CANFD_MCANOperationMode_t
299 {
302 
306 
313 typedef enum CANFD_Direction_t
314 {
317 
321 
328 typedef enum CANFD_MCANXidType_t
329 {
332 
336 
343 typedef enum CANFD_MCANFrameType_t
344 {
347 
351 
358 typedef enum CANFD_MCANTimeOutSelect_t
359 {
362 
365 
368 
372 
381 typedef uint32_t CANFD_MCANECCErrType;
382 
383 #define CANFD_MCAN_ECC_ERR_TYPE_SEC (0U)
384 
385 #define CANFD_MCAN_ECC_ERR_TYPE_DED (1U)
386 
395 typedef enum CANFD_MCANLoopBackMode_t
396 {
399 
406 
414 typedef enum CANFD_MCANCommState_t
415 {
418 
421 
424 
428 
435 typedef enum CANFD_MCANErrCode_t
436 {
441 
446 
449 
452 
459 
470 
476 
483 
491 typedef enum CANFD_Reason_t
492 {
497 
502 
507 
512 
517 
522 
528 
538 typedef enum CANFD_Option_t
539 {
546 
553 
562 
570 
578 
590 
591 typedef void *CANFD_DmaHandle;
592 
593 typedef void *CANFD_DmaChConfig;
594 
601 typedef struct CANFD_MCANLoopbackCfgParams_t
602 {
608  uint32_t enable;
609 
613 
622 typedef struct CANFD_MCANBitTimingParams_t
623 {
625  uint32_t nomBrp;
626 
628  uint32_t nomPropSeg;
629 
631  uint32_t nomPseg1;
632 
634  uint32_t nomPseg2;
635 
637  uint32_t nomSjw;
638 
640  uint32_t dataBrp;
641 
643  uint32_t dataPropSeg;
644 
646  uint32_t dataPseg1;
647 
649  uint32_t dataPseg2;
650 
652  uint32_t dataSjw;
654 
661 typedef struct CANFD_MCANTdcConfig_t
662 {
666  uint32_t tdcf;
667 
671  uint32_t tdco;
673 
680 typedef struct CANFD_MCANGlobalFiltConfig_t
681 {
686  uint32_t rrfe;
687 
692  uint32_t rrfs;
693 
699  uint32_t anfe;
700 
706  uint32_t anfs;
708 
721 typedef struct CANFD_MCANMsgRAMCfgParams_t
722 {
728  uint32_t lss;
729 
735  uint32_t lse;
736 
742  uint32_t txBufNum;
743 
749  uint32_t txFIFOSize;
750 
755  uint32_t txBufMode;
756 
762  uint32_t txEventFIFOSize;
763 
770 
776  uint32_t rxFIFO0size;
777 
784 
789  uint32_t rxFIFO0OpMode;
790 
796  uint32_t rxFIFO1size;
797 
804 
809  uint32_t rxFIFO1OpMode;
811 
818 typedef struct CANFD_MCANECCConfigParams_t
819 {
824  uint32_t enable;
825 
830  uint32_t enableChk;
831 
836  uint32_t enableRdModWr;
838 
845 typedef struct CANFD_MCANErrCntStatus_t
846 {
848  uint32_t transErrLogCnt;
849 
851  uint32_t recErrCnt;
852 
857  uint32_t rpStatus;
858 
860  uint32_t canErrLogCnt;
862 
869 typedef struct CANFD_MCANProtocolStatus_t
870 {
874  uint32_t lastErrCode;
875 
879  uint32_t act;
880 
885  uint32_t errPassive;
886 
892  uint32_t warningStatus;
893 
898  uint32_t busOffStatus;
899 
903  uint32_t dlec;
904 
909  uint32_t resi;
910 
915  uint32_t rbrs;
916 
922  uint32_t rfdf;
923 
928  uint32_t pxe;
929 
931  uint32_t tdcv;
933 
940 typedef struct CANFD_MCANECCErrForceParams_t
941 {
945  uint32_t errType;
946 
948  uint32_t rowNum;
949 
953  uint32_t bit1;
954 
956  uint32_t bit2;
957 
961  uint32_t errOnce;
962 
964  uint32_t errForce;
966 
974 typedef struct CANFD_MCANECCErrStatus_t
975 {
980  uint32_t secErr;
981 
986  uint32_t dedErr;
987 
991  uint32_t row;
992 
995  uint32_t bit1;
996 
1000  uint32_t bit2;
1002 
1010 typedef union CANFD_ErrStatusResp_t
1011 {
1014 
1018 
1019 
1027 typedef struct CANFD_Attrs_s
1028 {
1029  /* Peripheral base address */
1030  uint32_t baseAddr;
1031 
1033  uint32_t intrNum0;
1034 
1036  uint32_t intrNum1;
1037 
1039  uint32_t operMode;
1040 
1042  uint8_t intrPriority;
1043 
1045  uint32_t OptionTLVtype;
1046 
1047  /* MCAN Loopback parameters. */
1049 
1050  /* parameters for bit timing calculation. */
1052 
1054  uint32_t txMemType;
1055 
1057  uint32_t rxMemType;
1058 
1065 } CANFD_Attrs;
1066 
1077 typedef struct CANFD_OptionTLV_t
1078 {
1083 
1087  int32_t length;
1088 
1092  void* value;
1094 
1102 typedef void (*CANFD_TransferCallbackFxn) (void *args, CANFD_Reason reason);
1103 
1111 typedef void (*CANFD_ErrorCallbackFxn) (void *args, CANFD_Reason reason, CANFD_ErrStatusResp* errStatusResp);
1112 
1113 
1122 typedef struct CANFD_OpenParams_t
1123 {
1126  uint32_t transferMode;
1127 
1130 
1133 
1138  uint32_t fdMode;
1139 
1145  uint32_t brsEnable;
1146 
1151  uint32_t txpEnable;
1152 
1158  uint32_t efbi;
1159 
1164  uint32_t pxhddisable;
1165 
1171  uint32_t darEnable;
1172 
1177  uint32_t wkupReqEnable;
1178 
1183  uint32_t autoWkupEnable;
1184 
1190 
1195  uint32_t emulationFAck;
1196 
1201  uint32_t clkStopFAck;
1202 
1206  uint32_t wdcPreload;
1207 
1212  uint32_t tdcEnable;
1213 
1218 
1223  uint32_t monEnable;
1224 
1230  uint32_t asmEnable;
1231 
1235  uint32_t tsPrescalar;
1236 
1243  uint32_t tsSelect;
1244 
1249 
1255  uint32_t timeoutPreload;
1256 
1262 
1267 
1272 
1277 
1281 
1286 
1298 typedef struct CANFD_Object_t
1299 {
1304 
1308  uint32_t regBaseAddress;
1309 
1313  uint32_t state;
1314 
1319 
1323  uint8_t mcanDataSize[CANFD_MAX_DLC_MAPPING];
1324 
1328  struct CANFD_MessageObject_t* msgObjectHandle[MCAN_MAX_MSG_OBJECTS];
1329 
1333  struct CANFD_MessageObject_t* txMapping[MCAN_MAX_TX_MSG_OBJECTS];
1334 
1338  struct CANFD_MessageObject_t* rxMapping[MCAN_MAX_RX_MSG_OBJECTS];
1339 
1344 
1348  uint32_t interrupts;
1349 
1353  uint32_t eccInterrupts;
1354 
1359 
1364 
1369 
1373  uint8_t txStatus[MCAN_MAX_TX_MSG_OBJECTS];
1374 
1378  uint32_t useFifoNum;
1379 
1384 
1389 
1394 
1398  void* args;
1399 
1403 
1407 
1411 
1415 
1417  void *hwiHandle;
1418 
1421 
1424 
1425 }CANFD_Object;
1426 
1439 typedef struct CANFD_Config_s
1440 {
1445 } CANFD_Config;
1446 
1454 typedef struct CANFD_DmaMsgConfig_s
1455 {
1463  uint32_t numMsgs;
1467  const void *data;
1471  uint32_t currentMsgNum;
1473 
1486 typedef struct CANFD_DmaRxBuf_s
1487 {
1488  /* Header word 1 in Rx buffer in message ram */
1489  uint32_t header1;
1490  /* Header word 2 in Rx buffer in message ram */
1491  uint32_t header2;
1492  /* Data Bytes Rx buffer in message ram */
1493  uint8_t data[MCAN_MAX_RX_BUFFERS];
1495 
1506 typedef struct CANFD_MessageObject_t
1507 {
1512  uint32_t startMsgId;
1513 
1518  uint32_t endMsgId;
1519 
1524 
1529 
1534 
1538  uint32_t messageObjNum;
1539 
1544  uint32_t dataLength;
1545 
1549  uint32_t txElement;
1550 
1554  uint32_t rxElement;
1555 
1560 
1565 
1569  uint32_t fifoNum;
1570 
1574  uint32_t interruptsRxed;
1575 
1580 
1584  uint32_t dmaEventNo;
1589 
1593  void *args;
1594 
1602 
1610 
1617 typedef struct CANFD_MCANMsgObjectStats_t
1618 {
1621 
1623  uint32_t direction;
1624 
1628 
1632 
1634  uint32_t interruptsRxed;
1635 
1639 
1646 typedef struct CANFD_DmaConfig_s
1647 {
1649  /* Arguments specific to a DMA driver. This will be typecasted to the specific DMA driver args struct
1650  * when used by the appropriate callback. This struct will be defined in the specific DMA driver header file.
1651  * Allocation of this struct will be done statically using Sysconfig code generation in the example code
1652  */
1653 } CANFD_DmaConfig;
1654 
1655 
1659 void CANFD_init(void);
1660 
1664 void CANFD_deinit(void);
1665 
1678 CANFD_Handle CANFD_open(uint32_t index, CANFD_OpenParams *openPrms);
1679 
1689 
1702 int32_t CANFD_configBitTime(CANFD_Handle handle, const CANFD_MCANBitTimingParams* bitTimeParams);
1703 
1722 
1740 
1752 
1771 int32_t CANFD_write(CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t numMsgs, const uint8_t* data);
1772 
1784 
1808 int32_t CANFD_writeDma(CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t numMsgs, const void* data);
1809 
1824 
1825 uint32_t CANFD_getFilterEventConfig(uint32_t eventNum);
1826 
1840 int32_t CANFD_read(CANFD_MsgObjHandle handle, uint32_t numMsgs, uint8_t* data);
1841 
1859 int32_t CANFD_readDmaConfig(CANFD_MsgObjHandle handle, const void* data, uint32_t numMsgs);
1860 
1872 int32_t CANFD_getOptions(CANFD_Handle handle, const CANFD_OptionTLV* ptrOptInfo);
1873 
1884 int32_t CANFD_setOptions(CANFD_Handle handle, const CANFD_OptionTLV* ptrOptInfo);
1885 
1889 void CANFD_int0Isr (void *args);
1890 
1894 void CANFD_int1Isr (void *args);
1895 
1908 
1923 
1934 int32_t CANFD_dmaOpen(CANFD_Handle canfdHandle, CANFD_DmaChConfig dmaChCfg);
1935 
1943 int32_t CANFD_dmaClose(CANFD_Handle canfdHandle);
1944 
1953 int32_t CANFD_createDmaTxMsgObject(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj);
1954 
1963 int32_t CANFD_deleteDmaTxMsgObject(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject* ptrCanMsgObj);
1964 
1976 int32_t CANFD_configureDmaTx(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void* data);
1977 
1986 int32_t CANFD_cancelDmaTx(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject* ptrCanMsgObj);
1987 
2000 void CANFD_dmaTxCompletionCallback(CANFD_MessageObject* ptrCanMsgObj, const void *data, uint32_t completionType);
2001 
2010 int32_t CANFD_createDmaRxMsgObject(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj);
2011 
2020 int32_t CANFD_deleteDmaRxMsgObject(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject* ptrCanMsgObj);
2021 
2032 int32_t CANFD_configureDmaRx(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void* data);
2033 
2046 void CANFD_dmaRxCompletionCallback(CANFD_MessageObject* ptrCanMsgObj, const void *data, uint32_t completionType);
2047 
2048 
2055 int32_t CANFD_isDataSizeValid(uint32_t dataSize);
2056 
2059 #ifdef __cplusplus
2060 }
2061 #endif
2062 
2063 #endif /* #ifndef CANFD__H_ */
2064 
CANFD_ErrStatusResp::eccErrStatus
CANFD_MCANECCErrStatus eccErrStatus
Definition: canfd.h:1013
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:671
CANFD_Object::handle
CANFD_Handle handle
Instance handle to which this object belongs.
Definition: canfd.h:1303
CANFD_MCANECCErrForceParams::errType
uint32_t errType
Definition: canfd.h:945
CANFD_MCANMsgRAMCfgParams::txBufMode
uint32_t txBufMode
Definition: canfd.h:755
CANFD_MCANMsgRAMCfgParams::txEventFIFOWaterMark
uint32_t txEventFIFOWaterMark
Definition: canfd.h:769
CANFD_MCANElemSize_64BYTES
@ CANFD_MCANElemSize_64BYTES
Definition: canfd.h:288
CANFD_MCANProtocolStatus::warningStatus
uint32_t warningStatus
Definition: canfd.h:892
CANFD_MCANTimeOutSelect_RX_FIFO0
@ CANFD_MCANTimeOutSelect_RX_FIFO0
Definition: canfd.h:367
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:1057
CANFD_MCANProtocolStatus::tdcv
uint32_t tdcv
Definition: canfd.h:931
CANFD_MCANGlobalFiltConfig::rrfe
uint32_t rrfe
Definition: canfd.h:686
CANFD_MCANCommState_TRANSMITTER
@ CANFD_MCANCommState_TRANSMITTER
Definition: canfd.h:426
CANFD_MCANProtocolStatus::rbrs
uint32_t rbrs
Definition: canfd.h:915
args
void * args
Definition: hsmclient_msg.h:4
CANFD_OptionTLV
Definition: canfd.h:1078
CANFD_MCANProtocolStatus::busOffStatus
uint32_t busOffStatus
Definition: canfd.h:898
CANFD_Config::object
CANFD_Object * object
Definition: canfd.h:1443
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:1420
CANFD_MCANBitTimingParams::dataPseg2
uint32_t dataPseg2
Definition: canfd.h:649
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:652
CANFD_Object::args
void * args
Pointer to be used by application to store miscellaneous data.
Definition: canfd.h:1398
CANFD_MCANErrCode_STUFF_ERROR
@ CANFD_MCANErrCode_STUFF_ERROR
Definition: canfd.h:445
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:885
CANFD_OpenParams::timeoutPreload
uint32_t timeoutPreload
Definition: canfd.h:1255
CANFD_OpenParams
Definition: canfd.h:1123
CANFD_MCANErrCode
CANFD_MCANErrCode
Definition: canfd.h:436
CANFD_MCANElemSize
CANFD_MCANElemSize
Definition: canfd.h:265
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_MCANErrCntStatus
Definition: canfd.h:846
CANFD_DmaMsgConfig::currentMsgNum
uint32_t currentMsgNum
Used by driver to store current message count out of the numMsgs already processed.
Definition: canfd.h:1471
CANFD_MCANProtocolStatus::act
uint32_t act
Definition: canfd.h:879
CANFD_MCANErrCntStatus::transErrLogCnt
uint32_t transErrLogCnt
Definition: canfd.h:848
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:561
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:1631
CANFD_MCANLoopbackCfgParams
Definition: canfd.h:602
CANFD_OpenParams::asmEnable
uint32_t asmEnable
Definition: canfd.h:1230
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_MessageObject::fifoNum
uint32_t fifoNum
FIFO Num (MCAN_RX_FIFO_NUM_0/MCAN_RX_FIFO_NUM_0).
Definition: canfd.h:1569
CANFD_MCANElemSize_32BYTES
@ CANFD_MCANElemSize_32BYTES
Definition: canfd.h:282
CANFD_Option_MCAN_LOOPBACK
@ CANFD_Option_MCAN_LOOPBACK
Definition: canfd.h:577
CANFD_MCANBitTimingParams::nomSjw
uint32_t nomSjw
Definition: canfd.h:637
CANFD_Object::interrupts
uint32_t interrupts
Number of interrupts received for message Tx or Rx.
Definition: canfd.h:1348
CANFD_Reason_BUSOFF
@ CANFD_Reason_BUSOFF
Bus Off condition detected.
Definition: canfd.h:516
CANFD_MCANProtocolStatus::dlec
uint32_t dlec
Definition: canfd.h:903
CANFD_OpenParams::darEnable
uint32_t darEnable
Definition: canfd.h:1171
CANFD_MCANTimeOutSelect_TX_EVENT_FIFO
@ CANFD_MCANTimeOutSelect_TX_EVENT_FIFO
Definition: canfd.h:364
CANFD_Reason_PROTOCOL_ERR_DATA_PHASE
@ CANFD_Reason_PROTOCOL_ERR_DATA_PHASE
Protocol error in data phase detected.
Definition: canfd.h:521
gCANFDConfigNum
uint32_t gCANFDConfigNum
Externally defined driver configuration array size.
CANFD_OpenParams::brsEnable
uint32_t brsEnable
Definition: canfd.h:1145
CANFD_MCANECCConfigParams::enableChk
uint32_t enableChk
Definition: canfd.h:830
CANFD_MCANBitTimingParams
Definition: canfd.h:623
CANFD_MessageObject::dmaEventNo
uint32_t dmaEventNo
Dma Event number allocated for this message object.
Definition: canfd.h:1584
CANFD_Option_MCAN_POWER_DOWN
@ CANFD_Option_MCAN_POWER_DOWN
Definition: canfd.h:588
CANFD_DmaConfig
Definition: canfd.h:1647
CANFD_MCANTimeOutSelect_RX_FIFO1
@ CANFD_MCANTimeOutSelect_RX_FIFO1
Definition: canfd.h:370
CANFD_OpenParams::timeoutCntEnable
uint32_t timeoutCntEnable
Definition: canfd.h:1261
CANFD_DmaMsgConfig::data
const void * data
pointer to the data buffer. This should a 2d array of uint8[numMsgs][dataLengthPerMsg]
Definition: canfd.h:1467
CANFD_Object::protoArbErrInterrupts
uint32_t protoArbErrInterrupts
Number of Protocol error in arbitration phase interrupts received.
Definition: canfd.h:1368
CANFD_MCANCommState
CANFD_MCANCommState
Definition: canfd.h:415
CANFD_MCANLoopBackMode
CANFD_MCANLoopBackMode
Definition: canfd.h:396
CANFD_OpenParams::tsPrescalar
uint32_t tsPrescalar
Definition: canfd.h:1235
CANFD_Object::canfdDmaHandle
CANFD_DmaHandle canfdDmaHandle
Dma driver handle.
Definition: canfd.h:1388
CANFD_MCANECCErrForceParams
Definition: canfd.h:941
CANFD_OpenParams::transferCallbackFxn
CANFD_TransferCallbackFxn transferCallbackFxn
Definition: canfd.h:1129
CANFD_MCANFrameType
CANFD_MCANFrameType
Definition: canfd.h:344
CANFD_Object::protoDataErrInterrupts
uint32_t protoDataErrInterrupts
Number of Protocol error in data phase interrupts received.
Definition: canfd.h:1363
CANFD_OpenParams::emulationEnable
uint32_t emulationEnable
Definition: canfd.h:1189
CANFD_MessageObject::msgIdType
CANFD_MCANXidType msgIdType
Message object type.
Definition: canfd.h:1533
CANFD_Reason_ECC_ERROR
@ CANFD_Reason_ECC_ERROR
Data has been succesfully transmitted.
Definition: canfd.h:511
CANFD_Object::readTransferSem
void * readTransferSem
Definition: canfd.h:1402
CANFD_MCANGlobalFiltConfig::rrfs
uint32_t rrfs
Definition: canfd.h:692
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:1393
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:634
CANFD_MCANMsgObjectStats
Definition: canfd.h:1618
CANFD_DmaChConfig
void * CANFD_DmaChConfig
Definition: canfd.h:593
CANFD_Object::busOffInterrupts
uint32_t busOffInterrupts
Number of Bus-Off interrupts received.
Definition: canfd.h:1358
CANFD_Object::writeTransferSem
void * writeTransferSem
Definition: canfd.h:1410
CANFD_MCANFrameType_CLASSIC
@ CANFD_MCANFrameType_CLASSIC
Definition: canfd.h:346
CANFD_MCANMsgObjectStats::handle
CANFD_MsgObjHandle handle
Definition: canfd.h:1620
CANFD_MCANCommState_SYNCHRONIZING
@ CANFD_MCANCommState_SYNCHRONIZING
Definition: canfd.h:417
CANFD_ErrStatusResp
Definition: canfd.h:1011
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:1544
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_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:1518
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:1102
CANFD_MCANECCErrForceParams::bit1
uint32_t bit1
Definition: canfd.h:953
CANFD_MCANErrCode_NO_CHANGE
@ CANFD_MCANErrCode_NO_CHANGE
Definition: canfd.h:481
CANFD_MCANProtocolStatus::resi
uint32_t resi
Definition: canfd.h:909
CANFD_Config
Definition: canfd.h:1440
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:1284
CANFD_MCANElemSize_16BYTES
@ CANFD_MCANElemSize_16BYTES
Definition: canfd.h:273
CANFD_Option_MCAN_MODE
@ CANFD_Option_MCAN_MODE
Definition: canfd.h:569
CANFD_DmaHandle
void * CANFD_DmaHandle
Definition: canfd.h:591
CANFD_MsgObjHandle
CANFD_MessageObject * CANFD_MsgObjHandle
Definition: canfd.h:1609
CANFD_Object::hwiHandle
void * hwiHandle
Definition: canfd.h:1417
CANFD_MCANErrCntStatus::canErrLogCnt
uint32_t canErrLogCnt
Definition: canfd.h:860
CANFD_ErrStatusResp::protocolStatus
CANFD_MCANProtocolStatus protocolStatus
Definition: canfd.h:1016
CANFD_MCANErrCode_BIT1_ERROR
@ CANFD_MCANErrCode_BIT1_ERROR
Definition: canfd.h:458
CANFD_MCANXidType_29_BIT
@ CANFD_MCANXidType_29_BIT
Definition: canfd.h:334
CANFD_Attrs::operMode
uint32_t operMode
Definition: canfd.h:1039
CANFD_MessageObject::dmaMsgConfig
CANFD_DmaMsgConfig dmaMsgConfig
Dma message configuration.
Definition: canfd.h:1588
CANFD_Direction_TX
@ CANFD_Direction_TX
Definition: canfd.h:319
CANFD_Reason_RX
@ CANFD_Reason_RX
Data has been received and the application is required to read and process the data.
Definition: canfd.h:496
CANFD_OptionTLV::value
void * value
Option Value.
Definition: canfd.h:1092
CANFD_MCANECCConfigParams::enable
uint32_t enable
Definition: canfd.h:824
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:1512
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:1549
CANFD_MCANECCConfigParams::enableRdModWr
uint32_t enableRdModWr
Definition: canfd.h:836
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:796
CANFD_MessageObject::messageObjNum
uint32_t messageObjNum
Allocated message object number.
Definition: canfd.h:1538
CANFD_isDataSizeValid
int32_t CANFD_isDataSizeValid(uint32_t dataSize)
Function to verify the the data Size is valid or not.
CANFD_Object::openParams
CANFD_OpenParams * openParams
CANFD driver init parameters.
Definition: canfd.h:1318
CANFD_Attrs::CANFDMcanloopbackParams
CANFD_MCANLoopbackCfgParams CANFDMcanloopbackParams
Definition: canfd.h:1048
CANFD_MessageObject
Definition: canfd.h:1507
CANFD_OpenParams::txpEnable
uint32_t txpEnable
Definition: canfd.h:1151
CANFD_Attrs::intrPriority
uint8_t intrPriority
Definition: canfd.h:1042
CANFD_Reason_TX_COMPLETION
@ CANFD_Reason_TX_COMPLETION
Data has been succesfully transmitted.
Definition: canfd.h:501
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:1111
CANFD_MCANECCErrType
uint32_t CANFD_MCANECCErrType
This enumeration defines the MCAN ECC Error Types.
Definition: canfd.h:381
CANFD_Attrs::OptionTLVtype
uint32_t OptionTLVtype
Definition: canfd.h:1045
CANFD_MCANECCErrStatus::row
uint32_t row
Definition: canfd.h:991
CANFD_DmaRxBuf
Definition: canfd.h:1487
CANFD_MCANElemSize_20BYTES
@ CANFD_MCANElemSize_20BYTES
Definition: canfd.h:276
CANFD_MCANErrCode_BIT0_ERROR
@ CANFD_MCANErrCode_BIT0_ERROR
Definition: canfd.h:469
CANFD_MCANTimeOutSelect_CONT
@ CANFD_MCANTimeOutSelect_CONT
Definition: canfd.h:361
CANFD_MCANElemSize_8BYTES
@ CANFD_MCANElemSize_8BYTES
Definition: canfd.h:267
CANFD_MCANElemSize_24BYTES
@ CANFD_MCANElemSize_24BYTES
Definition: canfd.h:279
CANFD_MCANBitTimingParams::dataPseg1
uint32_t dataPseg1
Definition: canfd.h:646
CANFD_Attrs::intrNum0
uint32_t intrNum0
Definition: canfd.h:1033
CANFD_MCANGlobalFiltConfig::anfs
uint32_t anfs
Definition: canfd.h:706
CANFD_MCANProtocolStatus
Definition: canfd.h:870
CANFD_Attrs::CANFDMcanBitTimingParams
CANFD_MCANBitTimingParams CANFDMcanBitTimingParams
Definition: canfd.h:1051
CANFD_MCANLoopbackCfgParams::mode
CANFD_MCANLoopBackMode mode
Definition: canfd.h:611
CANFD_MCANErrCntStatus::rpStatus
uint32_t rpStatus
Definition: canfd.h:857
CANFD_MCANMsgRAMCfgParams::txBufNum
uint32_t txBufNum
Definition: canfd.h:742
CANFD_DmaConfig::canfdDmaArgs
void * canfdDmaArgs
Definition: canfd.h:1648
CANFD_MCANOperationMode_SW_INIT
@ CANFD_MCANOperationMode_SW_INIT
Definition: canfd.h:304
HwiP.h
CANFD_MCANFrameType_FD
@ CANFD_MCANFrameType_FD
Definition: canfd.h:349
CANFD_OptionTLV::type
CANFD_Option type
Option Name.
Definition: canfd.h:1082
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:1574
CANFD_Object::readTransferSemObj
SemaphoreP_Object readTransferSemObj
Definition: canfd.h:1406
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:545
CANFD_OpenParams::tdcEnable
uint32_t tdcEnable
Definition: canfd.h:1212
CANFD_MCANLoopBackMode_INTERNAL
@ CANFD_MCANLoopBackMode_INTERNAL
Definition: canfd.h:398
CANFD_MCANECCErrForceParams::errOnce
uint32_t errOnce
Definition: canfd.h:961
CANFD_MCANProtocolStatus::rfdf
uint32_t rfdf
Definition: canfd.h:922
CANFD_OpenParams::efbi
uint32_t efbi
Definition: canfd.h:1158
CANFD_OpenParams::clkStopFAck
uint32_t clkStopFAck
Definition: canfd.h:1201
MCAN_MAX_RX_BUFFERS
#define MCAN_MAX_RX_BUFFERS
Maximum number of Rx buffers.
Definition: canfd.h:196
CANFD_OpenParams::errorCallbackFxn
CANFD_ErrorCallbackFxn errorCallbackFxn
Definition: canfd.h:1132
CANFD_MCANLoopBackMode_EXTERNAL
@ CANFD_MCANLoopBackMode_EXTERNAL
Definition: canfd.h:404
CANFD_getFilterEventConfig
uint32_t CANFD_getFilterEventConfig(uint32_t eventNum)
CANFD_MCANErrCode_FORM_ERROR
@ CANFD_MCANErrCode_FORM_ERROR
Definition: canfd.h:448
CANFD_OpenParams::pxhddisable
uint32_t pxhddisable
Definition: canfd.h:1164
CANFD_MCANXidType
CANFD_MCANXidType
Definition: canfd.h:329
CANFD_MCANErrCode_CRC_ERROR
@ CANFD_MCANErrCode_CRC_ERROR
Definition: canfd.h:475
CANFD_MCANElemSize_12BYTES
@ CANFD_MCANElemSize_12BYTES
Definition: canfd.h:270
CANFD_MCANECCErrStatus::dedErr
uint32_t dedErr
Definition: canfd.h:986
CANFD_MCANMsgRAMCfgParams::rxFIFO1OpMode
uint32_t rxFIFO1OpMode
Definition: canfd.h:809
CANFD_MCANTdcConfig::tdcf
uint32_t tdcf
Definition: canfd.h:666
CANFD_MCANXidType_11_BIT
@ CANFD_MCANXidType_11_BIT
Definition: canfd.h:331
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:1564
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:728
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:451
CANFD_MCANMsgObjectStats::startMsgIdentifier
uint32_t startMsgIdentifier
Definition: canfd.h:1627
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:420
CANFD_OpenParams::fdMode
uint32_t fdMode
Definition: canfd.h:1138
CANFD_OpenParams::transferMode
uint32_t transferMode
Definition: canfd.h:1126
CANFD_MCANMsgRAMCfgParams::lse
uint32_t lse
Definition: canfd.h:735
CANFD_MCANECCErrStatus
Definition: canfd.h:975
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:1423
CANFD_OpenParams::tdcConfig
CANFD_MCANTdcConfig tdcConfig
Definition: canfd.h:1217
CANFD_deleteMsgObject
int32_t CANFD_deleteMsgObject(CANFD_MsgObjHandle handle)
Function deletes a message object.
CANFD_MCANBitTimingParams::dataPropSeg
uint32_t dataPropSeg
Definition: canfd.h:643
CANFD_DmaMsgConfig::numMsgs
uint32_t numMsgs
Number of messages.
Definition: canfd.h:1463
CANFD_OpenParams::filterConfig
CANFD_MCANGlobalFiltConfig filterConfig
Definition: canfd.h:1266
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:1378
CANFD_Attrs::filterConfig
void * filterConfig
void pointer to MCAN_ExtMsgIDFilterElement or MCAN_StdMsgIDFilterElement structure....
Definition: canfd.h:1064
CANFD_MCANMsgRAMCfgParams::txFIFOSize
uint32_t txFIFOSize
Definition: canfd.h:749
CANFD_DmaRxBuf::header1
uint32_t header1
Definition: canfd.h:1489
CANFD_OpenParams::msgRAMConfig
CANFD_MCANMsgRAMCfgParams msgRAMConfig
Definition: canfd.h:1271
CANFD_MCANErrCntStatus::recErrCnt
uint32_t recErrCnt
Definition: canfd.h:851
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:1183
CANFD_Direction
CANFD_Direction
Definition: canfd.h:314
CANFD_MCANBitTimingParams::nomPropSeg
uint32_t nomPropSeg
Definition: canfd.h:628
CANFD_MCANMsgRAMCfgParams::rxFIFO0OpMode
uint32_t rxFIFO0OpMode
Definition: canfd.h:789
CANFD_DmaMsgConfig
Definition: canfd.h:1455
CANFD_Option_MCAN_PROTOCOL_STATUS
@ CANFD_Option_MCAN_PROTOCOL_STATUS
Definition: canfd.h:552
CANFD_MCANGlobalFiltConfig::anfe
uint32_t anfe
Definition: canfd.h:699
CANFD_MCANECCErrForceParams::errForce
uint32_t errForce
Definition: canfd.h:964
CANFD_OpenParams::monEnable
uint32_t monEnable
Definition: canfd.h:1223
CANFD_MCANMsgRAMCfgParams
Definition: canfd.h:722
CANFD_Object
Definition: canfd.h:1299
CANFD_MCANECCErrStatus::bit2
uint32_t bit2
Definition: canfd.h:1000
CANFD_MCANErrCode_NO_ERROR
@ CANFD_MCANErrCode_NO_ERROR
Definition: canfd.h:440
CANFD_MAX_DLC_MAPPING
#define CANFD_MAX_DLC_MAPPING
Maximum data to DLC mapping supported. Refer MCAN_DataLengthSize.
Definition: canfd.h:236
CANFD_Reason_PROTOCOL_ERR_ARB_PHASE
@ CANFD_Reason_PROTOCOL_ERR_ARB_PHASE
Protocol error in arbitration phase detected.
Definition: canfd.h:526
CANFD_MCANOperationMode
CANFD_MCANOperationMode
Definition: canfd.h:299
CANFD_MCANProtocolStatus::lastErrCode
uint32_t lastErrCode
Definition: canfd.h:874
CANFD_MCANBitTimingParams::nomPseg1
uint32_t nomPseg1
Definition: canfd.h:631
CANFD_MCANTimeOutSelect
CANFD_MCANTimeOutSelect
Definition: canfd.h:359
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
CANFD_Attrs
Definition: canfd.h:1028
CANFD_Direction_RX
@ CANFD_Direction_RX
Definition: canfd.h:316
CANFD_OpenParams::timeoutSelect
CANFD_MCANTimeOutSelect timeoutSelect
Definition: canfd.h:1248
CANFD_OpenParams::eccConfig
CANFD_MCANECCConfigParams eccConfig
Definition: canfd.h:1276
CANFD_MCANCommState_RECEIVER
@ CANFD_MCANCommState_RECEIVER
Definition: canfd.h:423
CANFD_Object::rxBuffElem
MCAN_RxBufElement rxBuffElem
Buffer used to read message RAM.
Definition: canfd.h:1383
CANFD_read
int32_t CANFD_read(CANFD_MsgObjHandle handle, 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_Object::regBaseAddress
uint32_t regBaseAddress
Base address of the register address space to be used.
Definition: canfd.h:1308
CANFD_DmaRxBuf::header2
uint32_t header2
Definition: canfd.h:1491
CANFD_MCANMsgRAMCfgParams::txEventFIFOSize
uint32_t txEventFIFOSize
Definition: canfd.h:762
CANFD_MCANMsgRAMCfgParams::rxFIFO0waterMark
uint32_t rxFIFO0waterMark
Definition: canfd.h:783
CANFD_OpenParams::wdcPreload
uint32_t wdcPreload
Definition: canfd.h:1206
CANFD_MCANOperationMode_NORMAL
@ CANFD_MCANOperationMode_NORMAL
Definition: canfd.h:301
CANFD_MCANECCErrForceParams::bit2
uint32_t bit2
Definition: canfd.h:956
CANFD_OptionTLV::length
int32_t length
Option Length.
Definition: canfd.h:1087
CANFD_Attrs::intrNum1
uint32_t intrNum1
Definition: canfd.h:1036
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:1177
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:662
CANFD_MessageObject::rxElement
uint32_t rxElement
Rx buffer number used to receive data.
Definition: canfd.h:1554
CANFD_MessageObject::direction
CANFD_Direction direction
Message object direction.
Definition: canfd.h:1528
CANFD_Object::errStatusInterrupts
uint32_t errStatusInterrupts
Number of error and status interrupts received.
Definition: canfd.h:1343
CANFD_Reason_TX_CANCELED
@ CANFD_Reason_TX_CANCELED
Data transmission is succesfully canceled.
Definition: canfd.h:506
CANFD_MCANECCErrStatus::bit1
uint32_t bit1
Definition: canfd.h:995
CANFD_MCANBitTimingParams::nomBrp
uint32_t nomBrp
Definition: canfd.h:625
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:948
CANFD_MCANMsgObjectStats::interruptsRxed
uint32_t interruptsRxed
Definition: canfd.h:1634
CANFD_Object::writeTransferSemObj
SemaphoreP_Object writeTransferSemObj
Definition: canfd.h:1414
CANFD_Reason
CANFD_Reason
Definition: canfd.h:492
CANFD_Attrs::txMemType
uint32_t txMemType
Definition: canfd.h:1054
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:803
CANFD_Config::attrs
CANFD_Attrs * attrs
Definition: canfd.h:1441
CANFD_MCANProtocolStatus::pxe
uint32_t pxe
Definition: canfd.h:928
CANFD_Object::eccInterrupts
uint32_t eccInterrupts
Number of ECC interrupts received.
Definition: canfd.h:1353
CANFD_MCANECCConfigParams
Definition: canfd.h:819
CANFD_MessageObject::filterConfig
void * filterConfig
void pointer to MCAN_ExtMsgIDFilterElement or MCAN_StdMsgIDFilterElement structure....
Definition: canfd.h:1600
CANFD_MCANECCErrStatus::secErr
uint32_t secErr
Definition: canfd.h:980
CANFD_Option
CANFD_Option
Definition: canfd.h:539
CANFD_MCANBitTimingParams::dataBrp
uint32_t dataBrp
Definition: canfd.h:640
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:1623
CANFD_OpenParams::emulationFAck
uint32_t emulationFAck
Definition: canfd.h:1195
CANFD_MCANElemSize_48BYTES
@ CANFD_MCANElemSize_48BYTES
Definition: canfd.h:285
CANFD_OpenParams::tsSelect
uint32_t tsSelect
Definition: canfd.h:1243
CANFD_MessageObject::args
void * args
Pointer to be used by application to store rx buffer.
Definition: canfd.h:1593
CANFD_Object::state
uint32_t state
CANFD driver internal state.
Definition: canfd.h:1313
CANFD_OpenParams::errInterruptEnable
uint32_t errInterruptEnable
Definition: canfd.h:1280
CANFD_MCANMsgObjectStats::messageProcessed
uint32_t messageProcessed
Definition: canfd.h:1637
CANFD_MCANMsgRAMCfgParams::rxFIFO0size
uint32_t rxFIFO0size
Definition: canfd.h:776
CANFD_MCANGlobalFiltConfig
Definition: canfd.h:681
CANFD_MessageObject::txMemType
MCAN_MemType txMemType
Part of message ram to accessed by this message object. Refer enum MCAN_MemType.
Definition: canfd.h:1559
CANFD_Attrs::baseAddr
uint32_t baseAddr
Definition: canfd.h:1030
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:1523
CANFD_MCANLoopbackCfgParams::enable
uint32_t enable
Definition: canfd.h:608
CANFD_DmaMsgConfig::dataLengthPerMsg
uint32_t dataLengthPerMsg
data length in Bytes for every message.
Definition: canfd.h:1459
CANFD_MessageObject::messageProcessed
uint32_t messageProcessed
Number of messages processed.
Definition: canfd.h:1579
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 ...