MSPM0G1X0X_G3X0X Driver Library  2.05.01.00
dl_mcan.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the 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 "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file dl_mcan.h
34  * @brief Modular Controller Area Network (MCAN) Driver Library
35  * @defgroup MCAN Modular Controller Area Network (MCAN)
36  *
37  * @anchor ti_dl_dl_mcan_Overview
38  * # Overview
39  *
40  * The MCAN Driver Library allows full configuration of the MSPM0 MCAN (CAN-FD)
41  * module.
42  * The Modular Controller Area Network (MCAN) peripheral supports both
43  * communication through classic CAN and CAN-FD protocols.
44  *
45  * <hr>
46  ******************************************************************************
47  */
51 #ifndef ti_dl_dl_mcan__include
52 #define ti_dl_dl_mcan__include
53 
54 #include <stdbool.h>
55 #include <stdint.h>
56 
57 #include <ti/devices/msp/msp.h>
58 #include <ti/driverlib/dl_common.h>
59 
60 #ifdef __MSPM0_HAS_MCAN__
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 /* clang-format off */
67 
71 #define DL_MCAN_INTR_MASK_ALL (MCAN_IR_RF0N_MASK | \
72  MCAN_IR_RF0W_MASK | \
73  MCAN_IR_RF0F_MASK | \
74  MCAN_IR_RF0L_MASK | \
75  MCAN_IR_RF1N_MASK | \
76  MCAN_IR_RF1W_MASK | \
77  MCAN_IR_RF1F_MASK | \
78  MCAN_IR_RF1L_MASK | \
79  MCAN_IR_HPM_MASK | \
80  MCAN_IR_TC_MASK | \
81  MCAN_IR_TCF_MASK | \
82  MCAN_IR_TFE_MASK | \
83  MCAN_IR_TEFN_MASK | \
84  MCAN_IR_TEFW_MASK | \
85  MCAN_IR_TEFF_MASK | \
86  MCAN_IR_TEFL_MASK | \
87  MCAN_IR_TSW_MASK | \
88  MCAN_IR_MRAF_MASK | \
89  MCAN_IR_TOO_MASK | \
90  MCAN_IR_DRX_MASK | \
91  MCAN_IR_BEU_MASK | \
92  MCAN_IR_ELO_MASK | \
93  MCAN_IR_EP_MASK | \
94  MCAN_IR_EW_MASK | \
95  MCAN_IR_BO_MASK | \
96  MCAN_IR_WDI_MASK | \
97  MCAN_IR_PEA_MASK | \
98  MCAN_IR_PED_MASK | \
99  MCAN_IR_ARA_MASK)
100 
104 #define DL_MCAN_MAX_PAYLOAD_BYTES (64U)
105 
106 
113 #define DL_MCAN_INTERRUPT_ARA (MCAN_IR_ARA_MASK)
114 
118 #define DL_MCAN_INTERRUPT_PED (MCAN_IR_PED_MASK)
119 
123 #define DL_MCAN_INTERRUPT_PEA (MCAN_IR_PEA_MASK)
124 
128 #define DL_MCAN_INTERRUPT_WDI (MCAN_IR_WDI_MASK)
129 
133 #define DL_MCAN_INTERRUPT_BO (MCAN_IR_BO_MASK)
134 
138 #define DL_MCAN_INTERRUPT_EW (MCAN_IR_EW_MASK)
139 
143 #define DL_MCAN_INTERRUPT_EP (MCAN_IR_EP_MASK)
144 
148 #define DL_MCAN_INTERRUPT_ELO (MCAN_IR_ELO_MASK)
149 
153 #define DL_MCAN_INTERRUPT_BEU (MCAN_IR_BEU_MASK)
154 
158 #define DL_MCAN_INTERRUPT_DRX (MCAN_IR_DRX_MASK)
159 
163 #define DL_MCAN_INTERRUPT_TOO (MCAN_IR_TOO_MASK)
164 
168 #define DL_MCAN_INTERRUPT_MRAF (MCAN_IR_MRAF_MASK)
169 
173 #define DL_MCAN_INTERRUPT_TSW (MCAN_IR_TSW_MASK)
174 
178 #define DL_MCAN_INTERRUPT_TEFL (MCAN_IR_TEFL_MASK)
179 
183 #define DL_MCAN_INTERRUPT_TEFF (MCAN_IR_TEFF_MASK)
184 
188 #define DL_MCAN_INTERRUPT_TEFW (MCAN_IR_TEFW_MASK)
189 
193 #define DL_MCAN_INTERRUPT_TEFN (MCAN_IR_TEFN_MASK)
194 
198 #define DL_MCAN_INTERRUPT_TFE (MCAN_IR_TFE_MASK)
199 
203 #define DL_MCAN_INTERRUPT_TCF (MCAN_IR_TCF_MASK)
204 
208 #define DL_MCAN_INTERRUPT_TC (MCAN_IR_TC_MASK)
209 
213 #define DL_MCAN_INTERRUPT_HPM (MCAN_IR_HPM_MASK)
214 
218 #define DL_MCAN_INTERRUPT_RF1L (MCAN_IR_RF1L_MASK)
219 
223 #define DL_MCAN_INTERRUPT_RF1F (MCAN_IR_RF1F_MASK)
224 
228 #define DL_MCAN_INTERRUPT_RF1W (MCAN_IR_RF1W_MASK)
229 
233 #define DL_MCAN_INTERRUPT_RF1N (MCAN_IR_RF1N_MASK)
234 
238 #define DL_MCAN_INTERRUPT_RF0L (MCAN_IR_RF0L_MASK)
239 
243 #define DL_MCAN_INTERRUPT_RF0F (MCAN_IR_RF0F_MASK)
244 
248 #define DL_MCAN_INTERRUPT_RF0W (MCAN_IR_RF0W_MASK)
249 
253 #define DL_MCAN_INTERRUPT_RF0N (MCAN_IR_RF0N_MASK)
254 
263 #define DL_MCAN_MSP_INTERRUPT_WAKEUP (MCAN_IMASK_WAKEUP_SET)
264 
268 #define DL_MCAN_MSP_INTERRUPT_TIMESTAMP_OVERFLOW (MCAN_IMASK_EXT_TS_CNTR_OVFL_SET)
269 
273 #define DL_MCAN_MSP_INTERRUPT_DOUBLE_ERROR_DETECTION (MCAN_IMASK_DED_SET)
274 
278 #define DL_MCAN_MSP_INTERRUPT_SINGLE_ERROR_CORRECTION (MCAN_IMASK_SEC_SET)
279 
283 #define DL_MCAN_MSP_INTERRUPT_LINE1 (MCAN_IMASK_INTL1_SET)
284 
288 #define DL_MCAN_MSP_INTERRUPT_LINE0 (MCAN_IMASK_INTL0_SET)
289 
298 #define DL_MCAN_INTR_SRC_RX_FIFO0_NEW_MSG (MCAN_IR_RF0N_MASK)
299 
303 #define DL_MCAN_INTR_SRC_RX_FIFO0_WATERMARK (MCAN_IR_RF0W_MASK)
304 
308 #define DL_MCAN_INTR_SRC_RX_FIFO0_FULL (MCAN_IR_RF0F_MASK)
309 
313 #define DL_MCAN_INTR_SRC_RX_FIFO0_MSG_LOST (MCAN_IR_RF0L_MASK)
314 
318 #define DL_MCAN_INTR_SRC_RX_FIFO1_NEW_MSG (MCAN_IR_RF1N_MASK)
319 
323 #define DL_MCAN_INTR_SRC_RX_FIFO1_WATERMARK (MCAN_IR_RF1W_MASK)
324 
328 #define DL_MCAN_INTR_SRC_RX_FIFO1_FULL (MCAN_IR_RF1F_MASK)
329 
333 #define DL_MCAN_INTR_SRC_RX_FIFO1_MSG_LOST (MCAN_IR_RF1L_MASK)
334 
338 #define DL_MCAN_INTR_SRC_HIGH_PRIO_MSG (MCAN_IR_HPM_MASK)
339 
343 #define DL_MCAN_INTR_SRC_TRANS_COMPLETE (MCAN_IR_TC_MASK)
344 
348 #define DL_MCAN_INTR_SRC_TRANS_CANCEL_FINISH (MCAN_IR_TCF_MASK)
349 
353 #define DL_MCAN_INTR_SRC_TX_FIFO_EMPTY (MCAN_IR_TFE_MASK)
354 
358 #define DL_MCAN_INTR_SRC_TX_EVT_FIFO_NEW_ENTRY (MCAN_IR_TEFN_MASK)
359 
363 #define DL_MCAN_INTR_SRC_TX_EVT_FIFO_WATERMARK (MCAN_IR_TEFW_MASK)
364 
368 #define DL_MCAN_INTR_SRC_TX_EVT_FIFO_FULL (MCAN_IR_TEFF_MASK)
369 
373 #define DL_MCAN_INTR_SRC_TX_EVT_FIFO_ELEM_LOST (MCAN_IR_TEFL_MASK)
374 
378 #define DL_MCAN_INTR_SRC_TIMESTAMP_WRAPAROUND (MCAN_IR_TSW_MASK)
379 
383 #define DL_MCAN_INTR_SRC_MSG_RAM_ACCESS_FAILURE (MCAN_IR_MRAF_MASK)
384 
388 #define DL_MCAN_INTR_SRC_TIMEOUT (MCAN_IR_TOO_MASK)
389 
393 #define DL_MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG (MCAN_IR_DRX_MASK)
394 
398 #define DL_MCAN_INTR_SRC_BIT_ERR_UNCORRECTED (MCAN_IR_BEU_MASK)
399 
403 #define DL_MCAN_INTR_SRC_ERR_LOG_OVRFLW (MCAN_IR_ELO_MASK)
404 
408 #define DL_MCAN_INTR_SRC_ERR_PASSIVE (MCAN_IR_EP_MASK)
409 
413 #define DL_MCAN_INTR_SRC_WARNING_STATUS (MCAN_IR_EW_MASK)
414 
418 #define DL_MCAN_INTR_SRC_BUS_OFF_STATUS (MCAN_IR_BO_MASK)
419 
423 #define DL_MCAN_INTR_SRC_WATCHDOG (MCAN_IR_WDI_MASK)
424 
428 #define DL_MCAN_INTR_SRC_PROTOCOL_ERR_ARB (MCAN_IR_PEA_MASK)
429 
433 #define DL_MCAN_INTR_SRC_PROTOCOL_ERR_DATA (MCAN_IR_PED_MASK)
434 
438 #define DL_MCAN_INTR_SRC_RES_ADDR_ACCESS (MCAN_IR_ARA_MASK)
439 
442 /* User defined ranges */
446 #define DL_MCAN_DBTP_DSJW_MAX (0xFU)
447 
450 #define DL_MCAN_DBTP_DTSEG2_MAX (0xFU)
451 
454 #define DL_MCAN_DBTP_DTSEG1_MAX (0x1FU)
455 
458 #define DL_MCAN_DBTP_DBRP_MAX (0x1FU)
459 
462 #define DL_MCAN_NBTP_NSJW_MAX (0x7FU)
463 
466 #define DL_MCAN_NBTP_NTSEG2_MAX (0x7FU)
467 
470 #define DL_MCAN_NBTP_NTSEG1_MAX (0xFFU)
471 
474 #define DL_MCAN_NBTP_NBRP_MAX (0x1FFU)
475 
478 #define DL_MCAN_RWD_WDC_MAX (0xFFU)
479 
482 #define DL_MCAN_TDCR_TDCF_MAX (0x7FU)
483 
486 #define DL_MCAN_TDCR_TDCO_MAX (0x7FU)
487 
490 #define DL_MCAN_XIDAM_EIDM_MAX (0x1FFFFFFFU)
491 
494 #define DL_MCAN_TSCC_TCP_MAX (0xFU)
495 
498 #define DL_MCAN_TOCC_TOP_MAX (0xFFFFU)
499 
500 /* clang-format on */
501 
505 typedef enum {
507  DL_MCAN_INSTANCE_0 = SYSCTL_SYSSTATUS_MCAN0READY_MASK,
509 
513 typedef enum {
515  DL_MCAN_FCLK_SYSPLLCLK1 = SYSCTL_GENCLKCFG_CANCLKSRC_SYSPLLOUT1,
517  DL_MCAN_FCLK_HFCLK = SYSCTL_GENCLKCFG_CANCLKSRC_HFCLK,
518 } DL_MCAN_FCLK;
519 
523 typedef enum {
525  DL_MCAN_FCLK_DIV_1 = MCAN_CLKDIV_RATIO_DIV_BY_1_,
527  DL_MCAN_FCLK_DIV_2 = MCAN_CLKDIV_RATIO_DIV_BY_2_,
529  DL_MCAN_FCLK_DIV_4 = MCAN_CLKDIV_RATIO_DIV_BY_4_,
531 
535 typedef enum {
540 
542 
546 typedef enum {
547 
552 
554 
558 typedef enum {
563 
565 
569 typedef enum {
574 
576 
580 typedef enum {
586 
590 typedef enum {
596 
600 typedef enum {
618 
622 typedef enum {
631 
633 
637 typedef enum {
645 
649 typedef enum {
654 
656 
660 typedef enum {
675 
677 
681 typedef enum {
691 
695 typedef enum {
736 
738 
742 typedef struct {
745  DL_MCAN_FCLK clockSel;
747  DL_MCAN_FCLK_DIV divider;
749 
755 typedef struct {
763  uint32_t nomTimeSeg1;
767  uint32_t nomTimeSeg2;
779  uint32_t dataTimeSeg1;
783  uint32_t dataTimeSeg2;
789 
793 typedef struct {
797  uint32_t tdcf;
801  uint32_t tdco;
803 
807 typedef struct {
812  uint32_t rrfe;
817  uint32_t rrfs;
823  uint32_t anfe;
829  uint32_t anfs;
831 
835 typedef struct {
840  uint32_t fdMode;
846  uint32_t brsEnable;
852  uint32_t txpEnable;
858  uint32_t efbi;
865  uint32_t pxhddisable;
871  uint32_t darEnable;
876  uint32_t wkupReqEnable;
881  uint32_t autoWkupEnable;
886  uint32_t emulationEnable;
890  uint32_t wdcPreload;
899  uint32_t tdcEnable;
901 
905 typedef struct {
910  uint32_t monEnable;
916  uint32_t asmEnable;
920  uint32_t tsPrescalar;
927  uint32_t tsSelect;
931  uint32_t timeoutSelect;
937  uint32_t timeoutPreload;
948 
952 typedef struct {
954  uint32_t transErrLogCnt;
956  uint32_t recErrCnt;
961  uint32_t rpStatus;
963  uint32_t canErrLogCnt;
965 
969 typedef struct {
973  uint32_t lastErrCode;
977  uint32_t act;
982  uint32_t errPassive;
988  uint32_t warningStatus;
993  uint32_t busOffStatus;
997  uint32_t dlec;
1002  uint32_t resi;
1007  uint32_t rbrs;
1013  uint32_t rfdf;
1018  uint32_t pxe;
1020  uint32_t tdcv;
1022 
1032 typedef struct {
1034  uint32_t flssa;
1040  uint32_t lss;
1042  uint32_t flesa;
1048  uint32_t lse;
1050  uint32_t txStartAddr;
1056  uint32_t txBufNum;
1062  uint32_t txFIFOSize;
1067  uint32_t txBufMode;
1069  uint32_t txBufElemSize;
1091  uint32_t rxFIFO0size;
1102  uint32_t rxFIFO0OpMode;
1110  uint32_t rxFIFO1size;
1121  uint32_t rxFIFO1OpMode;
1123  uint32_t rxBufStartAddr;
1125  uint32_t rxBufElemSize;
1131 
1135 typedef struct {
1139  uint32_t bufIdx;
1147  uint32_t msi;
1149  uint32_t filterIdx;
1154  uint32_t filterList;
1156 
1160 typedef struct {
1162  uint32_t statusLow;
1164  uint32_t statusHigh;
1166 
1170 typedef struct {
1174  uint32_t num;
1176  uint32_t fillLvl;
1178  uint32_t getIdx;
1180  uint32_t putIdx;
1185  uint32_t fifoFull;
1187  uint32_t msgLost;
1189 
1193 typedef struct {
1195  uint32_t freeLvl;
1199  uint32_t getIdx;
1201  uint32_t putIdx;
1206  uint32_t fifoFull;
1208 
1212 typedef struct {
1214  uint32_t fillLvl;
1216  uint32_t getIdx;
1218  uint32_t putIdx;
1223  uint32_t fifoFull;
1229  uint32_t eleLost;
1231 
1235 typedef struct {
1239  uint32_t errType;
1241  uint32_t rowNum;
1245  uint32_t bit1;
1247  uint32_t bit2;
1251  uint32_t errOnce;
1253  uint32_t errForce;
1255 
1259 typedef struct {
1264  uint32_t secErr;
1269  uint32_t dedErr;
1273  uint32_t row;
1275  uint32_t bit1;
1276 
1278 
1283 typedef struct {
1285  uint32_t scheme;
1287  uint32_t modId;
1289  uint32_t major;
1291  uint32_t minor;
1293  uint32_t day;
1295  uint32_t mon;
1297  uint32_t year;
1299  uint32_t subStep;
1301  uint32_t step;
1303  uint32_t rel;
1305 
1309 typedef struct {
1311  uint32_t scheme;
1313  uint32_t modId;
1315  uint32_t major;
1317  uint32_t minor;
1319 
1323 typedef struct {
1328  uint32_t enable;
1333  uint32_t enableChk;
1338  uint32_t enableRdModWr;
1340 
1344 typedef struct {
1346  uint32_t scheme;
1348  uint32_t modId;
1350  uint32_t major;
1352  uint32_t minor;
1354 
1358 typedef struct {
1360  uint32_t id;
1365  uint32_t rtr;
1370  uint32_t xtd;
1375  uint32_t esi;
1381  uint32_t dlc;
1386  uint32_t brs;
1391  uint32_t fdf;
1396  uint32_t efc;
1398  uint32_t mm;
1404 
1408 typedef struct {
1410  uint32_t id;
1415  uint32_t rtr;
1420  uint32_t xtd;
1425  uint32_t esi;
1427  uint32_t rxts;
1433  uint32_t dlc;
1438  uint32_t brs;
1443  uint32_t fdf;
1445  uint32_t fidx;
1450  uint32_t anmf;
1456 
1460 typedef struct {
1462  uint32_t id;
1467  uint32_t rtr;
1472  uint32_t xtd;
1477  uint32_t esi;
1479  uint32_t txts;
1485  uint32_t dlc;
1490  uint32_t brs;
1495  uint32_t fdf;
1503  uint32_t et;
1505  uint32_t mm;
1507 
1511 typedef struct {
1513  uint32_t sfid2;
1515  uint32_t sfid1;
1529  uint32_t sfec;
1536  uint32_t sft;
1538 
1542 typedef struct {
1544  uint32_t efid1;
1558  uint32_t efec;
1560  uint32_t efid2;
1568  uint32_t eft;
1570 
1576 typedef struct {
1578  uint32_t clkDivConf;
1579 
1581  uint32_t clkConf;
1582 
1584  uint32_t clkEnConf;
1585 
1587  uint32_t ctrlConf;
1588 
1590  uint32_t nomBitTimeConf;
1591 
1594 
1596  uint32_t timeCntConf;
1597 
1599  uint32_t timeCntVal;
1600 
1602  uint32_t timeOutConf;
1603 
1605  uint32_t timeOutCntVal;
1606 
1608  uint32_t txDelCompConf;
1609 
1611  uint32_t intEnConf;
1612 
1614  uint32_t intLnSelConf;
1615 
1618 
1620  uint32_t globFiltIDConf;
1621 
1623  uint32_t stdFiltIDConf;
1624 
1626  uint32_t exFiltIDConf;
1627 
1629  uint32_t exFiltIDMsk;
1630 
1632  uint32_t rxFIFO0Conf;
1633 
1635  uint32_t rxBuffConf;
1636 
1638  uint32_t rxFIFO1Conf;
1639 
1641  uint32_t rxDataSize;
1642 
1644  uint32_t txBuffConf;
1645 
1647  uint32_t txDataSize;
1648 
1651 
1654 
1656  uint32_t txEvntFIFOConf;
1657 
1659  uint32_t ssCtrlConf;
1660 
1662  uint32_t ssIntEnConf;
1663 
1665  uint32_t preSclConf;
1666 
1668  uint32_t edcVecConf;
1669 
1671  uint32_t edcConf2;
1672 
1674  uint32_t edcConf1;
1675 
1677  uint32_t edcConf0;
1678 
1680  uint32_t intEvnt0Conf;
1681 
1683  uint32_t ramWDConf;
1684 
1686  uint32_t testConf;
1687 
1692 
1694 typedef enum {
1696  DL_MCAN_CLOCK_DIVIDE_1 = MCAN_CLKDIV_RATIO_DIV_BY_1_,
1698  DL_MCAN_CLOCK_DIVIDE_2 = MCAN_CLKDIV_RATIO_DIV_BY_2_,
1700  DL_MCAN_CLOCK_DIVIDE_4 = MCAN_CLKDIV_RATIO_DIV_BY_4_
1702 
1704 typedef enum {
1706  DL_MCAN_IIDX_WAKEUP = MCAN_IIDX_STAT_WAKEUP,
1709  DL_MCAN_IIDX_TIMESTAMP_OVERFLOW = MCAN_IIDX_STAT_EXT_TS_CNTR_OVFL,
1717  DL_MCAN_IIDX_LINE1 = MCAN_IIDX_STAT_INTL1,
1719  DL_MCAN_IIDX_LINE0 = MCAN_IIDX_STAT_INTL0
1720 } DL_MCAN_IIDX;
1721 
1731 bool DL_MCAN_isReady(DL_MCAN_INSTANCE instance);
1732 
1741  MCAN_Regs *mcan, const DL_MCAN_ClockConfig *config);
1742 
1750 void DL_MCAN_getClockConfig(MCAN_Regs *mcan, DL_MCAN_ClockConfig *config);
1759 bool DL_MCAN_isInReset(const MCAN_Regs *mcan);
1760 
1770 bool DL_MCAN_isFDOpEnable(const MCAN_Regs *mcan);
1771 
1781 bool DL_MCAN_isMemInitDone(const MCAN_Regs *mcan);
1782 
1791 void DL_MCAN_setOpMode(MCAN_Regs *mcan, uint32_t mode);
1792 
1800 uint32_t DL_MCAN_getOpMode(const MCAN_Regs *mcan);
1801 
1811 int32_t DL_MCAN_init(MCAN_Regs *mcan, const DL_MCAN_InitParams *initParams);
1812 
1822 int32_t DL_MCAN_config(
1823  MCAN_Regs *mcan, const DL_MCAN_ConfigParams *configParams);
1824 
1834 void DL_MCAN_eccConfig(
1835  MCAN_Regs *mcan, const DL_MCAN_ECCConfigParams *configParams);
1836 
1846 int32_t DL_MCAN_setBitTime(
1847  MCAN_Regs *mcan, const DL_MCAN_BitTimingParams *configParams);
1848 
1859 int32_t DL_MCAN_msgRAMConfig(
1860  MCAN_Regs *mcan, const DL_MCAN_MsgRAMConfigParams *msgRAMConfigParams);
1861 
1871 int32_t DL_MCAN_setExtIDAndMask(MCAN_Regs *mcan, uint32_t idMask);
1872 
1886 void DL_MCAN_writeMsgRam(MCAN_Regs *mcan, uint32_t memType, uint32_t bufNum,
1887  const DL_MCAN_TxBufElement *elem);
1888 
1897 int32_t DL_MCAN_TXBufAddReq(MCAN_Regs *mcan, uint32_t bufNum);
1898 
1909  const MCAN_Regs *mcan, DL_MCAN_RxNewDataStatus *newDataStatus);
1910 
1921  MCAN_Regs *mcan, const DL_MCAN_RxNewDataStatus *newDataStatus);
1922 
1939 void DL_MCAN_readMsgRam(const MCAN_Regs *mcan, uint32_t memType,
1940  uint32_t bufNum, uint32_t fifoNum, DL_MCAN_RxBufElement *elem);
1941 
1952  const MCAN_Regs *mcan, DL_MCAN_TxEventFIFOElement *txEventElem);
1953 
1968 void DL_MCAN_addStdMsgIDFilter(MCAN_Regs *mcan, uint32_t filtNum,
1969  const DL_MCAN_StdMsgIDFilterElement *elem);
1970 
1985 void DL_MCAN_addExtMsgIDFilter(MCAN_Regs *mcan, uint32_t filtNum,
1986  const DL_MCAN_ExtMsgIDFilterElement *elem);
1987 
2002 void DL_MCAN_lpbkModeEnable(MCAN_Regs *mcan, uint32_t lpbkMode, bool enable);
2003 
2013  const MCAN_Regs *mcan, DL_MCAN_ErrCntStatus *errCounter);
2014 
2024  const MCAN_Regs *mcan, DL_MCAN_ProtocolStatus *protStatus);
2025 
2036 void DL_MCAN_enableIntr(MCAN_Regs *mcan, uint32_t intrMask, bool enable);
2037 
2050  MCAN_Regs *mcan, uint32_t intrMask, uint32_t lineNum);
2051 
2059 uint32_t DL_MCAN_getIntrLineSelectStatus(const MCAN_Regs *mcan);
2060 
2072 void DL_MCAN_enableIntrLine(MCAN_Regs *mcan, uint32_t lineNum, bool enable);
2073 
2081 uint32_t DL_MCAN_getIntrStatus(const MCAN_Regs *mcan);
2082 
2093  MCAN_Regs *mcan, uint32_t intrMask, DL_MCAN_INTR_SRC_MCAN eoi);
2094 
2105  const MCAN_Regs *mcan, DL_MCAN_HighPriorityMsgInfo *hpm);
2106 
2116  const MCAN_Regs *mcan, DL_MCAN_RxFIFOStatus *fifoStatus);
2117 
2127 int32_t DL_MCAN_writeRxFIFOAck(
2128  MCAN_Regs *mcan, uint32_t fifoNum, uint32_t idx);
2129 
2139  const MCAN_Regs *mcan, DL_MCAN_TxFIFOStatus *fifoStatus);
2140 
2148 uint32_t DL_MCAN_getTxBufReqPend(const MCAN_Regs *mcan);
2149 
2158 int32_t DL_MCAN_txBufCancellationReq(MCAN_Regs *mcan, uint32_t buffNum);
2159 
2167 uint32_t DL_MCAN_getTxBufTransmissionStatus(const MCAN_Regs *mcan);
2168 
2176 uint32_t DL_MCAN_txBufCancellationStatus(const MCAN_Regs *mcan);
2177 
2189  MCAN_Regs *mcan, uint32_t bufNum, bool enable);
2190 
2203  const MCAN_Regs *mcan, uint32_t bufNum, bool enable);
2204 
2216 void DL_MCAN_addClockStopRequest(MCAN_Regs *mcan, bool enable);
2217 
2228  const MCAN_Regs *mcan, DL_MCAN_TxEventFIFOStatus *fifoStatus);
2229 
2238 int32_t DL_MCAN_writeTxEventFIFOAck(MCAN_Regs *mcan, uint32_t idx);
2239 
2250  MCAN_Regs *mcan, const DL_MCAN_ECCErrForceParams *eccErr);
2251 
2260 void DL_MCAN_eccGetErrorStatus(MCAN_Regs *mcan, DL_MCAN_ECCErrStatus *eccErr);
2261 
2271 void DL_MCAN_eccClearErrorStatus(MCAN_Regs *mcan, uint32_t errType);
2272 
2281 void DL_MCAN_eccWriteEOI(MCAN_Regs *mcan, uint32_t errType);
2282 
2293 void DL_MCAN_eccEnableIntr(MCAN_Regs *mcan, uint32_t errType, bool enable);
2294 
2304 uint32_t DL_MCAN_eccGetIntrStatus(const MCAN_Regs *mcan, uint32_t errType);
2305 
2315 void DL_MCAN_eccClearIntrStatus(MCAN_Regs *mcan, uint32_t errType);
2316 
2327 void DL_MCAN_extTSCounterConfig(MCAN_Regs *mcan, uint32_t prescalar);
2328 
2339 void DL_MCAN_extTSCounterEnable(MCAN_Regs *mcan, bool enable);
2340 
2353 void DL_MCAN_extTSEnableIntr(MCAN_Regs *mcan, bool enable);
2354 
2363 void DL_MCAN_extTSWriteEOI(MCAN_Regs *mcan);
2364 
2375 uint32_t DL_MCAN_extTSGetUnservicedIntrCount(const MCAN_Regs *mcan);
2376 
2377 /* ========================================================================== */
2378 /* Advance Functions */
2379 /* ========================================================================== */
2380 
2390 void DL_MCAN_getRevisionId(const MCAN_Regs *mcan, DL_MCAN_RevisionId *revId);
2391 
2402 uint32_t DL_MCAN_getClockStopAck(const MCAN_Regs *mcan);
2403 
2412 void DL_MCAN_extTSSetRawStatus(MCAN_Regs *mcan);
2413 
2422 void DL_MCAN_extTSClearRawStatus(MCAN_Regs *mcan);
2423 
2433 uint32_t DL_MCAN_getRxPinState(const MCAN_Regs *mcan);
2434 
2448 void DL_MCAN_setTxPinState(MCAN_Regs *mcan, uint32_t state);
2449 
2461 uint32_t DL_MCAN_getTxPinState(const MCAN_Regs *mcan);
2462 
2470 uint32_t DL_MCAN_getTSCounterVal(const MCAN_Regs *mcan);
2471 
2482 uint32_t DL_MCAN_getClkStopAck(const MCAN_Regs *mcan);
2483 
2493 void DL_MCAN_getBitTime(
2494  const MCAN_Regs *mcan, DL_MCAN_BitTimingParams *configParams);
2495 
2503 void DL_MCAN_resetTSCounter(MCAN_Regs *mcan);
2504 
2512 uint32_t DL_MCAN_getTOCounterVal(const MCAN_Regs *mcan);
2513 
2524  const MCAN_Regs *mcan, DL_MCAN_ECCAggrRevisionId *revId);
2525 
2536  MCAN_Regs *mcan, DL_MCAN_ECCWrapRevisionId *revId);
2537 
2548 bool DL_MCAN_extTSIsIntrEnable(const MCAN_Regs *mcan);
2549 
2557 uint32_t DL_MCAN_getEndianVal(const MCAN_Regs *mcan);
2558 
2566 uint32_t DL_MCAN_getExtIDANDMask(const MCAN_Regs *mcan);
2567 
2577 __STATIC_INLINE void DL_MCAN_enablePower(MCAN_Regs *mcan)
2578 {
2579  mcan->MCANSS.PWREN = (MCAN_PWREN_KEY_UNLOCK_W | MCAN_PWREN_ENABLE_ENABLE);
2580 }
2581 
2592 __STATIC_INLINE void DL_MCAN_disablePower(MCAN_Regs *mcan)
2593 {
2594  mcan->MCANSS.PWREN = (MCAN_PWREN_KEY_UNLOCK_W | MCAN_PWREN_ENABLE_DISABLE);
2595 }
2596 
2613 __STATIC_INLINE bool DL_MCAN_isPowerEnabled(const MCAN_Regs *mcan)
2614 {
2615  return ((mcan->MCANSS.PWREN & MCAN_PWREN_ENABLE_MASK) ==
2616  MCAN_PWREN_ENABLE_ENABLE);
2617 }
2618 
2624 __STATIC_INLINE void DL_MCAN_reset(MCAN_Regs *mcan)
2625 {
2626  mcan->MCANSS.RSTCTL =
2627  (MCAN_RSTCTL_KEY_UNLOCK_W | MCAN_RSTCTL_RESETSTKYCLR_CLR |
2628  MCAN_RSTCTL_RESETASSERT_ASSERT);
2629 }
2630 
2640 __STATIC_INLINE bool DL_MCAN_isReset(const MCAN_Regs *mcan)
2641 {
2642  return ((mcan->MCANSS.STAT & MCAN_STAT_RESETSTKY_MASK) ==
2643  MCAN_STAT_RESETSTKY_RESET);
2644 }
2645 
2654 __STATIC_INLINE void DL_MCAN_enableInterrupt(
2655  MCAN_Regs *mcan, uint32_t interruptMask)
2656 {
2657  mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.IMASK |= interruptMask;
2658 }
2659 
2668 __STATIC_INLINE void DL_MCAN_disableInterrupt(
2669  MCAN_Regs *mcan, uint32_t interruptMask)
2670 {
2671  mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.IMASK &= ~(interruptMask);
2672 }
2673 
2686 __STATIC_INLINE uint32_t DL_MCAN_getEnabledInterrupts(
2687  const MCAN_Regs *mcan, uint32_t interruptMask)
2688 {
2689  return (mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.IMASK & interruptMask);
2690 }
2691 
2707 __STATIC_INLINE uint32_t DL_MCAN_getEnabledInterruptStatus(
2708  const MCAN_Regs *mcan, uint32_t interruptMask)
2709 {
2710  return (mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.MIS & interruptMask);
2711 }
2712 
2728 __STATIC_INLINE uint32_t DL_MCAN_getRawInterruptStatus(
2729  const MCAN_Regs *mcan, uint32_t interruptMask)
2730 {
2731  return (mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.RIS & interruptMask);
2732 }
2733 
2746 __STATIC_INLINE DL_MCAN_IIDX DL_MCAN_getPendingInterrupt(const MCAN_Regs *mcan)
2747 {
2748  // TODO: Need to figure out return values for this.
2749  return ((DL_MCAN_IIDX) mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.IIDX);
2750 }
2751 
2760 __STATIC_INLINE void DL_MCAN_clearInterruptStatus(
2761  MCAN_Regs *mcan, uint32_t interruptMask)
2762 {
2763  mcan->MCANSS.TI_WRAPPER.MSP.CPU_INT.ICLR = interruptMask;
2764 }
2765 
2774 __STATIC_INLINE bool DL_MCAN_isModuleClockEnabled(const MCAN_Regs *mcan)
2775 {
2776  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKEN &
2777  MCAN_CLKEN_CLK_REQEN_MASK) == MCAN_CLKEN_CLK_REQEN_SET);
2778 }
2779 
2786 __STATIC_INLINE void DL_MCAN_enableModuleClock(MCAN_Regs *mcan)
2787 {
2788  mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKEN = MCAN_CLKEN_CLK_REQEN_SET;
2789 }
2790 
2797 __STATIC_INLINE void DL_MCAN_disableModuleClock(MCAN_Regs *mcan)
2798 {
2799  mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKEN = MCAN_CLKEN_CLK_REQEN_CLR;
2800 }
2801 
2810 __STATIC_INLINE uint32_t DL_MCAN_getModuleClockDivider(const MCAN_Regs *mcan)
2811 {
2812  return (
2813  mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKDIV & MCAN_CLKDIV_RATIO_MASK);
2814 }
2815 
2825 __STATIC_INLINE void DL_MCAN_setModuleClockDivider(
2826  MCAN_Regs *mcan, uint32_t clkdiv)
2827 {
2828  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKDIV, clkdiv,
2829  MCAN_CLKDIV_RATIO_MASK);
2830 }
2831 
2841  const MCAN_Regs *mcan)
2842 {
2843  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL &
2844  MCAN_CLKCTL_STOPREQ_MASK) == MCAN_CLKCTL_STOPREQ_ENABLE);
2845 }
2846 
2853 __STATIC_INLINE void DL_MCAN_enableClockStopGateRequest(MCAN_Regs *mcan)
2854 {
2855  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL,
2856  MCAN_CLKCTL_STOPREQ_ENABLE, MCAN_CLKCTL_STOPREQ_MASK);
2857 }
2858 
2865 __STATIC_INLINE void DL_MCAN_disableClockStopGateRequest(MCAN_Regs *mcan)
2866 {
2867  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL,
2868  MCAN_CLKCTL_STOPREQ_DISABLE, MCAN_CLKCTL_STOPREQ_MASK);
2869 }
2870 
2881  const MCAN_Regs *mcan)
2882 {
2883  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL &
2884  MCAN_CLKCTL_WAKEUP_INT_EN_MASK) ==
2885  MCAN_CLKCTL_WAKEUP_INT_EN_ENABLE);
2886 }
2887 
2894 __STATIC_INLINE void DL_MCAN_enableClockStopWakeupInterrupt(MCAN_Regs *mcan)
2895 {
2896  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL,
2897  MCAN_CLKCTL_WAKEUP_INT_EN_ENABLE, MCAN_CLKCTL_WAKEUP_INT_EN_MASK);
2898 }
2899 
2906 __STATIC_INLINE void DL_MCAN_disableClockStopWakeupInterrupt(MCAN_Regs *mcan)
2907 {
2908  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL,
2909  MCAN_CLKCTL_WAKEUP_INT_EN_DISABLE, MCAN_CLKCTL_WAKEUP_INT_EN_MASK);
2910 }
2911 
2923 __STATIC_INLINE bool DL_MCAN_isGlitchFilterWakeupEnabled(const MCAN_Regs *mcan)
2924 {
2925  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL &
2926  MCAN_CLKCTL_WKUP_GLTFLT_EN_MASK) ==
2927  MCAN_CLKCTL_WKUP_GLTFLT_EN_ENABLE);
2928 }
2929 
2939 __STATIC_INLINE void DL_MCAN_enableGlitchFilterWakeup(MCAN_Regs *mcan)
2940 {
2941  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL,
2942  MCAN_CLKCTL_WKUP_GLTFLT_EN_ENABLE, MCAN_CLKCTL_WKUP_GLTFLT_EN_MASK);
2943 }
2944 
2954 __STATIC_INLINE void DL_MCAN_disableGlitchFilterWakeup(MCAN_Regs *mcan)
2955 {
2956  DL_Common_updateReg(&mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKCTL,
2957  MCAN_CLKCTL_WKUP_GLTFLT_EN_DISABLE, MCAN_CLKCTL_WKUP_GLTFLT_EN_MASK);
2958 }
2959 
2969  const MCAN_Regs *mcan)
2970 {
2971  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKSTS &
2972  MCAN_CLKSTS_CLKSTOP_ACKSTS_MASK) ==
2973  MCAN_CLKSTS_CLKSTOP_ACKSTS_SET);
2974 }
2975 
2988  const MCAN_Regs *mcan)
2989 {
2990  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKSTS &
2991  MCAN_CLKSTS_STOPREQ_HW_OVR_MASK) ==
2992  MCAN_CLKSTS_STOPREQ_HW_OVR_SET);
2993 }
2994 
3004  const MCAN_Regs *mcan)
3005 {
3006  return ((mcan->MCANSS.TI_WRAPPER.MSP.MCANSS_CLKSTS &
3007  MCAN_CLKSTS_CCLKDONE_MASK) == MCAN_CLKSTS_CCLKDONE_SET);
3008 }
3009 
3023  const MCAN_Regs *mcan, DL_MCAN_backupConfig *ptr);
3024 
3037 bool DL_MCAN_restoreConfiguration(MCAN_Regs *mcan, DL_MCAN_backupConfig *ptr);
3038 
3039 #ifdef __cplusplus
3040 }
3041 #endif
3042 
3043 #endif /* __MSPM0_HAS_MCAN__ */
3044 
3045 #endif /* ti_dl_dl_mcan__include */
3046 
Definition: dl_mcan.h:571
uint32_t eleLost
Definition: dl_mcan.h:1229
__STATIC_INLINE bool DL_MCAN_getClockStopAcknowledgeStatus(const MCAN_Regs *mcan)
Gets the clock stop acknowledge status.
Definition: dl_mcan.h:2968
uint32_t esi
Definition: dl_mcan.h:1477
int32_t DL_MCAN_config(MCAN_Regs *mcan, const DL_MCAN_ConfigParams *configParams)
This API will configure MCAN module.
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
uint32_t bit2
Definition: dl_mcan.h:1247
Definition: dl_mcan.h:674
DL_MCAN_FCLK
Enum to select source clock for CANCLK.
Definition: dl_mcan.h:513
Definition: dl_mcan.h:529
Definition: dl_mcan.h:689
__STATIC_INLINE void DL_MCAN_enableClockStopWakeupInterrupt(MCAN_Regs *mcan)
Enables the MCAN clock stop wakeup interrupt.
Definition: dl_mcan.h:2894
int32_t DL_MCAN_init(MCAN_Regs *mcan, const DL_MCAN_InitParams *initParams)
This API will initialize MCAN module.
uint32_t errPassive
Definition: dl_mcan.h:982
Definition: dl_mcan.h:1719
DL_MCAN_ECC_ERR_TYPE
Enum to represent the ECC Error Types.
Definition: dl_mcan.h:649
uint32_t dedErr
Definition: dl_mcan.h:1269
uint32_t flesa
Definition: dl_mcan.h:1042
void DL_MCAN_readTxEventFIFO(const MCAN_Regs *mcan, DL_MCAN_TxEventFIFOElement *txEventElem)
This API is used to read message form Tx Event FIFO.
uint32_t sfid1
Definition: dl_mcan.h:1515
void DL_MCAN_getHighPriorityMsgStatus(const MCAN_Regs *mcan, DL_MCAN_HighPriorityMsgInfo *hpm)
This API will return High Priority Message Status.
uint32_t scheme
Definition: dl_mcan.h:1311
DL_MCAN_INTR_SRC_MCAN
Enum to select the MCAN instance.
Definition: dl_mcan.h:637
Definition: dl_mcan.h:643
uint32_t getIdx
Definition: dl_mcan.h:1199
Definition: dl_mcan.h:730
Definition: dl_mcan.h:725
DL_MCAN_ID_TYPE
Enum to represent the MCAN Identifier Type.
Definition: dl_mcan.h:546
uint32_t txEventFIFOSize
Definition: dl_mcan.h:1077
Definition: dl_mcan.h:683
uint32_t canErrLogCnt
Definition: dl_mcan.h:963
uint32_t fillLvl
Definition: dl_mcan.h:1214
uint32_t major
Definition: dl_mcan.h:1315
uint32_t major
Definition: dl_mcan.h:1350
uint32_t stdFiltIDConf
Definition: dl_mcan.h:1623
Definition: dl_mcan.h:705
Definition: dl_mcan.h:604
DL_MCAN_ERR_CODE
Enum to represent MCAN&#39;s Error Code.
Definition: dl_mcan.h:695
__STATIC_INLINE bool DL_MCAN_getClockStopHardwareOverrideStatus(const MCAN_Regs *mcan)
Gets the clock stop hardware override status.
Definition: dl_mcan.h:2987
uint32_t anfs
Definition: dl_mcan.h:829
uint32_t mon
Definition: dl_mcan.h:1295
uint32_t rbrs
Definition: dl_mcan.h:1007
__STATIC_INLINE uint32_t DL_MCAN_getModuleClockDivider(const MCAN_Regs *mcan)
Gets the MCAN functional module clock divide ratio.
Definition: dl_mcan.h:2810
uint32_t tsPrescalar
Definition: dl_mcan.h:920
uint32_t errForce
Definition: dl_mcan.h:1253
uint32_t txDelCompConf
Definition: dl_mcan.h:1608
uint32_t DL_MCAN_getTOCounterVal(const MCAN_Regs *mcan)
This API will return current time-out counter value.
void DL_MCAN_getBitTime(const MCAN_Regs *mcan, DL_MCAN_BitTimingParams *configParams)
This API will get the configured bit timings for MCAN module.
int32_t DL_MCAN_getTxBufCancellationIntrEnable(const MCAN_Regs *mcan, uint32_t bufNum, bool enable)
This API is used to enable/disable Tx Buffer Cancellation Finished Interrupt.
int32_t DL_MCAN_writeTxEventFIFOAck(MCAN_Regs *mcan, uint32_t idx)
This API will write Event FIFO Acknowledge Index.
uint32_t DL_MCAN_getIntrStatus(const MCAN_Regs *mcan)
This API will return interrupt status.
uint32_t brs
Definition: dl_mcan.h:1386
void DL_MCAN_eccWriteEOI(MCAN_Regs *mcan, uint32_t errType)
This API is used to write End of Interrupt for ECC interrupt.
uint32_t rxDataSize
Definition: dl_mcan.h:1641
uint32_t freeLvl
Definition: dl_mcan.h:1195
uint32_t txFIFOSize
Definition: dl_mcan.h:1062
#define DL_MCAN_MAX_PAYLOAD_BYTES
Maximum payload supported by CAn-FD protocol in bytes.
Definition: dl_mcan.h:104
uint32_t efid2
Definition: dl_mcan.h:1560
Structure for MCAN High Priority Message.
Definition: dl_mcan.h:1135
void DL_MCAN_extTSClearRawStatus(MCAN_Regs *mcan)
This API will clear External TimeStamp Counter Overflow Interrupt raw status for MCAN module...
uint32_t enableRdModWr
Definition: dl_mcan.h:1338
uint32_t fillLvl
Definition: dl_mcan.h:1176
bool DL_MCAN_isFDOpEnable(const MCAN_Regs *mcan)
This API will return flexible data rate operation status MCAN module.
Definition: dl_mcan.h:699
DL_MCAN_COM_STATE
Enum to represent MCAN&#39;s communication state.
Definition: dl_mcan.h:681
Definition: dl_mcan.h:507
void DL_MCAN_addClockStopRequest(MCAN_Regs *mcan, bool enable)
This API add clock stop request for MCAN module to put it in power down mode.
Definition: dl_mcan.h:594
__STATIC_INLINE void DL_MCAN_enableInterrupt(MCAN_Regs *mcan, uint32_t interruptMask)
Enable MCAN interrupts.
Definition: dl_mcan.h:2654
__STATIC_INLINE bool DL_MCAN_isPowerEnabled(const MCAN_Regs *mcan)
Returns if the Peripheral Write Enable (PWREN) register for the MCAN is enabled.
Definition: dl_mcan.h:2613
DL_MCAN_FCLK clockSel
Definition: dl_mcan.h:745
Structure for accessing Revision ID of ECC AGGR.
Definition: dl_mcan.h:1309
uint32_t DL_MCAN_getExtIDANDMask(const MCAN_Regs *mcan)
This API will get the configured Extended ID AND Mask.
uint32_t fdf
Definition: dl_mcan.h:1443
uint32_t ctrlConf
Definition: dl_mcan.h:1587
void DL_MCAN_getRevisionId(const MCAN_Regs *mcan, DL_MCAN_RevisionId *revId)
This API is used get the MCAN revision ID.
uint32_t dlec
Definition: dl_mcan.h:997
uint32_t edcConf0
Definition: dl_mcan.h:1677
uint32_t msi
Definition: dl_mcan.h:1147
uint32_t recErrCnt
Definition: dl_mcan.h:956
void DL_MCAN_addExtMsgIDFilter(MCAN_Regs *mcan, uint32_t filtNum, const DL_MCAN_ExtMsgIDFilterElement *elem)
This API is used to add Extended Message ID Filter Element.
DL_MCAN_MEM_TYPE
Enum to represent the MCAN Message RAM type.
Definition: dl_mcan.h:569
uint32_t dataRatePrescalar
Definition: dl_mcan.h:775
uint32_t rxFIFO0ElemSize
Definition: dl_mcan.h:1127
uint32_t statusLow
Definition: dl_mcan.h:1162
Definition: dl_mcan.h:606
uint32_t asmEnable
Definition: dl_mcan.h:916
void DL_MCAN_getTxEventFIFOStatus(const MCAN_Regs *mcan, DL_MCAN_TxEventFIFOStatus *fifoStatus)
This API will Tx Event FIFO status.
void DL_MCAN_eccClearErrorStatus(MCAN_Regs *mcan, uint32_t errType)
This API is used to clear the ECC Error status.
uint32_t tdcf
Definition: dl_mcan.h:797
uint32_t wkupReqEnable
Definition: dl_mcan.h:876
uint32_t enable
Definition: dl_mcan.h:1328
uint32_t sfid2
Definition: dl_mcan.h:1513
uint32_t bit1
Definition: dl_mcan.h:1245
void DL_MCAN_enableIntrLine(MCAN_Regs *mcan, uint32_t lineNum, bool enable)
This API is used to enable/disable selected interrupt line.
uint32_t dataBitTimeConf
Definition: dl_mcan.h:1593
Definition: dl_mcan.h:608
bool DL_MCAN_isMemInitDone(const MCAN_Regs *mcan)
This function checks if the memory initialization is done for MCAN module.
Structure for ECC Error Status.
Definition: dl_mcan.h:1259
Structure for MCAN error logging counters status.
Definition: dl_mcan.h:952
void DL_MCAN_enableIntr(MCAN_Regs *mcan, uint32_t intrMask, bool enable)
This API is used to enable/disable interrupts.
__STATIC_INLINE void DL_MCAN_enablePower(MCAN_Regs *mcan)
Enables the Peripheral Write Enable (PWREN) register for the MCAN.
Definition: dl_mcan.h:2577
uint32_t warningStatus
Definition: dl_mcan.h:988
Definition: dl_mcan.h:614
int32_t DL_MCAN_setBitTime(MCAN_Regs *mcan, const DL_MCAN_BitTimingParams *configParams)
This API will configure a bit timings for MCAN module.
uint32_t pxe
Definition: dl_mcan.h:1018
Structure for MCAN protocol status.
Definition: dl_mcan.h:969
uint32_t modId
Definition: dl_mcan.h:1348
DL_MCAN_TIMEOUT_SELECT
Enum to represent the MCAN time-out counter configuration.
Definition: dl_mcan.h:622
uint32_t rxFIFO0Conf
Definition: dl_mcan.h:1632
uint32_t DL_MCAN_extTSGetUnservicedIntrCount(const MCAN_Regs *mcan)
This API returns Number of unserviced rollover/overflow interrupts for external TimeStamp counter...
uint32_t intLnSelConf
Definition: dl_mcan.h:1614
uint32_t year
Definition: dl_mcan.h:1297
DL_MCAN_RX_FIFO_NUM
Enum to represent the MCAN Rx FIFO number.
Definition: dl_mcan.h:580
uint32_t step
Definition: dl_mcan.h:1301
uint32_t dlc
Definition: dl_mcan.h:1485
uint32_t rxFIFO1ElemSize
Definition: dl_mcan.h:1129
uint32_t rxFIFO1Conf
Definition: dl_mcan.h:1638
DL_MCAN_LPBK_MODE
Enum to select the MCAN Loopback mode.
Definition: dl_mcan.h:660
uint32_t timeOutConf
Definition: dl_mcan.h:1602
DriverLib Common APIs.
uint32_t rxFIFO1startAddr
Definition: dl_mcan.h:1104
bool DL_MCAN_restoreConfiguration(MCAN_Regs *mcan, DL_MCAN_backupConfig *ptr)
Restore MCAN configuration after leaving STOP or STANDBY mode.
DL_MCAN_FCLK_DIV
Enum to select CANCLK divider.
Definition: dl_mcan.h:523
uint32_t errOnce
Definition: dl_mcan.h:1251
void DL_MCAN_resetTSCounter(MCAN_Regs *mcan)
This API will reset timestamp counter value.
void DL_MCAN_addStdMsgIDFilter(MCAN_Regs *mcan, uint32_t filtNum, const DL_MCAN_StdMsgIDFilterElement *elem)
This API is used to add Standard Message ID Filter Element.
uint32_t clkEnConf
Definition: dl_mcan.h:1584
uint32_t id
Definition: dl_mcan.h:1360
uint32_t txEvntFIFOConf
Definition: dl_mcan.h:1656
uint32_t scheme
Definition: dl_mcan.h:1285
uint32_t fifoFull
Definition: dl_mcan.h:1206
uint32_t fidx
Definition: dl_mcan.h:1445
uint32_t et
Definition: dl_mcan.h:1503
uint32_t id
Definition: dl_mcan.h:1462
uint32_t timeOutCntVal
Definition: dl_mcan.h:1605
uint32_t txEventFIFOWaterMark
Definition: dl_mcan.h:1083
Structure for accessing Revision ID of ECC wrapper.
Definition: dl_mcan.h:1344
uint32_t timeoutSelect
Definition: dl_mcan.h:931
uint32_t subStep
Definition: dl_mcan.h:1299
Definition: dl_mcan.h:626
uint32_t txBuffTxIntConf
Definition: dl_mcan.h:1650
Definition: dl_mcan.h:1698
uint32_t esi
Definition: dl_mcan.h:1375
void DL_MCAN_eccConfig(MCAN_Regs *mcan, const DL_MCAN_ECCConfigParams *configParams)
This API will enable/disable ECC on the Message RAM.
void DL_MCAN_getErrCounters(const MCAN_Regs *mcan, DL_MCAN_ErrCntStatus *errCounter)
This API will return error counter status for MCAN module.
Structure for bit timing calculation. Bit timing related to data phase will be valid only in case whe...
Definition: dl_mcan.h:755
uint32_t tdcv
Definition: dl_mcan.h:1020
uint32_t fdMode
Definition: dl_mcan.h:840
Definition: dl_mcan.h:551
uint32_t dlc
Definition: dl_mcan.h:1433
uint32_t rxts
Definition: dl_mcan.h:1427
Definition: dl_mcan.h:1715
void DL_MCAN_getTxFIFOQueStatus(const MCAN_Regs *mcan, DL_MCAN_TxFIFOStatus *fifoStatus)
This API will Tx FIFO status.
__STATIC_INLINE void DL_MCAN_disableClockStopGateRequest(MCAN_Regs *mcan)
Disables the MCAN clock gating request.
Definition: dl_mcan.h:2865
Definition: dl_mcan.h:537
DL_MCAN_CLOCK_DIVIDE
Definition: dl_mcan.h:1694
uint32_t efid1
Definition: dl_mcan.h:1544
bool DL_MCAN_isInReset(const MCAN_Regs *mcan)
This function checks if the MCAN module is in Reset.
uint32_t rpStatus
Definition: dl_mcan.h:961
uint32_t txStartAddr
Definition: dl_mcan.h:1050
bool DL_MCAN_saveConfiguration(const MCAN_Regs *mcan, DL_MCAN_backupConfig *ptr)
Saves MCAN configuration before entering STOP or STANDBY mode.
uint32_t tsSelect
Definition: dl_mcan.h:927
void DL_MCAN_getNewDataStatus(const MCAN_Regs *mcan, DL_MCAN_RxNewDataStatus *newDataStatus)
This API will return New Data Message Status.
bool DL_MCAN_extTSIsIntrEnable(const MCAN_Regs *mcan)
This API returns External TimeStamp Counter Overflow Interrupt enable status for MCAN module...
__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterrupts(const MCAN_Regs *mcan, uint32_t interruptMask)
Check which MCAN interrupts are enabled.
Definition: dl_mcan.h:2686
uint32_t DL_MCAN_getRxPinState(const MCAN_Regs *mcan)
This API will return Rx pin state of MCAN module.
uint32_t esi
Definition: dl_mcan.h:1425
Definition: dl_mcan.h:573
uint32_t nomTimeSeg2
Definition: dl_mcan.h:767
uint32_t tdco
Definition: dl_mcan.h:801
DL_MCAN_IIDX
Definition: dl_mcan.h:1704
uint32_t testConf
Definition: dl_mcan.h:1686
uint32_t edcConf2
Definition: dl_mcan.h:1671
uint32_t minor
Definition: dl_mcan.h:1352
uint32_t putIdx
Definition: dl_mcan.h:1201
uint32_t txBuffConf
Definition: dl_mcan.h:1644
__STATIC_INLINE bool DL_MCAN_isGlitchFilterWakeupEnabled(const MCAN_Regs *mcan)
Checks if the glitch filter on MCAN RXD input is enabled.
Definition: dl_mcan.h:2923
uint32_t enableChk
Definition: dl_mcan.h:1333
DL_MCAN_FCLK_DIV divider
Definition: dl_mcan.h:747
uint32_t mm
Definition: dl_mcan.h:1505
int32_t DL_MCAN_msgRAMConfig(MCAN_Regs *mcan, const DL_MCAN_MsgRAMConfigParams *msgRAMConfigParams)
This API will configure Different sections of Message RAM.
Definition: dl_mcan.h:685
__STATIC_INLINE void DL_MCAN_disableClockStopWakeupInterrupt(MCAN_Regs *mcan)
Disables the MCAN clock stop wakeup interrupt.
Definition: dl_mcan.h:2906
uint32_t sft
Definition: dl_mcan.h:1536
void DL_MCAN_getRxFIFOStatus(const MCAN_Regs *mcan, DL_MCAN_RxFIFOStatus *fifoStatus)
This API will Rx FIFO status.
__STATIC_INLINE DL_MCAN_IIDX DL_MCAN_getPendingInterrupt(const MCAN_Regs *mcan)
Get highest priority pending MCAN interrupt.
Definition: dl_mcan.h:2746
void DL_MCAN_setTxPinState(MCAN_Regs *mcan, uint32_t state)
This API will set Tx pin state of MCAN module.
uint32_t wdcPreload
Definition: dl_mcan.h:890
Structure for MCAN Global Filter Configuration parameters.
Definition: dl_mcan.h:807
uint32_t DL_MCAN_eccGetIntrStatus(const MCAN_Regs *mcan, uint32_t errType)
This API is used to get ECC interrupt status.
uint32_t efbi
Definition: dl_mcan.h:858
Definition: dl_mcan.h:517
uint32_t secErr
Definition: dl_mcan.h:1264
uint32_t rxFIFO1OpMode
Definition: dl_mcan.h:1121
uint32_t DL_MCAN_getClockStopAck(const MCAN_Regs *mcan)
This API get clock stop acknowledgement for MCAN module. It return whether MCAN is power down mode or...
Definition: dl_mcan.h:1712
__STATIC_INLINE void DL_MCAN_enableGlitchFilterWakeup(MCAN_Regs *mcan)
Enables the glitch filter on MCAN RXD input.
Definition: dl_mcan.h:2939
__STATIC_INLINE void DL_MCAN_disablePower(MCAN_Regs *mcan)
Disables the Peripheral Write Enable (PWREN) register for the MCAN.
Definition: dl_mcan.h:2592
DL_MCAN_PIN_TYPE
Enum to represent the MCAN pin type.
Definition: dl_mcan.h:590
uint32_t lss
Definition: dl_mcan.h:1040
uint32_t pxhddisable
Definition: dl_mcan.h:865
uint32_t DL_MCAN_getTSCounterVal(const MCAN_Regs *mcan)
This API will return current timestamp counter value.
uint32_t intEnConf
Definition: dl_mcan.h:1611
uint32_t clkConf
Definition: dl_mcan.h:1581
Definition: dl_mcan.h:703
Structure for MCAN Extended Message ID Filter Element.
Definition: dl_mcan.h:1542
Structure for ECC Error forcing.
Definition: dl_mcan.h:1235
Definition: dl_mcan.h:560
uint32_t rxFIFO0OpMode
Definition: dl_mcan.h:1102
__STATIC_INLINE bool DL_MCAN_getControllerClockRequestStatus(const MCAN_Regs *mcan)
Gets the status of MCAN controller clock request from GPRCM.
Definition: dl_mcan.h:3003
DL_MCAN_TDCConfig tdcConfig
Definition: dl_mcan.h:894
uint32_t darEnable
Definition: dl_mcan.h:871
Definition: dl_mcan.h:527
void DL_MCAN_extTSWriteEOI(MCAN_Regs *mcan)
This API is used to write End of Interrupt for External TimeStamp Counter Overflow Interrupt...
uint32_t rfdf
Definition: dl_mcan.h:1013
uint32_t rtr
Definition: dl_mcan.h:1467
bool DL_MCAN_isReady(DL_MCAN_INSTANCE instance)
if MCAN instance is ready to be configured
uint32_t xtd
Definition: dl_mcan.h:1420
void DL_MCAN_extTSEnableIntr(MCAN_Regs *mcan, bool enable)
This API will enable/disable External TimeStamp Counter Overflow Interrupt for MCAN module...
Definition: dl_mcan.h:612
uint32_t timeCntVal
Definition: dl_mcan.h:1599
Definition: dl_mcan.h:628
uint32_t scheme
Definition: dl_mcan.h:1346
void DL_MCAN_eccEnableIntr(MCAN_Regs *mcan, uint32_t errType, bool enable)
This API is used to enable ECC interrupt.
__STATIC_INLINE void DL_MCAN_enableModuleClock(MCAN_Regs *mcan)
Enables the MCAN functional module clock.
Definition: dl_mcan.h:2786
Structure for MCAN Tx Event FIFO Status.
Definition: dl_mcan.h:1212
Definition: dl_mcan.h:1706
uint32_t rxBuffConf
Definition: dl_mcan.h:1635
Definition: dl_mcan.h:641
Structure for MCAN Transmitter Delay Compensation parameters.
Definition: dl_mcan.h:793
DL_MCAN_INTR_LINE_NUM
Enum to select the MCAN interrupt lines.
Definition: dl_mcan.h:535
void DL_MCAN_extTSCounterEnable(MCAN_Regs *mcan, bool enable)
This API will enable/disable fast external time stamp counter for MCAN module.
uint32_t getIdx
Definition: dl_mcan.h:1216
__STATIC_INLINE void DL_MCAN_setModuleClockDivider(MCAN_Regs *mcan, uint32_t clkdiv)
Configures clock divide settings for the MCAN functional module clock.
Definition: dl_mcan.h:2825
uint32_t DL_MCAN_getTxBufReqPend(const MCAN_Regs *mcan)
This API will return Tx Buffer Request Pending status.
uint32_t timeCntConf
Definition: dl_mcan.h:1596
uint32_t rxFIFO0waterMark
Definition: dl_mcan.h:1097
Definition: dl_mcan.h:687
uint32_t rxFIFO0size
Definition: dl_mcan.h:1091
uint32_t fifoFull
Definition: dl_mcan.h:1185
Definition: dl_mcan.h:1700
uint32_t fdf
Definition: dl_mcan.h:1391
DL_MCAN_GlobalFiltConfig filterConfig
Definition: dl_mcan.h:946
Definition: dl_mcan.h:525
__STATIC_INLINE void DL_MCAN_disableGlitchFilterWakeup(MCAN_Regs *mcan)
Disables the glitch filter on MCAN RXD input.
Definition: dl_mcan.h:2954
uint32_t rrfs
Definition: dl_mcan.h:817
uint32_t fdf
Definition: dl_mcan.h:1495
void DL_MCAN_extTSSetRawStatus(MCAN_Regs *mcan)
This API will set External TimeStamp Counter Overflow Interrupt Raw status for MCAN module...
uint32_t bufIdx
Definition: dl_mcan.h:1139
uint32_t brsEnable
Definition: dl_mcan.h:846
uint32_t getIdx
Definition: dl_mcan.h:1178
void DL_MCAN_eccForceError(MCAN_Regs *mcan, const DL_MCAN_ECCErrForceParams *eccErr)
This API will Force Error on ECC.
Definition: dl_mcan.h:602
uint32_t num
Definition: dl_mcan.h:1174
uint32_t txpEnable
Definition: dl_mcan.h:852
uint32_t monEnable
Definition: dl_mcan.h:910
uint32_t modId
Definition: dl_mcan.h:1287
uint32_t globFiltIDConf
Definition: dl_mcan.h:1620
uint32_t sfec
Definition: dl_mcan.h:1529
uint32_t lse
Definition: dl_mcan.h:1048
uint32_t transErrLogCnt
Definition: dl_mcan.h:954
uint32_t DL_MCAN_getOpMode(const MCAN_Regs *mcan)
This API will return MCAN module mode of operation.
Structure for MCAN Tx Buffer element.
Definition: dl_mcan.h:1358
int32_t DL_MCAN_txBufCancellationReq(MCAN_Regs *mcan, uint32_t buffNum)
This API will set Tx Buffer Cancellation Request.
Definition: dl_mcan.h:639
__STATIC_INLINE bool DL_MCAN_isReset(const MCAN_Regs *mcan)
Returns if mcan peripheral was reset.
Definition: dl_mcan.h:2640
void DL_MCAN_clearNewDataStatus(MCAN_Regs *mcan, const DL_MCAN_RxNewDataStatus *newDataStatus)
This API clear New Data Message Status.
Definition: dl_mcan.h:651
void DL_MCAN_readMsgRam(const MCAN_Regs *mcan, uint32_t memType, uint32_t bufNum, uint32_t fifoNum, DL_MCAN_RxBufElement *elem)
This API is used to read received message form message RAM.
uint32_t txts
Definition: dl_mcan.h:1479
uint32_t rtr
Definition: dl_mcan.h:1415
void DL_MCAN_getProtocolStatus(const MCAN_Regs *mcan, DL_MCAN_ProtocolStatus *protStatus)
This API will return protocol status for MCAN module.
uint32_t DL_MCAN_getTxBufTransmissionStatus(const MCAN_Regs *mcan)
This API will return Tx Buffer Transmission Occurred status.
void DL_MCAN_setOpMode(MCAN_Regs *mcan, uint32_t mode)
This API will set MCAN module mode of operation.
uint32_t rxFIFO1size
Definition: dl_mcan.h:1110
uint32_t statusHigh
Definition: dl_mcan.h:1164
Definition: dl_mcan.h:610
Definition: dl_mcan.h:1709
Definition: dl_mcan.h:735
uint32_t rxBufElemSize
Definition: dl_mcan.h:1125
uint32_t resi
Definition: dl_mcan.h:1002
void DL_MCAN_eccClearIntrStatus(MCAN_Regs *mcan, uint32_t errType)
This API is used to clear ECC interrupt status.
uint32_t DL_MCAN_getEndianVal(const MCAN_Regs *mcan)
This function return endianness value of MCAN module.
uint32_t nomTimeSeg1
Definition: dl_mcan.h:763
uint32_t errType
Definition: dl_mcan.h:1239
uint32_t efec
Definition: dl_mcan.h:1558
Structure for MCAN Rx FIFO Status.
Definition: dl_mcan.h:1170
uint32_t txBuffCancIntConf
Definition: dl_mcan.h:1653
uint32_t rxBufStartAddr
Definition: dl_mcan.h:1123
uint32_t rxFIFO1waterMark
Definition: dl_mcan.h:1116
uint32_t autoWkupEnable
Definition: dl_mcan.h:881
uint32_t DL_MCAN_getClkStopAck(const MCAN_Regs *mcan)
This API will return clock stop acknowledgement for MCAN module.
__STATIC_INLINE void DL_MCAN_disableModuleClock(MCAN_Regs *mcan)
Disables the MCAN functional module clock.
Definition: dl_mcan.h:2797
int32_t DL_MCAN_setExtIDAndMask(MCAN_Regs *mcan, uint32_t idMask)
This API will configure Extended ID AND Mask.
uint32_t minor
Definition: dl_mcan.h:1291
uint32_t busOffStatus
Definition: dl_mcan.h:993
void DL_MCAN_selectIntrLine(MCAN_Regs *mcan, uint32_t intrMask, uint32_t lineNum)
This API is used to select interrupt line.
uint32_t bit1
Definition: dl_mcan.h:1275
uint32_t clkDivConf
Definition: dl_mcan.h:1578
Definition: dl_mcan.h:539
__STATIC_INLINE void DL_MCAN_enableClockStopGateRequest(MCAN_Regs *mcan)
Enables the MCAN clock gating request.
Definition: dl_mcan.h:2853
uint32_t dataSynchJumpWidth
Definition: dl_mcan.h:787
uint32_t ssIntEnConf
Definition: dl_mcan.h:1662
void DL_MCAN_eccGetErrorStatus(MCAN_Regs *mcan, DL_MCAN_ECCErrStatus *eccErr)
This API will return ECC Error status.
uint32_t msgLost
Definition: dl_mcan.h:1187
__STATIC_INLINE bool DL_MCAN_isClockStopWakeupInterruptEnabled(const MCAN_Regs *mcan)
Checks if the MCAN clock stop wakeup interrupt is enabled.
Definition: dl_mcan.h:2880
uint32_t dataTimeSeg2
Definition: dl_mcan.h:783
uint32_t efc
Definition: dl_mcan.h:1396
uint32_t edcConf1
Definition: dl_mcan.h:1674
uint32_t brs
Definition: dl_mcan.h:1490
Structure for MCAN Rx Buffer element.
Definition: dl_mcan.h:1408
uint32_t eft
Definition: dl_mcan.h:1568
__STATIC_INLINE void DL_MCAN_reset(MCAN_Regs *mcan)
Resets mcan peripheral.
Definition: dl_mcan.h:2624
uint32_t row
Definition: dl_mcan.h:1273
uint32_t dlc
Definition: dl_mcan.h:1381
Definition: dl_mcan.h:624
Definition: dl_mcan.h:715
uint32_t mm
Definition: dl_mcan.h:1398
uint32_t filterIdx
Definition: dl_mcan.h:1149
Structure for CANCLK configuration.
Definition: dl_mcan.h:742
uint32_t rel
Definition: dl_mcan.h:1303
Definition: dl_mcan.h:616
Structure for accessing Revision ID and Core Release Info. of MCAN module.
Definition: dl_mcan.h:1283
int32_t DL_MCAN_TXBufTransIntrEnable(MCAN_Regs *mcan, uint32_t bufNum, bool enable)
This API is used to enable/disable Tx Buffer Transmission Interrupt.
uint32_t fifoFull
Definition: dl_mcan.h:1223
bool backupRdy
Definition: dl_mcan.h:1690
__STATIC_INLINE uint32_t DL_MCAN_getRawInterruptStatus(const MCAN_Regs *mcan, uint32_t interruptMask)
Check interrupt flag of any MCAN interrupt.
Definition: dl_mcan.h:2728
uint32_t nomBitTimeConf
Definition: dl_mcan.h:1590
Definition: dl_mcan.h:653
DL_MCAN_OPERATION_MODE
Enum to represent the MCAN mode of operation.
Definition: dl_mcan.h:558
void DL_MCAN_getClockConfig(MCAN_Regs *mcan, DL_MCAN_ClockConfig *config)
Get CANCLK clock configuration.
__STATIC_INLINE bool DL_MCAN_isClockStopGateRequestEnabled(const MCAN_Regs *mcan)
Checks if the MCAN clock gating request is enabled.
Definition: dl_mcan.h:2840
uint32_t DL_MCAN_getTxPinState(const MCAN_Regs *mcan)
This API will return Tx pin state of MCAN module.
__STATIC_INLINE uint32_t DL_MCAN_getEnabledInterruptStatus(const MCAN_Regs *mcan, uint32_t interruptMask)
Check interrupt flag of enabled MCAN interrupts.
Definition: dl_mcan.h:2707
uint32_t day
Definition: dl_mcan.h:1293
uint32_t flssa
Definition: dl_mcan.h:1034
uint32_t rowNum
Definition: dl_mcan.h:1241
uint32_t DL_MCAN_getIntrLineSelectStatus(const MCAN_Regs *mcan)
This API is used to get interrupt line selected for each interrupt.
uint32_t txBufMode
Definition: dl_mcan.h:1067
Structure for MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: ...
Definition: dl_mcan.h:1032
Definition: dl_mcan.h:1717
Structure for MCAN Tx Event FIFO element.
Definition: dl_mcan.h:1460
int32_t DL_MCAN_TXBufAddReq(MCAN_Regs *mcan, uint32_t bufNum)
This API will set Tx Buffer Add Request.
__STATIC_INLINE void DL_MCAN_clearInterruptStatus(MCAN_Regs *mcan, uint32_t interruptMask)
Clear pending MCAN interrupts.
Definition: dl_mcan.h:2760
uint32_t anfe
Definition: dl_mcan.h:823
uint32_t xtd
Definition: dl_mcan.h:1472
uint32_t act
Definition: dl_mcan.h:977
uint32_t exFiltIDConf
Definition: dl_mcan.h:1626
Structure for MCAN Standard Message ID Filter Element.
Definition: dl_mcan.h:1511
uint32_t exFiltIDMsk
Definition: dl_mcan.h:1629
uint32_t putIdx
Definition: dl_mcan.h:1218
Configuration structure to backup MCAN peripheral state before entering STOP or STANDBY mode...
Definition: dl_mcan.h:1576
uint32_t nomRatePrescalar
Definition: dl_mcan.h:759
uint32_t txBufNum
Definition: dl_mcan.h:1056
uint32_t putIdx
Definition: dl_mcan.h:1180
void DL_MCAN_writeMsgRam(MCAN_Regs *mcan, uint32_t memType, uint32_t bufNum, const DL_MCAN_TxBufElement *elem)
This API is used to write Tx message to message RAM.
Definition: dl_mcan.h:582
uint32_t txDataSize
Definition: dl_mcan.h:1647
Definition: dl_mcan.h:515
uint32_t filterList
Definition: dl_mcan.h:1154
void DL_MCAN_lpbkModeEnable(MCAN_Regs *mcan, uint32_t lpbkMode, bool enable)
This API will enable/disable Loop Back Test Mode for MCAN module.
Structure for MCAN ECC configuration parameters.
Definition: dl_mcan.h:1323
uint32_t timeoutPreload
Definition: dl_mcan.h:937
uint32_t lastErrCode
Definition: dl_mcan.h:973
uint32_t xtd
Definition: dl_mcan.h:1370
uint32_t preSclConf
Definition: dl_mcan.h:1665
Structure for MCAN initialization parameters.
Definition: dl_mcan.h:835
Definition: dl_mcan.h:630
Structure for MCAN configuration parameters.
Definition: dl_mcan.h:905
Definition: dl_mcan.h:592
uint32_t modId
Definition: dl_mcan.h:1313
void DL_MCAN_setClockConfig(MCAN_Regs *mcan, const DL_MCAN_ClockConfig *config)
Configure CANCLK source clock.
uint32_t brs
Definition: dl_mcan.h:1438
uint32_t rrfe
Definition: dl_mcan.h:812
Definition: dl_mcan.h:1696
uint32_t ramWDConf
Definition: dl_mcan.h:1683
uint32_t id
Definition: dl_mcan.h:1410
Structure for MCAN Tx FIFO Status.
Definition: dl_mcan.h:1193
DL_MCAN_INSTANCE
Enum to select the MCAN instance.
Definition: dl_mcan.h:505
int32_t DL_MCAN_writeRxFIFOAck(MCAN_Regs *mcan, uint32_t fifoNum, uint32_t idx)
This API will write Rx FIFO Acknowledgement.
uint32_t dataTimeSeg1
Definition: dl_mcan.h:779
uint32_t tdcEnable
Definition: dl_mcan.h:899
Definition: dl_mcan.h:562
void DL_MCAN_eccWrapGetRevisionId(MCAN_Regs *mcan, DL_MCAN_ECCWrapRevisionId *revId)
This API is used get the ECC Wrapper revision ID.
uint32_t ssCtrlConf
Definition: dl_mcan.h:1659
Definition: dl_mcan.h:549
uint32_t timeoutCntEnable
Definition: dl_mcan.h:942
__STATIC_INLINE bool DL_MCAN_isModuleClockEnabled(const MCAN_Regs *mcan)
Checks if the MCAN module clock request is enabled.
Definition: dl_mcan.h:2774
uint32_t txEventFIFOStartAddr
Definition: dl_mcan.h:1071
Definition: dl_mcan.h:665
void DL_MCAN_eccAggrGetRevisionId(const MCAN_Regs *mcan, DL_MCAN_ECCAggrRevisionId *revId)
This API is used get the ECC AGGR revision ID.
Structure for MCAN new data flag for Rx buffer.
Definition: dl_mcan.h:1160
uint32_t rxFIFO0startAddr
Definition: dl_mcan.h:1085
void DL_MCAN_extTSCounterConfig(MCAN_Regs *mcan, uint32_t prescalar)
This API will configure external timestamp counter for MCAN module.
uint32_t anmf
Definition: dl_mcan.h:1450
__STATIC_INLINE void DL_MCAN_disableInterrupt(MCAN_Regs *mcan, uint32_t interruptMask)
Disable MCAN interrupts.
Definition: dl_mcan.h:2668
uint32_t DL_MCAN_txBufCancellationStatus(const MCAN_Regs *mcan)
This API will return Transmit Buffer Cancellation Finished status.
uint32_t intLnEnableConf
Definition: dl_mcan.h:1617
uint32_t intEvnt0Conf
Definition: dl_mcan.h:1680
void DL_MCAN_clearIntrStatus(MCAN_Regs *mcan, uint32_t intrMask, DL_MCAN_INTR_SRC_MCAN eoi)
This API is used to clear the interrupt status.
uint32_t txBufElemSize
Definition: dl_mcan.h:1069
uint32_t rtr
Definition: dl_mcan.h:1365
uint32_t nomSynchJumpWidth
Definition: dl_mcan.h:771
Definition: dl_mcan.h:584
uint32_t major
Definition: dl_mcan.h:1289
uint32_t edcVecConf
Definition: dl_mcan.h:1668
Definition: dl_mcan.h:709
uint32_t minor
Definition: dl_mcan.h:1317
uint32_t emulationEnable
Definition: dl_mcan.h:886
DL_MCAN_ELEM_SIZE
Enum to represent FIFO/Buffer element Size.
Definition: dl_mcan.h:600
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale