AM263x MCU+ SDK  10.00.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 
245 typedef enum CANFD_MCANElemSize_t
246 {
249 
252 
255 
258 
261 
264 
267 
271 
278 typedef enum CANFD_DriverState_t
279 {
282 
285 
288 
292 
300 typedef enum CANFD_MCANOperationMode_t
301 {
304 
308 
315 typedef enum CANFD_Direction_t
316 {
319 
323 
330 typedef enum CANFD_MCANXidType_t
331 {
334 
338 
345 typedef enum CANFD_MCANFrameType_t
346 {
349 
353 
360 typedef enum CANFD_MCANTimeOutSelect_t
361 {
364 
367 
370 
374 
383 typedef uint32_t CANFD_MCANECCErrType;
384 
385 #define CANFD_MCAN_ECC_ERR_TYPE_SEC (0U)
386 
387 #define CANFD_MCAN_ECC_ERR_TYPE_DED (1U)
388 
397 typedef enum CANFD_MCANLoopBackMode_t
398 {
401 
408 
416 typedef enum CANFD_MCANCommState_t
417 {
420 
423 
426 
430 
437 typedef enum CANFD_MCANErrCode_t
438 {
443 
448 
451 
454 
461 
472 
478 
485 
493 typedef enum CANFD_Reason_t
494 {
499 
504 
509 
514 
519 
524 
530 
540 typedef enum CANFD_Option_t
541 {
548 
555 
564 
572 
580 
592 
593 typedef void *CANFD_DmaHandle;
594 
595 typedef void *CANFD_DmaChConfig;
596 
603 typedef struct CANFD_MCANLoopbackCfgParams_t
604 {
610  uint32_t enable;
611 
615 
624 typedef struct CANFD_MCANBitTimingParams_t
625 {
627  uint32_t nomBrp;
628 
630  uint32_t nomPropSeg;
631 
633  uint32_t nomPseg1;
634 
636  uint32_t nomPseg2;
637 
639  uint32_t nomSjw;
640 
642  uint32_t dataBrp;
643 
645  uint32_t dataPropSeg;
646 
648  uint32_t dataPseg1;
649 
651  uint32_t dataPseg2;
652 
654  uint32_t dataSjw;
656 
663 typedef struct CANFD_MCANTdcConfig_t
664 {
668  uint32_t tdcf;
669 
673  uint32_t tdco;
675 
682 typedef struct CANFD_MCANGlobalFiltConfig_t
683 {
688  uint32_t rrfe;
689 
694  uint32_t rrfs;
695 
701  uint32_t anfe;
702 
708  uint32_t anfs;
710 
723 typedef struct CANFD_MCANMsgRAMCfgParams_t
724 {
730  uint32_t lss;
731 
737  uint32_t lse;
738 
744  uint32_t txBufNum;
745 
751  uint32_t txFIFOSize;
752 
757  uint32_t txBufMode;
758 
764  uint32_t txEventFIFOSize;
765 
772 
778  uint32_t rxFIFO0size;
779 
786 
791  uint32_t rxFIFO0OpMode;
792 
798  uint32_t rxFIFO1size;
799 
806 
811  uint32_t rxFIFO1OpMode;
813 
820 typedef struct CANFD_MCANECCConfigParams_t
821 {
826  uint32_t enable;
827 
832  uint32_t enableChk;
833 
838  uint32_t enableRdModWr;
840 
847 typedef struct CANFD_MCANErrCntStatus_t
848 {
850  uint32_t transErrLogCnt;
851 
853  uint32_t recErrCnt;
854 
859  uint32_t rpStatus;
860 
862  uint32_t canErrLogCnt;
864 
871 typedef struct CANFD_MCANProtocolStatus_t
872 {
876  uint32_t lastErrCode;
877 
881  uint32_t act;
882 
887  uint32_t errPassive;
888 
894  uint32_t warningStatus;
895 
900  uint32_t busOffStatus;
901 
905  uint32_t dlec;
906 
911  uint32_t resi;
912 
917  uint32_t rbrs;
918 
924  uint32_t rfdf;
925 
930  uint32_t pxe;
931 
933  uint32_t tdcv;
935 
942 typedef struct CANFD_MCANECCErrForceParams_t
943 {
947  uint32_t errType;
948 
950  uint32_t rowNum;
951 
955  uint32_t bit1;
956 
958  uint32_t bit2;
959 
963  uint32_t errOnce;
964 
966  uint32_t errForce;
968 
976 typedef struct CANFD_MCANECCErrStatus_t
977 {
982  uint32_t secErr;
983 
988  uint32_t dedErr;
989 
993  uint32_t row;
994 
997  uint32_t bit1;
998 
1002  uint32_t bit2;
1004 
1012 typedef union CANFD_ErrStatusResp_t
1013 {
1016 
1020 
1021 
1029 typedef struct CANFD_Attrs_s
1030 {
1031  /* Peripheral base address */
1032  uint32_t baseAddr;
1033 
1035  uint32_t intrNum0;
1036 
1038  uint32_t intrNum1;
1039 
1041  uint32_t operMode;
1042 
1044  uint8_t intrPriority;
1045 
1047  uint32_t OptionTLVtype;
1048 
1049  /* MCAN Loopback parameters. */
1051 
1052  /* parameters for bit timing calculation. */
1054 } CANFD_Attrs;
1055 
1066 typedef struct CANFD_OptionTLV_t
1067 {
1072 
1076  int32_t length;
1077 
1081  void* value;
1083 
1091 typedef void (*CANFD_TransferCallbackFxn) (void *args, CANFD_Reason reason);
1092 
1100 typedef void (*CANFD_ErrorCallbackFxn) (void *args, CANFD_Reason reason, CANFD_ErrStatusResp* errStatusResp);
1101 
1102 
1111 typedef struct CANFD_OpenParams_t
1112 {
1115  uint32_t transferMode;
1116 
1119 
1122 
1127  uint32_t fdMode;
1128 
1134  uint32_t brsEnable;
1135 
1140  uint32_t txpEnable;
1141 
1147  uint32_t efbi;
1148 
1153  uint32_t pxhddisable;
1154 
1160  uint32_t darEnable;
1161 
1166  uint32_t wkupReqEnable;
1167 
1172  uint32_t autoWkupEnable;
1173 
1179 
1184  uint32_t emulationFAck;
1185 
1190  uint32_t clkStopFAck;
1191 
1195  uint32_t wdcPreload;
1196 
1201  uint32_t tdcEnable;
1202 
1207 
1212  uint32_t monEnable;
1213 
1219  uint32_t asmEnable;
1220 
1224  uint32_t tsPrescalar;
1225 
1232  uint32_t tsSelect;
1233 
1238 
1244  uint32_t timeoutPreload;
1245 
1251 
1256 
1261 
1266 
1270 
1275 
1287 typedef struct CANFD_Object_t
1288 {
1293 
1297  uint32_t regBaseAddress;
1298 
1303 
1308 
1312  uint8_t mcanDataSize[CANFD_MAX_DLC_MAPPING];
1313 
1317  struct CANFD_MessageObject_t* msgObjectHandle[MCAN_MAX_MSG_OBJECTS];
1318 
1322  struct CANFD_MessageObject_t* txMapping[MCAN_MAX_TX_MSG_OBJECTS];
1323 
1327  struct CANFD_MessageObject_t* rxMapping[MCAN_MAX_RX_MSG_OBJECTS];
1328 
1333 
1337  uint32_t interrupts;
1338 
1342  uint32_t eccInterrupts;
1343 
1348 
1353 
1358 
1362  uint8_t txStatus[MCAN_MAX_TX_MSG_OBJECTS];
1363 
1367  uint32_t useFifoNum;
1368 
1373 
1378 
1383 
1387  void* args;
1388 
1392 
1396 
1400 
1404 
1406  void *hwiHandle;
1407 
1410 
1413 
1414 }CANFD_Object;
1415 
1428 typedef struct CANFD_Config_s
1429 {
1434 } CANFD_Config;
1435 
1443 typedef struct CANFD_DmaMsgConfig_s
1444 {
1452  uint32_t numMsgs;
1456  const void *data;
1460  uint32_t currentMsgNum;
1462 
1475 typedef struct CANFD_DmaRxBuf_s
1476 {
1477  /* Header word 1 in Rx buffer in message ram */
1478  uint32_t header1;
1479  /* Header word 2 in Rx buffer in message ram */
1480  uint32_t header2;
1481  /* Data Bytes Rx buffer in message ram */
1482  uint8_t data[MCAN_MAX_RX_BUFFERS];
1484 
1495 typedef struct CANFD_MessageObject_t
1496 {
1501  uint32_t startMsgId;
1502 
1507  uint32_t endMsgId;
1508 
1513 
1518 
1523 
1527  uint32_t messageObjNum;
1528 
1533  uint32_t dataLength;
1534 
1538  uint32_t txElement;
1539 
1543  uint32_t rxElement;
1544 
1549 
1554 
1558  uint32_t fifoNum;
1559 
1563  uint32_t interruptsRxed;
1564 
1569 
1573  uint32_t dmaEventNo;
1578 
1582  void *args;
1583 
1585 
1593 
1600 typedef struct CANFD_MCANMsgObjectStats_t
1601 {
1604 
1606  uint32_t direction;
1607 
1611 
1615 
1617  uint32_t interruptsRxed;
1618 
1622 
1629 typedef struct CANFD_DmaConfig_s
1630 {
1632  /* Arguments specific to a DMA driver. This will be typecasted to the specific DMA driver args struct
1633  * when used by the appropriate callback. This struct will be defined in the specific DMA driver header file.
1634  * Allocation of this struct will be done statically using Sysconfig code generation in the example code
1635  */
1636 } CANFD_DmaConfig;
1637 
1638 
1642 void CANFD_init(void);
1643 
1647 void CANFD_deinit(void);
1648 
1661 CANFD_Handle CANFD_open(uint32_t index, CANFD_OpenParams *openPrms);
1662 
1672 
1685 int32_t CANFD_configBitTime(CANFD_Handle handle, const CANFD_MCANBitTimingParams* bitTimeParams);
1686 
1705 
1723 
1735 
1754 int32_t CANFD_write(CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t numMsgs, const uint8_t* data);
1755 
1767 
1791 int32_t CANFD_writeDma(CANFD_MsgObjHandle handle, uint32_t id, CANFD_MCANFrameType frameType, uint32_t numMsgs, const void* data);
1792 
1807 
1808 uint32_t CANFD_getFilterEventConfig(uint32_t eventNum);
1809 
1823 int32_t CANFD_read(CANFD_MsgObjHandle handle, uint32_t numMsgs, uint8_t* data);
1824 
1842 int32_t CANFD_readDmaConfig(CANFD_MsgObjHandle handle, const void* data, uint32_t numMsgs);
1843 
1855 int32_t CANFD_getOptions(CANFD_Handle handle, const CANFD_OptionTLV* ptrOptInfo);
1856 
1867 int32_t CANFD_setOptions(CANFD_Handle handle, const CANFD_OptionTLV* ptrOptInfo);
1868 
1872 void CANFD_int0Isr (void *args);
1873 
1877 void CANFD_int1Isr (void *args);
1878 
1891 
1906 
1917 int32_t CANFD_dmaOpen(CANFD_Handle canfdHandle, CANFD_DmaChConfig dmaChCfg);
1918 
1926 int32_t CANFD_dmaClose(CANFD_Handle canfdHandle);
1927 
1936 int32_t CANFD_createDmaTxMsgObject(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj);
1937 
1946 int32_t CANFD_deleteDmaTxMsgObject(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject* ptrCanMsgObj);
1947 
1959 int32_t CANFD_configureDmaTx(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void* data);
1960 
1969 int32_t CANFD_cancelDmaTx(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject* ptrCanMsgObj);
1970 
1983 void CANFD_dmaTxCompletionCallback(CANFD_MessageObject* ptrCanMsgObj, const void *data, uint32_t completionType);
1984 
1993 int32_t CANFD_createDmaRxMsgObject(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj);
1994 
2003 int32_t CANFD_deleteDmaRxMsgObject(const CANFD_Object *ptrCanFdObj, const CANFD_MessageObject* ptrCanMsgObj);
2004 
2015 int32_t CANFD_configureDmaRx(const CANFD_Object *ptrCanFdObj, CANFD_MessageObject* ptrCanMsgObj, uint32_t dataLengthPerMsg, uint32_t numMsgs, const void* data);
2016 
2029 void CANFD_dmaRxCompletionCallback(CANFD_MessageObject* ptrCanMsgObj, const void *data, uint32_t completionType);
2030 
2031 
2038 int32_t CANFD_isDataSizeValid(uint32_t dataSize);
2039 
2042 #ifdef __cplusplus
2043 }
2044 #endif
2045 
2046 #endif /* #ifndef CANFD__H_ */
2047 
CANFD_ErrStatusResp::eccErrStatus
CANFD_MCANECCErrStatus eccErrStatus
Definition: canfd.h:1015
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:673
CANFD_Object::handle
CANFD_Handle handle
Instance handle to which this object belongs.
Definition: canfd.h:1292
CANFD_MCANECCErrForceParams::errType
uint32_t errType
Definition: canfd.h:947
CANFD_MCANMsgRAMCfgParams::txBufMode
uint32_t txBufMode
Definition: canfd.h:757
CANFD_MCANMsgRAMCfgParams::txEventFIFOWaterMark
uint32_t txEventFIFOWaterMark
Definition: canfd.h:771
CANFD_MCANElemSize_64BYTES
@ CANFD_MCANElemSize_64BYTES
Definition: canfd.h:269
CANFD_MCANProtocolStatus::warningStatus
uint32_t warningStatus
Definition: canfd.h:894
CANFD_MCANTimeOutSelect_RX_FIFO0
@ CANFD_MCANTimeOutSelect_RX_FIFO0
Definition: canfd.h:369
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_MCANProtocolStatus::tdcv
uint32_t tdcv
Definition: canfd.h:933
CANFD_MCANGlobalFiltConfig::rrfe
uint32_t rrfe
Definition: canfd.h:688
CANFD_MCANCommState_TRANSMITTER
@ CANFD_MCANCommState_TRANSMITTER
Definition: canfd.h:428
CANFD_MCANProtocolStatus::rbrs
uint32_t rbrs
Definition: canfd.h:917
args
void * args
Definition: hsmclient_msg.h:4
CANFD_OptionTLV
Definition: canfd.h:1067
CANFD_MCANProtocolStatus::busOffStatus
uint32_t busOffStatus
Definition: canfd.h:900
CANFD_Config::object
CANFD_Object * object
Definition: canfd.h:1432
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:1409
CANFD_MCANBitTimingParams::dataPseg2
uint32_t dataPseg2
Definition: canfd.h:651
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:654
CANFD_Object::args
void * args
Pointer to be used by application to store miscellaneous data.
Definition: canfd.h:1387
CANFD_MCANErrCode_STUFF_ERROR
@ CANFD_MCANErrCode_STUFF_ERROR
Definition: canfd.h:447
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:887
CANFD_OpenParams::timeoutPreload
uint32_t timeoutPreload
Definition: canfd.h:1244
CANFD_OpenParams
Definition: canfd.h:1112
CANFD_MCANErrCode
CANFD_MCANErrCode
Definition: canfd.h:438
CANFD_MCANElemSize
CANFD_MCANElemSize
Definition: canfd.h:246
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:848
CANFD_DriverState_SLEEP
@ CANFD_DriverState_SLEEP
Definition: canfd.h:290
CANFD_DmaMsgConfig::currentMsgNum
uint32_t currentMsgNum
Used by driver to store current message count out of the numMsgs already processed.
Definition: canfd.h:1460
CANFD_MCANProtocolStatus::act
uint32_t act
Definition: canfd.h:881
CANFD_MCANErrCntStatus::transErrLogCnt
uint32_t transErrLogCnt
Definition: canfd.h:850
MCAN_RxBufElement
Structure for MCAN Rx Buffer element.
Definition: mcan.h:1439
CANFD_Option_MCAN_MSG_OBJECT_STATS
@ CANFD_Option_MCAN_MSG_OBJECT_STATS
Definition: canfd.h:563
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:1614
CANFD_MCANLoopbackCfgParams
Definition: canfd.h:604
CANFD_OpenParams::asmEnable
uint32_t asmEnable
Definition: canfd.h:1219
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:1558
CANFD_MCANElemSize_32BYTES
@ CANFD_MCANElemSize_32BYTES
Definition: canfd.h:263
CANFD_Option_MCAN_LOOPBACK
@ CANFD_Option_MCAN_LOOPBACK
Definition: canfd.h:579
CANFD_MCANBitTimingParams::nomSjw
uint32_t nomSjw
Definition: canfd.h:639
CANFD_Object::interrupts
uint32_t interrupts
Number of interrupts received for message Tx or Rx.
Definition: canfd.h:1337
CANFD_Reason_BUSOFF
@ CANFD_Reason_BUSOFF
Bus Off condition detected.
Definition: canfd.h:518
CANFD_MCANProtocolStatus::dlec
uint32_t dlec
Definition: canfd.h:905
CANFD_OpenParams::darEnable
uint32_t darEnable
Definition: canfd.h:1160
CANFD_MCANTimeOutSelect_TX_EVENT_FIFO
@ CANFD_MCANTimeOutSelect_TX_EVENT_FIFO
Definition: canfd.h:366
CANFD_Reason_PROTOCOL_ERR_DATA_PHASE
@ CANFD_Reason_PROTOCOL_ERR_DATA_PHASE
Protocol error in data phase detected.
Definition: canfd.h:523
gCANFDConfigNum
uint32_t gCANFDConfigNum
Externally defined driver configuration array size.
CANFD_OpenParams::brsEnable
uint32_t brsEnable
Definition: canfd.h:1134
CANFD_MCANECCConfigParams::enableChk
uint32_t enableChk
Definition: canfd.h:832
CANFD_MCANBitTimingParams
Definition: canfd.h:625
CANFD_MessageObject::dmaEventNo
uint32_t dmaEventNo
Dma Event number allocated for this message object.
Definition: canfd.h:1573
CANFD_Option_MCAN_POWER_DOWN
@ CANFD_Option_MCAN_POWER_DOWN
Definition: canfd.h:590
CANFD_DmaConfig
Definition: canfd.h:1630
CANFD_MCANTimeOutSelect_RX_FIFO1
@ CANFD_MCANTimeOutSelect_RX_FIFO1
Definition: canfd.h:372
CANFD_OpenParams::timeoutCntEnable
uint32_t timeoutCntEnable
Definition: canfd.h:1250
CANFD_DmaMsgConfig::data
const void * data
pointer to the data buffer. This should a 2d array of uint8[numMsgs][dataLengthPerMsg]
Definition: canfd.h:1456
CANFD_Object::protoArbErrInterrupts
uint32_t protoArbErrInterrupts
Number of Protocol error in arbitration phase interrupts received.
Definition: canfd.h:1357
CANFD_MCANCommState
CANFD_MCANCommState
Definition: canfd.h:417
CANFD_MCANLoopBackMode
CANFD_MCANLoopBackMode
Definition: canfd.h:398
CANFD_OpenParams::tsPrescalar
uint32_t tsPrescalar
Definition: canfd.h:1224
CANFD_Object::canfdDmaHandle
CANFD_DmaHandle canfdDmaHandle
Dma driver handle.
Definition: canfd.h:1377
CANFD_MCANECCErrForceParams
Definition: canfd.h:943
CANFD_OpenParams::transferCallbackFxn
CANFD_TransferCallbackFxn transferCallbackFxn
Definition: canfd.h:1118
CANFD_MCANFrameType
CANFD_MCANFrameType
Definition: canfd.h:346
CANFD_Object::protoDataErrInterrupts
uint32_t protoDataErrInterrupts
Number of Protocol error in data phase interrupts received.
Definition: canfd.h:1352
CANFD_OpenParams::emulationEnable
uint32_t emulationEnable
Definition: canfd.h:1178
CANFD_MessageObject::msgIdType
CANFD_MCANXidType msgIdType
Message object type.
Definition: canfd.h:1522
CANFD_Reason_ECC_ERROR
@ CANFD_Reason_ECC_ERROR
Data has been succesfully transmitted.
Definition: canfd.h:513
CANFD_Object::readTransferSem
void * readTransferSem
Definition: canfd.h:1391
CANFD_MCANGlobalFiltConfig::rrfs
uint32_t rrfs
Definition: canfd.h:694
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:1382
MCAN_MAX_MSG_OBJECTS
#define MCAN_MAX_MSG_OBJECTS
Maximum number of message objects that can be supported by CANFD.
Definition: mcan.h:341
CANFD_MCANBitTimingParams::nomPseg2
uint32_t nomPseg2
Definition: canfd.h:636
CANFD_MCANMsgObjectStats
Definition: canfd.h:1601
CANFD_DmaChConfig
void * CANFD_DmaChConfig
Definition: canfd.h:595
CANFD_Object::busOffInterrupts
uint32_t busOffInterrupts
Number of Bus-Off interrupts received.
Definition: canfd.h:1347
CANFD_Object::writeTransferSem
void * writeTransferSem
Definition: canfd.h:1399
CANFD_MCANFrameType_CLASSIC
@ CANFD_MCANFrameType_CLASSIC
Definition: canfd.h:348
CANFD_MCANMsgObjectStats::handle
CANFD_MsgObjHandle handle
Definition: canfd.h:1603
CANFD_MCANCommState_SYNCHRONIZING
@ CANFD_MCANCommState_SYNCHRONIZING
Definition: canfd.h:419
CANFD_ErrStatusResp
Definition: canfd.h:1013
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:336
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:1533
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:1507
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:1091
CANFD_MCANECCErrForceParams::bit1
uint32_t bit1
Definition: canfd.h:955
CANFD_MCANErrCode_NO_CHANGE
@ CANFD_MCANErrCode_NO_CHANGE
Definition: canfd.h:483
CANFD_MCANProtocolStatus::resi
uint32_t resi
Definition: canfd.h:911
CANFD_Config
Definition: canfd.h:1429
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:1273
CANFD_MCANElemSize_16BYTES
@ CANFD_MCANElemSize_16BYTES
Definition: canfd.h:254
CANFD_Option_MCAN_MODE
@ CANFD_Option_MCAN_MODE
Definition: canfd.h:571
CANFD_DmaHandle
void * CANFD_DmaHandle
Definition: canfd.h:593
CANFD_MsgObjHandle
CANFD_MessageObject * CANFD_MsgObjHandle
Definition: canfd.h:1592
CANFD_Object::hwiHandle
void * hwiHandle
Definition: canfd.h:1406
CANFD_MCANErrCntStatus::canErrLogCnt
uint32_t canErrLogCnt
Definition: canfd.h:862
CANFD_ErrStatusResp::protocolStatus
CANFD_MCANProtocolStatus protocolStatus
Definition: canfd.h:1018
CANFD_MCANErrCode_BIT1_ERROR
@ CANFD_MCANErrCode_BIT1_ERROR
Definition: canfd.h:460
CANFD_MCANXidType_29_BIT
@ CANFD_MCANXidType_29_BIT
Definition: canfd.h:336
CANFD_Attrs::operMode
uint32_t operMode
Definition: canfd.h:1041
CANFD_MessageObject::dmaMsgConfig
CANFD_DmaMsgConfig dmaMsgConfig
Dma message configuration.
Definition: canfd.h:1577
CANFD_Direction_TX
@ CANFD_Direction_TX
Definition: canfd.h:321
CANFD_Reason_RX
@ CANFD_Reason_RX
Data has been received and the application is required to read and process the data.
Definition: canfd.h:498
CANFD_OptionTLV::value
void * value
Option Value.
Definition: canfd.h:1081
CANFD_MCANECCConfigParams::enable
uint32_t enable
Definition: canfd.h:826
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:1501
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:1538
CANFD_MCANECCConfigParams::enableRdModWr
uint32_t enableRdModWr
Definition: canfd.h:838
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:798
CANFD_DriverState_UNINIT
@ CANFD_DriverState_UNINIT
Definition: canfd.h:281
CANFD_MessageObject::messageObjNum
uint32_t messageObjNum
Allocated message object number.
Definition: canfd.h:1527
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:1307
CANFD_Attrs::CANFDMcanloopbackParams
CANFD_MCANLoopbackCfgParams CANFDMcanloopbackParams
Definition: canfd.h:1050
CANFD_MessageObject
Definition: canfd.h:1496
CANFD_OpenParams::txpEnable
uint32_t txpEnable
Definition: canfd.h:1140
CANFD_Attrs::intrPriority
uint8_t intrPriority
Definition: canfd.h:1044
CANFD_Reason_TX_COMPLETION
@ CANFD_Reason_TX_COMPLETION
Data has been succesfully transmitted.
Definition: canfd.h:503
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:1100
CANFD_MCANECCErrType
uint32_t CANFD_MCANECCErrType
This enumeration defines the MCAN ECC Error Types.
Definition: canfd.h:383
CANFD_Attrs::OptionTLVtype
uint32_t OptionTLVtype
Definition: canfd.h:1047
CANFD_MCANECCErrStatus::row
uint32_t row
Definition: canfd.h:993
CANFD_DmaRxBuf
Definition: canfd.h:1476
CANFD_MCANElemSize_20BYTES
@ CANFD_MCANElemSize_20BYTES
Definition: canfd.h:257
CANFD_MCANErrCode_BIT0_ERROR
@ CANFD_MCANErrCode_BIT0_ERROR
Definition: canfd.h:471
CANFD_MCANTimeOutSelect_CONT
@ CANFD_MCANTimeOutSelect_CONT
Definition: canfd.h:363
CANFD_MCANElemSize_8BYTES
@ CANFD_MCANElemSize_8BYTES
Definition: canfd.h:248
CANFD_MCANElemSize_24BYTES
@ CANFD_MCANElemSize_24BYTES
Definition: canfd.h:260
CANFD_MCANBitTimingParams::dataPseg1
uint32_t dataPseg1
Definition: canfd.h:648
CANFD_Object::state
CANFD_DriverState state
CANFD driver internal state.
Definition: canfd.h:1302
CANFD_Attrs::intrNum0
uint32_t intrNum0
Definition: canfd.h:1035
CANFD_MCANGlobalFiltConfig::anfs
uint32_t anfs
Definition: canfd.h:708
CANFD_MCANProtocolStatus
Definition: canfd.h:872
CANFD_Attrs::CANFDMcanBitTimingParams
CANFD_MCANBitTimingParams CANFDMcanBitTimingParams
Definition: canfd.h:1053
CANFD_MCANLoopbackCfgParams::mode
CANFD_MCANLoopBackMode mode
Definition: canfd.h:613
CANFD_MCANErrCntStatus::rpStatus
uint32_t rpStatus
Definition: canfd.h:859
CANFD_MCANMsgRAMCfgParams::txBufNum
uint32_t txBufNum
Definition: canfd.h:744
CANFD_DmaConfig::canfdDmaArgs
void * canfdDmaArgs
Definition: canfd.h:1631
CANFD_MCANOperationMode_SW_INIT
@ CANFD_MCANOperationMode_SW_INIT
Definition: canfd.h:306
HwiP.h
CANFD_MCANFrameType_FD
@ CANFD_MCANFrameType_FD
Definition: canfd.h:351
CANFD_OptionTLV::type
CANFD_Option type
Option Name.
Definition: canfd.h:1071
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:331
CANFD_MessageObject::interruptsRxed
uint32_t interruptsRxed
Number of interrupts received.
Definition: canfd.h:1563
CANFD_Object::readTransferSemObj
SemaphoreP_Object readTransferSemObj
Definition: canfd.h:1395
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:547
CANFD_OpenParams::tdcEnable
uint32_t tdcEnable
Definition: canfd.h:1201
CANFD_MCANLoopBackMode_INTERNAL
@ CANFD_MCANLoopBackMode_INTERNAL
Definition: canfd.h:400
CANFD_MCANECCErrForceParams::errOnce
uint32_t errOnce
Definition: canfd.h:963
CANFD_MCANProtocolStatus::rfdf
uint32_t rfdf
Definition: canfd.h:924
CANFD_OpenParams::efbi
uint32_t efbi
Definition: canfd.h:1147
CANFD_OpenParams::clkStopFAck
uint32_t clkStopFAck
Definition: canfd.h:1190
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:1121
CANFD_MCANLoopBackMode_EXTERNAL
@ CANFD_MCANLoopBackMode_EXTERNAL
Definition: canfd.h:406
CANFD_getFilterEventConfig
uint32_t CANFD_getFilterEventConfig(uint32_t eventNum)
CANFD_MCANErrCode_FORM_ERROR
@ CANFD_MCANErrCode_FORM_ERROR
Definition: canfd.h:450
CANFD_OpenParams::pxhddisable
uint32_t pxhddisable
Definition: canfd.h:1153
CANFD_MCANXidType
CANFD_MCANXidType
Definition: canfd.h:331
CANFD_MCANErrCode_CRC_ERROR
@ CANFD_MCANErrCode_CRC_ERROR
Definition: canfd.h:477
CANFD_MCANElemSize_12BYTES
@ CANFD_MCANElemSize_12BYTES
Definition: canfd.h:251
CANFD_MCANECCErrStatus::dedErr
uint32_t dedErr
Definition: canfd.h:988
CANFD_MCANMsgRAMCfgParams::rxFIFO1OpMode
uint32_t rxFIFO1OpMode
Definition: canfd.h:811
CANFD_MCANTdcConfig::tdcf
uint32_t tdcf
Definition: canfd.h:668
CANFD_MCANXidType_11_BIT
@ CANFD_MCANXidType_11_BIT
Definition: canfd.h:333
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:1553
MCAN_MemType
uint32_t MCAN_MemType
Enum to represent the MCAN Message RAM type.
Definition: mcan.h:399
CANFD_MCANMsgRAMCfgParams::lss
uint32_t lss
Definition: canfd.h:730
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:453
CANFD_MCANMsgObjectStats::startMsgIdentifier
uint32_t startMsgIdentifier
Definition: canfd.h:1610
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:422
CANFD_OpenParams::fdMode
uint32_t fdMode
Definition: canfd.h:1127
CANFD_OpenParams::transferMode
uint32_t transferMode
Definition: canfd.h:1115
CANFD_DriverState_STARTED
@ CANFD_DriverState_STARTED
Definition: canfd.h:284
CANFD_MCANMsgRAMCfgParams::lse
uint32_t lse
Definition: canfd.h:737
CANFD_MCANECCErrStatus
Definition: canfd.h:977
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:1412
CANFD_OpenParams::tdcConfig
CANFD_MCANTdcConfig tdcConfig
Definition: canfd.h:1206
CANFD_deleteMsgObject
int32_t CANFD_deleteMsgObject(CANFD_MsgObjHandle handle)
Function deletes a message object.
CANFD_MCANBitTimingParams::dataPropSeg
uint32_t dataPropSeg
Definition: canfd.h:645
CANFD_DmaMsgConfig::numMsgs
uint32_t numMsgs
Number of messages.
Definition: canfd.h:1452
CANFD_OpenParams::filterConfig
CANFD_MCANGlobalFiltConfig filterConfig
Definition: canfd.h:1255
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:1367
CANFD_MCANMsgRAMCfgParams::txFIFOSize
uint32_t txFIFOSize
Definition: canfd.h:751
CANFD_DmaRxBuf::header1
uint32_t header1
Definition: canfd.h:1478
CANFD_OpenParams::msgRAMConfig
CANFD_MCANMsgRAMCfgParams msgRAMConfig
Definition: canfd.h:1260
CANFD_MCANErrCntStatus::recErrCnt
uint32_t recErrCnt
Definition: canfd.h:853
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:1172
CANFD_Direction
CANFD_Direction
Definition: canfd.h:316
CANFD_MCANBitTimingParams::nomPropSeg
uint32_t nomPropSeg
Definition: canfd.h:630
CANFD_MCANMsgRAMCfgParams::rxFIFO0OpMode
uint32_t rxFIFO0OpMode
Definition: canfd.h:791
CANFD_DmaMsgConfig
Definition: canfd.h:1444
CANFD_Option_MCAN_PROTOCOL_STATUS
@ CANFD_Option_MCAN_PROTOCOL_STATUS
Definition: canfd.h:554
CANFD_MCANGlobalFiltConfig::anfe
uint32_t anfe
Definition: canfd.h:701
CANFD_MCANECCErrForceParams::errForce
uint32_t errForce
Definition: canfd.h:966
CANFD_OpenParams::monEnable
uint32_t monEnable
Definition: canfd.h:1212
CANFD_MCANMsgRAMCfgParams
Definition: canfd.h:724
CANFD_Object
Definition: canfd.h:1288
CANFD_MCANECCErrStatus::bit2
uint32_t bit2
Definition: canfd.h:1002
CANFD_MCANErrCode_NO_ERROR
@ CANFD_MCANErrCode_NO_ERROR
Definition: canfd.h:442
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:528
CANFD_MCANOperationMode
CANFD_MCANOperationMode
Definition: canfd.h:301
CANFD_MCANProtocolStatus::lastErrCode
uint32_t lastErrCode
Definition: canfd.h:876
CANFD_MCANBitTimingParams::nomPseg1
uint32_t nomPseg1
Definition: canfd.h:633
CANFD_MCANTimeOutSelect
CANFD_MCANTimeOutSelect
Definition: canfd.h:361
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
CANFD_Attrs
Definition: canfd.h:1030
CANFD_Direction_RX
@ CANFD_Direction_RX
Definition: canfd.h:318
CANFD_OpenParams::timeoutSelect
CANFD_MCANTimeOutSelect timeoutSelect
Definition: canfd.h:1237
CANFD_OpenParams::eccConfig
CANFD_MCANECCConfigParams eccConfig
Definition: canfd.h:1265
CANFD_MCANCommState_RECEIVER
@ CANFD_MCANCommState_RECEIVER
Definition: canfd.h:425
CANFD_Object::rxBuffElem
MCAN_RxBufElement rxBuffElem
Buffer used to read message RAM.
Definition: canfd.h:1372
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:1297
CANFD_DmaRxBuf::header2
uint32_t header2
Definition: canfd.h:1480
CANFD_MCANMsgRAMCfgParams::txEventFIFOSize
uint32_t txEventFIFOSize
Definition: canfd.h:764
CANFD_MCANMsgRAMCfgParams::rxFIFO0waterMark
uint32_t rxFIFO0waterMark
Definition: canfd.h:785
CANFD_OpenParams::wdcPreload
uint32_t wdcPreload
Definition: canfd.h:1195
CANFD_MCANOperationMode_NORMAL
@ CANFD_MCANOperationMode_NORMAL
Definition: canfd.h:303
CANFD_MCANECCErrForceParams::bit2
uint32_t bit2
Definition: canfd.h:958
CANFD_OptionTLV::length
int32_t length
Option Length.
Definition: canfd.h:1076
CANFD_Attrs::intrNum1
uint32_t intrNum1
Definition: canfd.h:1038
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:1166
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:664
CANFD_MessageObject::rxElement
uint32_t rxElement
Rx buffer number used to receive data.
Definition: canfd.h:1543
CANFD_MessageObject::direction
CANFD_Direction direction
Message object direction.
Definition: canfd.h:1517
CANFD_Object::errStatusInterrupts
uint32_t errStatusInterrupts
Number of error and status interrupts received.
Definition: canfd.h:1332
CANFD_Reason_TX_CANCELED
@ CANFD_Reason_TX_CANCELED
Data transmission is succesfully canceled.
Definition: canfd.h:508
CANFD_MCANECCErrStatus::bit1
uint32_t bit1
Definition: canfd.h:997
CANFD_MCANBitTimingParams::nomBrp
uint32_t nomBrp
Definition: canfd.h:627
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:950
CANFD_MCANMsgObjectStats::interruptsRxed
uint32_t interruptsRxed
Definition: canfd.h:1617
CANFD_Object::writeTransferSemObj
SemaphoreP_Object writeTransferSemObj
Definition: canfd.h:1403
CANFD_Reason
CANFD_Reason
Definition: canfd.h:494
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:805
CANFD_Config::attrs
CANFD_Attrs * attrs
Definition: canfd.h:1430
CANFD_MCANProtocolStatus::pxe
uint32_t pxe
Definition: canfd.h:930
CANFD_Object::eccInterrupts
uint32_t eccInterrupts
Number of ECC interrupts received.
Definition: canfd.h:1342
CANFD_MCANECCConfigParams
Definition: canfd.h:821
CANFD_MCANECCErrStatus::secErr
uint32_t secErr
Definition: canfd.h:982
CANFD_Option
CANFD_Option
Definition: canfd.h:541
CANFD_MCANBitTimingParams::dataBrp
uint32_t dataBrp
Definition: canfd.h:642
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_DriverState_STOPPED
@ CANFD_DriverState_STOPPED
Definition: canfd.h:287
CANFD_MCANMsgObjectStats::direction
uint32_t direction
Definition: canfd.h:1606
CANFD_OpenParams::emulationFAck
uint32_t emulationFAck
Definition: canfd.h:1184
CANFD_MCANElemSize_48BYTES
@ CANFD_MCANElemSize_48BYTES
Definition: canfd.h:266
CANFD_OpenParams::tsSelect
uint32_t tsSelect
Definition: canfd.h:1232
CANFD_MessageObject::args
void * args
Pointer to be used by application to store rx buffer.
Definition: canfd.h:1582
CANFD_OpenParams::errInterruptEnable
uint32_t errInterruptEnable
Definition: canfd.h:1269
CANFD_MCANMsgObjectStats::messageProcessed
uint32_t messageProcessed
Definition: canfd.h:1620
CANFD_MCANMsgRAMCfgParams::rxFIFO0size
uint32_t rxFIFO0size
Definition: canfd.h:778
CANFD_MCANGlobalFiltConfig
Definition: canfd.h:683
CANFD_MessageObject::txMemType
MCAN_MemType txMemType
Part of message ram to accessed by this message object. Refer enum MCAN_MemType.
Definition: canfd.h:1548
CANFD_Attrs::baseAddr
uint32_t baseAddr
Definition: canfd.h:1032
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_DriverState
CANFD_DriverState
Definition: canfd.h:279
CANFD_MessageObject::canfdHandle
CANFD_Config * canfdHandle
Pointer to the CANFD driver object.
Definition: canfd.h:1512
CANFD_MCANLoopbackCfgParams::enable
uint32_t enable
Definition: canfd.h:610
CANFD_DmaMsgConfig::dataLengthPerMsg
uint32_t dataLengthPerMsg
data length in Bytes for every message.
Definition: canfd.h:1448
CANFD_MessageObject::messageProcessed
uint32_t messageProcessed
Number of messages processed.
Definition: canfd.h:1568
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 ...