11#include "fsl_common.h"
25#define FSL_FLEXCAN_DRIVER_VERSION (MAKE_VERSION(2, 9, 2))
28#if !(defined(FLEXCAN_WAIT_TIMEOUT) && FLEXCAN_WAIT_TIMEOUT)
30#define FLEXCAN_WAIT_TIMEOUT (1000U)
34#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
35#define DLC_LENGTH_DECODE(dlc) (((dlc) <= 8U) ? (dlc) : (((dlc) <= 12U) ? (((dlc)-6U) * 4U) : (((dlc)-11U) * 16U)))
39#define FLEXCAN_ID_STD(id) \
40 (((uint32_t)(((uint32_t)(id)) << CAN_ID_STD_SHIFT)) & CAN_ID_STD_MASK)
41#define FLEXCAN_ID_EXT(id) \
42 (((uint32_t)(((uint32_t)(id)) << CAN_ID_EXT_SHIFT)) & \
43 (CAN_ID_EXT_MASK | CAN_ID_STD_MASK))
46#define FLEXCAN_RX_MB_STD_MASK(id, rtr, ide) \
47 (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
49#define FLEXCAN_RX_MB_EXT_MASK(id, rtr, ide) \
50 (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
54#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_A(id, rtr, ide) \
55 (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
56 (FLEXCAN_ID_STD(id) << 1))
57#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH(id, rtr, ide) \
58 (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
59 (((uint32_t)(id)&0x7FF) << 19))
60#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_LOW(id, rtr, ide) \
61 (((uint32_t)((uint32_t)(rtr) << 15) | (uint32_t)((uint32_t)(ide) << 14)) | \
62 (((uint32_t)(id)&0x7FF) << 3))
63#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_HIGH(id) \
64 (((uint32_t)(id)&0x7F8) << 21)
65#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_MID_HIGH(id) \
66 (((uint32_t)(id)&0x7F8) << 13)
67#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_MID_LOW(id) \
68 (((uint32_t)(id)&0x7F8) << 5)
69#define FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_LOW(id) \
70 (((uint32_t)(id)&0x7F8) >> 3)
71#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_A(id, rtr, ide) \
72 (((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
73 (FLEXCAN_ID_EXT(id) << 1))
74#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_B_HIGH(id, rtr, ide) \
76 ((uint32_t)((uint32_t)(rtr) << 31) | (uint32_t)((uint32_t)(ide) << 30)) | \
77 ((FLEXCAN_ID_EXT(id) & 0x1FFF8000) \
79#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_B_LOW(id, rtr, ide) \
80 (((uint32_t)((uint32_t)(rtr) << 15) | (uint32_t)((uint32_t)(ide) << 14)) | \
81 ((FLEXCAN_ID_EXT(id) & 0x1FFF8000) >> \
83#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_HIGH(id) \
84 ((FLEXCAN_ID_EXT(id) & 0x1FE00000) << 3)
85#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_MID_HIGH(id) \
86 ((FLEXCAN_ID_EXT(id) & 0x1FE00000) >> \
88#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_MID_LOW(id) \
89 ((FLEXCAN_ID_EXT(id) & 0x1FE00000) >> \
91#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_LOW(id) \
92 ((FLEXCAN_ID_EXT(id) & 0x1FE00000) >> 21)
95#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_A(id, rtr, ide) \
96 FLEXCAN_RX_FIFO_STD_MASK_TYPE_A(id, rtr, ide)
97#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_B_HIGH(id, rtr, ide) \
98 FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH( \
100#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_B_LOW(id, rtr, ide) \
101 FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_LOW( \
103#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_HIGH(id) \
104 FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_HIGH( \
106#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_MID_HIGH(id) \
107 FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_MID_HIGH( \
109#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_MID_LOW(id) \
110 FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_MID_LOW( \
112#define FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_LOW(id) \
113 FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_LOW( \
115#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_A(id, rtr, ide) \
116 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_A(id, rtr, ide)
117#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_B_HIGH(id, rtr, ide) \
118 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_B_HIGH( \
120#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_B_LOW(id, rtr, ide) \
121 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_B_LOW( \
123#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_HIGH(id) \
124 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_HIGH( \
126#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_MID_HIGH(id) \
127 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_MID_HIGH( \
129#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_MID_LOW(id) \
130 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_MID_LOW( \
132#define FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_LOW(id) \
133 FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_LOW(id)
135#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
137#define ENHANCED_RX_FIFO_FSCH(x) (((uint32_t)(((uint32_t)(x)) << 30)) & 0xC0000000U)
138#define RTR_STD_HIGH(x) (((uint32_t)(((uint32_t)(x)) << 27)) & 0x08000000U)
139#define RTR_STD_LOW(x) (((uint32_t)(((uint32_t)(x)) << 11)) & 0x00000800U)
140#define RTR_EXT(x) (((uint32_t)(((uint32_t)(x)) << 29)) & 0x40000000U)
141#define ID_STD_LOW(id) (((uint32_t)id) & 0x7FFU)
142#define ID_STD_HIGH(id) (((uint32_t)(((uint32_t)(id)) << 16)) & 0x07FF0000U)
143#define ID_EXT(id) (((uint32_t)id) & 0x1FFFFFFFU)
146#define FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(id, rtr, id_mask, rtr_mask) \
147 (ENHANCED_RX_FIFO_FSCH(0x0) | RTR_STD_HIGH(rtr) | ID_STD_HIGH(id) | RTR_STD_LOW(rtr_mask) | ID_STD_LOW(id_mask))
149#define FLEXCAN_ENHANCED_RX_FIFO_STD_FILTER_WITH_RANGE(id_upper, rtr, id_lower, rtr_mask) \
150 (ENHANCED_RX_FIFO_FSCH(0x1) | RTR_STD_HIGH(rtr) | ID_STD_HIGH(id_upper) | RTR_STD_LOW(rtr_mask) | \
151 ID_STD_LOW(id_lower))
153#define FLEXCAN_ENHANCED_RX_FIFO_STD_TWO_FILTERS(id1, rtr1, id2, rtr2) \
154 (ENHANCED_RX_FIFO_FSCH(0x2) | RTR_STD_HIGH(rtr1) | ID_STD_HIGH(id1) | RTR_STD_LOW(rtr2) | ID_STD_LOW(id2))
156#define FLEXCAN_ENHANCED_RX_FIFO_EXT_MASK_AND_FILTER_LOW(id, rtr) \
157 (ENHANCED_RX_FIFO_FSCH(0x0) | RTR_EXT(rtr) | ID_EXT(id))
159#define FLEXCAN_ENHANCED_RX_FIFO_EXT_MASK_AND_FILTER_HIGH(id_mask, rtr_mask) \
160 (ENHANCED_RX_FIFO_FSCH(0x0) | RTR_EXT(rtr_mask) | ID_EXT(id_mask))
162#define FLEXCAN_ENHANCED_RX_FIFO_EXT_FILTER_WITH_RANGE_LOW(id_upper, rtr) \
163 (ENHANCED_RX_FIFO_FSCH(0x1) | RTR_EXT(rtr) | ID_EXT(id_upper))
165#define FLEXCAN_ENHANCED_RX_FIFO_EXT_FILTER_WITH_RANGE_HIGH(id_lower, rtr_mask) \
166 (ENHANCED_RX_FIFO_FSCH(0x1) | RTR_EXT(rtr_mask) | ID_EXT(id_lower))
168#define FLEXCAN_ENHANCED_RX_FIFO_EXT_TWO_FILTERS_LOW(id2, rtr2) \
169 (ENHANCED_RX_FIFO_FSCH(0x2) | RTR_EXT(rtr2) | ID_EXT(id2))
171#define FLEXCAN_ENHANCED_RX_FIFO_EXT_TWO_FILTERS_HIGH(id1, rtr1) \
172 (ENHANCED_RX_FIFO_FSCH(0x2) | RTR_EXT(rtr1) | ID_EXT(id1))
175#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
177#define FLEXCAN_PN_STD_MASK(id, rtr) \
178 ((uint32_t)((uint32_t)(rtr) << CAN_FLT_ID1_FLT_RTR_SHIFT) | \
180#define FLEXCAN_PN_EXT_MASK(id, rtr) \
181 ((uint32_t)CAN_FLT_ID1_FLT_IDE_MASK | (uint32_t)((uint32_t)(rtr) << CAN_FLT_ID1_FLT_RTR_SHIFT) | \
186#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
187#define FLEXCAN_PN_INT_MASK(x) (((uint64_t)(((uint64_t)(x)) << 32)) & 0x3000000000000U)
188#define FLEXCAN_PN_INT_UNMASK(x) (((uint32_t)(((uint64_t)(x)) >> 32)) & 0x00030000U)
189#define FLEXCAN_PN_STATUS_MASK(x) (((uint64_t)(((uint64_t)(x)) << 16)) & 0x300000000U)
190#define FLEXCAN_PN_STATUS_UNMASK(x) (((uint32_t)(((uint64_t)(x)) >> 16)) & 0x00030000U)
192#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
193#define FLEXCAN_EFIFO_INT_MASK(x) (((uint64_t)(((uint64_t)(x)) << 32)) & 0xF000000000000000U)
194#define FLEXCAN_EFIFO_INT_UNMASK(x) (((uint32_t)(((uint64_t)(x)) >> 32)) & 0xF0000000U)
195#define FLEXCAN_EFIFO_STATUS_MASK(x) (((uint64_t)(((uint64_t)(x)) << 32)) & 0xF003000000000000U)
196#define FLEXCAN_EFIFO_STATUS_UNMASK(x) (((uint32_t)(((uint64_t)(x)) >> 32)) & 0xF0030000U)
198#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
199#define FLEXCAN_MECR_INT_MASK(x) (((uint64_t)(((uint64_t)(x)) << 16)) & 0xD00000000U)
200#define FLEXCAN_MECR_INT_UNMASK(x) (((uint32_t)(((uint64_t)(x)) >> 16)) & 0x000D0000U)
201#define FLEXCAN_MECR_STATUS_MASK(x) (((uint64_t)(((uint64_t)(x)) << 34)) & 0x34003400000000U)
202#define FLEXCAN_MECR_STATUS_UNMASK(x) (((uint32_t)(((uint64_t)(x)) >> 34)) & 0x000D000DU)
205#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
206#define FLEXCAN_ERROR_AND_STATUS_INIT_FLAG \
207 ((uint32_t)kFLEXCAN_ErrorOverrunFlag | (uint32_t)kFLEXCAN_FDErrorIntFlag | (uint32_t)kFLEXCAN_BusoffDoneIntFlag | \
208 (uint32_t)kFLEXCAN_TxWarningIntFlag | (uint32_t)kFLEXCAN_RxWarningIntFlag | (uint32_t)kFLEXCAN_BusOffIntFlag | \
209 (uint32_t)kFLEXCAN_ErrorIntFlag | FLEXCAN_MEMORY_ERROR_INIT_FLAG)
211#define FLEXCAN_ERROR_AND_STATUS_INIT_FLAG \
212 ((uint32_t)kFLEXCAN_TxWarningIntFlag | (uint32_t)kFLEXCAN_RxWarningIntFlag | (uint32_t)kFLEXCAN_BusOffIntFlag | \
213 (uint32_t)kFLEXCAN_ErrorIntFlag | FLEXCAN_MEMORY_ERROR_INIT_FLAG)
215#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
216#define FLEXCAN_WAKE_UP_FLAG \
217 ((uint32_t)kFLEXCAN_WakeUpIntFlag | (uint64_t)kFLEXCAN_PNMatchIntFlag | (uint64_t)kFLEXCAN_PNTimeoutIntFlag)
219#define FLEXCAN_WAKE_UP_FLAG ((uint32_t)kFLEXCAN_WakeUpIntFlag)
221#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
222#define FLEXCAN_MEMORY_ERROR_INIT_FLAG ((uint64_t)kFLEXCAN_AllMemoryErrorFlag)
224#define FLEXCAN_MEMORY_ERROR_INIT_FLAG (0U)
227#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
228#define FLEXCAN_MEMORY_ENHANCED_RX_FIFO_INIT_FLAG \
229 ((uint64_t)kFLEXCAN_ERxFifoUnderflowIntFlag | (uint64_t)kFLEXCAN_ERxFifoOverflowIntFlag | \
230 (uint64_t)kFLEXCAN_ERxFifoWatermarkIntFlag | (uint64_t)kFLEXCAN_ERxFifoDataAvlIntFlag)
233#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
234#define E_RX_FIFO(base) ((uint32_t)(base) + 0x2000U)
236#define FLEXCAN_MEMORY_ENHANCED_RX_FIFO_INIT_FLAG (0U)
258#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
259 kStatus_FLEXCAN_RxFifoUnderflow =
308#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
312typedef enum _flexcan_mb_size
314 kFLEXCAN_8BperMB = 0x0U,
315 kFLEXCAN_16BperMB = 0x1U,
316 kFLEXCAN_32BperMB = 0x2U,
317 kFLEXCAN_64BperMB = 0x3U,
328enum _flexcan_fd_frame_length
330 kFLEXCAN_0BperFrame = 0x0U,
339 kFLEXCAN_12BperFrame,
340 kFLEXCAN_16BperFrame,
341 kFLEXCAN_20BperFrame,
343 kFLEXCAN_32BperFrame,
344 kFLEXCAN_48BperFrame,
345 kFLEXCAN_64BperFrame,
349#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
351typedef enum _flexcan_efifo_dma_per_read_length
353 kFLEXCAN_1WordPerRead = 0x0U,
354 kFLEXCAN_2WordPerRead,
355 kFLEXCAN_3WordPerRead,
356 kFLEXCAN_4WordPerRead,
357 kFLEXCAN_5WordPerRead,
358 kFLEXCAN_6WordPerRead,
359 kFLEXCAN_7WordPerRead,
360 kFLEXCAN_8WordPerRead,
361 kFLEXCAN_9WordPerRead,
362 kFLEXCAN_10WordPerRead,
363 kFLEXCAN_11WordPerRead,
364 kFLEXCAN_12WordPerRead,
365 kFLEXCAN_13WordPerRead,
366 kFLEXCAN_14WordPerRead,
367 kFLEXCAN_15WordPerRead,
368 kFLEXCAN_16WordPerRead,
369 kFLEXCAN_17WordPerRead,
370 kFLEXCAN_18WordPerRead,
371 kFLEXCAN_19WordPerRead
372} flexcan_efifo_dma_per_read_length_t;
401#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
402 kFLEXCAN_FDErrorInterruptEnable = CAN_CTRL2_ERRMSK_FAST_MASK,
404#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
406 kFLEXCAN_PNMatchWakeUpInterruptEnable = FLEXCAN_PN_INT_MASK(CAN_CTRL1_PN_WTOF_MSK_MASK),
408 kFLEXCAN_PNTimeoutWakeUpInterruptEnable = FLEXCAN_PN_INT_MASK(CAN_CTRL1_PN_WUMF_MSK_MASK),
410#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
412 kFLEXCAN_ERxFifoUnderflowInterruptEnable = FLEXCAN_EFIFO_INT_MASK(CAN_ERFIER_ERFUFWIE_MASK),
414 kFLEXCAN_ERxFifoOverflowInterruptEnable = FLEXCAN_EFIFO_INT_MASK(CAN_ERFIER_ERFOVFIE_MASK),
416 kFLEXCAN_ERxFifoWatermarkInterruptEnable = FLEXCAN_EFIFO_INT_MASK(CAN_ERFIER_ERFWMIIE_MASK),
418 kFLEXCAN_ERxFifoDataAvlInterruptEnable = FLEXCAN_EFIFO_INT_MASK(CAN_ERFIER_ERFDAIE_MASK),
420#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
422 kFLEXCAN_HostAccessNCErrorInterruptEnable = FLEXCAN_MECR_INT_MASK(CAN_MECR_HANCEI_MSK_MASK),
424 kFLEXCAN_FlexCanAccessNCErrorInterruptEnable = FLEXCAN_MECR_INT_MASK(CAN_MECR_FANCEI_MSK_MASK),
426 kFLEXCAN_HostOrFlexCanCErrorInterruptEnable = FLEXCAN_MECR_INT_MASK(CAN_MECR_CEI_MSK_MASK),
439#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
440 kFLEXCAN_ErrorOverrunFlag = CAN_ESR1_ERROVR_MASK,
441 kFLEXCAN_FDErrorIntFlag = CAN_ESR1_ERRINT_FAST_MASK,
442 kFLEXCAN_BusoffDoneIntFlag = CAN_ESR1_BOFFDONEINT_MASK,
456#
if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
457 CAN_ESR1_STFERR_FAST_MASK | CAN_ESR1_FRMERR_FAST_MASK | CAN_ESR1_CRCERR_FAST_MASK |
458 CAN_ESR1_BIT0ERR_FAST_MASK | CAN_ESR1_BIT1ERR_FAST_MASK | CAN_ESR1_ERROVR_MASK |
460 CAN_ESR1_TXWRN_MASK | CAN_ESR1_RXWRN_MASK | CAN_ESR1_BIT1ERR_MASK | CAN_ESR1_BIT0ERR_MASK |
461 CAN_ESR1_ACKERR_MASK | CAN_ESR1_CRCERR_MASK | CAN_ESR1_FRMERR_MASK | CAN_ESR1_STFERR_MASK),
462#
if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
463 kFLEXCAN_PNMatchIntFlag = FLEXCAN_PN_STATUS_MASK(CAN_WU_MTC_WUMF_MASK),
464 kFLEXCAN_PNTimeoutIntFlag = FLEXCAN_PN_STATUS_MASK(CAN_WU_MTC_WTOF_MASK),
466#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
467 kFLEXCAN_ERxFifoUnderflowIntFlag =
468 FLEXCAN_EFIFO_STATUS_MASK(CAN_ERFSR_ERFUFW_MASK),
469 kFLEXCAN_ERxFifoOverflowIntFlag =
470 FLEXCAN_EFIFO_STATUS_MASK(CAN_ERFSR_ERFOVF_MASK),
471 kFLEXCAN_ERxFifoWatermarkIntFlag =
472 FLEXCAN_EFIFO_STATUS_MASK(CAN_ERFSR_ERFWMI_MASK),
473 kFLEXCAN_ERxFifoDataAvlIntFlag =
474 FLEXCAN_EFIFO_STATUS_MASK(CAN_ERFSR_ERFDA_MASK),
475 kFLEXCAN_ERxFifoEmptyFlag = FLEXCAN_EFIFO_STATUS_MASK(CAN_ERFSR_ERFE_MASK),
476 kFLEXCAN_ERxFifoFullFlag = FLEXCAN_EFIFO_STATUS_MASK(CAN_ERFSR_ERFF_MASK),
478#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
480 kFLEXCAN_HostAccessNonCorrectableErrorIntFlag = FLEXCAN_MECR_INT_MASK(CAN_ERRSR_HANCEIF_MASK),
482 kFLEXCAN_FlexCanAccessNonCorrectableErrorIntFlag = FLEXCAN_MECR_INT_MASK(CAN_ERRSR_FANCEIF_MASK),
484 kFLEXCAN_CorrectableErrorIntFlag = FLEXCAN_MECR_INT_MASK(CAN_ERRSR_CEIF_MASK),
486 kFLEXCAN_HostAccessNonCorrectableErrorOverrunFlag = FLEXCAN_MECR_INT_MASK(CAN_ERRSR_HANCEIOF_MASK),
488 kFLEXCAN_FlexCanAccessNonCorrectableErrorOverrunFlag = FLEXCAN_MECR_INT_MASK(CAN_ERRSR_FANCEIOF_MASK),
490 kFLEXCAN_CorrectableErrorOverrunFlag = FLEXCAN_MECR_INT_MASK(CAN_ERRSR_CEIOF_MASK),
492 kFLEXCAN_AllMemoryErrorFlag =
493 (kFLEXCAN_HostAccessNonCorrectableErrorIntFlag | kFLEXCAN_FlexCanAccessNonCorrectableErrorIntFlag |
494 kFLEXCAN_CorrectableErrorIntFlag | kFLEXCAN_HostAccessNonCorrectableErrorOverrunFlag |
495 kFLEXCAN_FlexCanAccessNonCorrectableErrorOverrunFlag | kFLEXCAN_CorrectableErrorOverrunFlag)
508#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
509 kFLEXCAN_FDStuffingError = CAN_ESR1_STFERR_FAST_MASK,
510 kFLEXCAN_FDFormError = CAN_ESR1_FRMERR_FAST_MASK,
511 kFLEXCAN_FDCrcError = CAN_ESR1_CRCERR_FAST_MASK,
512 kFLEXCAN_FDBit0Error = CAN_ESR1_BIT0ERR_FAST_MASK,
513 kFLEXCAN_FDBit1Error = (int)CAN_ESR1_BIT1ERR_FAST_MASK,
540#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
544typedef enum _flexcan_memory_error_type
546 kFLEXCAN_CorrectableError = 0U,
547 kFLEXCAN_NonCorrectableError
548} flexcan_memory_error_type_t;
553typedef enum _flexcan_memory_access_type
555 kFLEXCAN_MoveOutFlexCanAccess = 0U,
556 kFLEXCAN_MoveInAccess,
557 kFLEXCAN_TxArbitrationAccess,
558 kFLEXCAN_RxMatchingAccess,
559 kFLEXCAN_MoveOutHostAccess
560} flexcan_memory_access_type_t;
565typedef enum _flexcan_byte_error_syndrome
567 kFLEXCAN_NoError = 0U,
568 kFLEXCAN_ParityBits0Error = 1U,
569 kFLEXCAN_ParityBits1Error = 2U,
570 kFLEXCAN_ParityBits2Error = 4U,
571 kFLEXCAN_ParityBits3Error = 8U,
572 kFLEXCAN_ParityBits4Error = 16U,
573 kFLEXCAN_DataBits0Error = 28U,
574 kFLEXCAN_DataBits1Error = 22U,
575 kFLEXCAN_DataBits2Error = 19U,
576 kFLEXCAN_DataBits3Error = 25U,
577 kFLEXCAN_DataBits4Error = 26U,
578 kFLEXCAN_DataBits5Error = 7U,
579 kFLEXCAN_DataBits6Error = 21U,
580 kFLEXCAN_DataBits7Error = 14U,
581 kFLEXCAN_AllZeroError = 6U,
582 kFLEXCAN_AllOneError = 31U,
583 kFLEXCAN_NonCorrectableErrors
584} flexcan_byte_error_syndrome_t;
593typedef struct _flexcan_memory_error_report_status
595 flexcan_memory_error_type_t errorType;
596 flexcan_memory_access_type_t accessType;
597 uint16_t accessAddress;
603 flexcan_byte_error_syndrome_t bitAffected;
605} flexcan_memory_error_report_status_t;
649#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
655typedef struct _flexcan_fd_frame
659 uint32_t timestamp : 16;
681 uint32_t dataWord[16];
697#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
715#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
716 uint16_t fpreDivider;
735#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
742#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
756#if !(defined(FSL_FEATURE_FLEXCAN_HAS_NO_SUPV_SUPPORT) && FSL_FEATURE_FLEXCAN_HAS_NO_SUPV_SUPPORT)
760#if (defined(FSL_FEATURE_FLEXCAN_HAS_DOZE_MODE_SUPPORT) && FSL_FEATURE_FLEXCAN_HAS_DOZE_MODE_SUPPORT)
763#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
764 bool enablePretendedeNetworking;
766#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
767 bool enableMemoryErrorControl;
768 bool enableNonCorrectableErrorEnterFreeze;
771#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG)
772 bool enableTransceiverDelayMeasure;
796#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
798typedef enum _flexcan_pn_match_source
800 kFLEXCAN_PNMatSrcID = 0U,
801 kFLEXCAN_PNMatSrcIDAndData,
802} flexcan_pn_match_source_t;
805typedef enum _flexcan_pn_match_mode
807 kFLEXCAN_PNMatModeEqual = 0x0U,
808 kFLEXCAN_PNMatModeGreater,
810 kFLEXCAN_PNMatModeSmaller,
812 kFLEXCAN_PNMatModeRange,
814} flexcan_pn_match_mode_t;
822typedef struct _flexcan_pn_config
825 uint16_t timeoutValue;
828 flexcan_pn_match_source_t matchSrc;
831 flexcan_pn_match_mode_t idMatchMode;
832 flexcan_pn_match_mode_t dataMatchMode;
884} flexcan_pn_config_t;
896#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
898typedef struct _flexcan_enhanced_rx_fifo_std_id_filter
900 uint32_t filterType : 2;
910} flexcan_enhanced_rx_fifo_std_id_filter_t;
913typedef struct _flexcan_enhanced_rx_fifo_ext_id_filter
915 uint32_t filterType : 2;
924} flexcan_enhanced_rx_fifo_ext_id_filter_t;
926typedef struct _flexcan_enhanced_rx_fifo_config
928 uint32_t *idFilterTable;
933 uint8_t idFilterPairNum;
936 uint8_t extendIdFilterNum;
939 uint8_t fifoWatermark;
941 flexcan_efifo_dma_per_read_length_t dmaPerReadLength;
944} flexcan_enhanced_rx_fifo_config_t;
950#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
951 flexcan_fd_frame_t *framefd;
960#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
961 flexcan_fd_frame_t *framefd;
980#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE) || \
981 (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
982#define FLEXCAN_CALLBACK(x) \
983 void(x)(CAN_Type * base, flexcan_handle_t * handle, status_t status, uint64_t result, void *userData)
984typedef void (*flexcan_transfer_callback_t)(
987#define FLEXCAN_CALLBACK(x) \
988 void(x)(CAN_Type * base, flexcan_handle_t * handle, status_t status, uint32_t result, void *userData)
989typedef void (*flexcan_transfer_callback_t)(
996 flexcan_transfer_callback_t
callback;
1000#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1002 *
volatile mbFDFrameBuf[CAN_WORD1_COUNT];
1005#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1006 flexcan_fd_frame_t *
volatile rxFifoFDFrameBuf;
1019#if defined(__cplusplus)
1070 uint32_t sourceClock_Hz,
1100#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1117bool FLEXCAN_FDCalculateImprovedTimingValues(
CAN_Type *base,
1120 uint32_t sourceClock_Hz,
1223#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1251status_t FLEXCAN_SetFDBitRate(
CAN_Type *base, uint32_t sourceClock_Hz, uint32_t bitRateN_Bps, uint32_t bitRateD_Bps);
1305#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1318void FLEXCAN_SetFDTxMbConfig(
CAN_Type *base, uint8_t mbIdx,
bool enable);
1336#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1368#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1383void FLEXCAN_SetEnhancedRxFifoConfig(
CAN_Type *base,
const flexcan_enhanced_rx_fifo_config_t *pConfig,
bool enable);
1386#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1395void FLEXCAN_SetPNConfig(
CAN_Type *base,
const flexcan_pn_config_t *pConfig);
1414#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE) || \
1415 (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) || \
1416 (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1417static inline uint64_t FLEXCAN_GetStatusFlags(
CAN_Type *base)
1419 uint64_t tempflag = (uint64_t)base->ESR1;
1420#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1422 tempflag |= FLEXCAN_PN_STATUS_MASK(base->WU_MTC);
1424#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1426 tempflag |= FLEXCAN_EFIFO_STATUS_MASK(base->ERFSR);
1428#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1430 tempflag |= FLEXCAN_MECR_STATUS_MASK(base->ERRSR);
1435static inline uint32_t FLEXCAN_GetStatusFlags(
CAN_Type *base)
1449#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE) || \
1450 (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) || \
1451 (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1452static inline void FLEXCAN_ClearStatusFlags(
CAN_Type *base, uint64_t mask)
1454#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1456 base->WU_MTC = FLEXCAN_PN_STATUS_UNMASK(mask);
1458#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1460 base->ERFSR = FLEXCAN_EFIFO_STATUS_UNMASK(mask);
1462#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1464 base->ERRSR = FLEXCAN_MECR_STATUS_UNMASK(mask);
1466 base->ESR1 = (uint32_t)(mask & 0xFFFFFFFFU);
1469static inline void FLEXCAN_ClearStatusFlags(
CAN_Type *base, uint32_t mask)
1485static inline void FLEXCAN_GetBusErrCount(
CAN_Type *base, uint8_t *txErrBuf, uint8_t *rxErrBuf)
1487 if (
NULL != txErrBuf)
1489 *txErrBuf = (uint8_t)((base->ECR & CAN_ECR_TXERRCNT_MASK) >> CAN_ECR_TXERRCNT_SHIFT);
1492 if (
NULL != rxErrBuf)
1494 *rxErrBuf = (uint8_t)((base->ECR & CAN_ECR_RXERRCNT_MASK) >> CAN_ECR_RXERRCNT_SHIFT);
1507#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1508static inline uint64_t FLEXCAN_GetMbStatusFlags(
CAN_Type *base, uint64_t mask)
1510static inline uint32_t FLEXCAN_GetMbStatusFlags(
CAN_Type *base, uint32_t mask)
1513#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1514 uint64_t tempflag = (uint64_t)base->IFLAG1;
1515 return (tempflag | (((uint64_t)base->IFLAG2) << 32)) & mask;
1517 return (base->IFLAG1 & mask);
1529#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1530static inline void FLEXCAN_ClearMbStatusFlags(
CAN_Type *base, uint64_t mask)
1532static inline void FLEXCAN_ClearMbStatusFlags(
CAN_Type *base, uint32_t mask)
1535#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1536 base->IFLAG1 = (uint32_t)(mask & 0xFFFFFFFFU);
1537 base->IFLAG2 = (uint32_t)(mask >> 32);
1539 base->IFLAG1 = mask;
1543#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1552void FLEXCAN_GetMemoryErrorReportStatus(
CAN_Type *base, flexcan_memory_error_report_status_t *errorStatus);
1555#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1565static inline uint8_t FLEXCAN_GetPNMatchCount(
CAN_Type *base)
1567 return (uint8_t)((base->WU_MTC & CAN_WU_MTC_MCOUNTER_MASK) >> CAN_WU_MTC_MCOUNTER_SHIFT);
1571#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1580static inline uint32_t FLEXCAN_GetEnhancedFifoDataCount(
CAN_Type *base)
1582 return (base->ERFSR & CAN_ERFSR_ERFEL_MASK);
1601#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE) || \
1602 (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) || \
1603 (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1604static inline void FLEXCAN_EnableInterrupts(
CAN_Type *base, uint64_t mask)
1606static inline void FLEXCAN_EnableInterrupts(
CAN_Type *base, uint32_t mask)
1612#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1613 if (0 != FSL_FEATURE_FLEXCAN_INSTANCE_HAS_FLEXIBLE_DATA_RATEn(base))
1616 base->CTRL2 |= (uint32_t)(mask & (uint32_t)kFLEXCAN_FDErrorInterruptEnable);
1620#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1622 base->CTRL1_PN |= FLEXCAN_PN_INT_UNMASK(mask);
1625#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1627 base->ERFIER |= FLEXCAN_EFIFO_INT_UNMASK(mask);
1630#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1632 base->MECR |= FLEXCAN_MECR_INT_UNMASK(mask);
1650#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE) || \
1651 (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1652static inline void FLEXCAN_DisableInterrupts(
CAN_Type *base, uint64_t mask)
1654static inline void FLEXCAN_DisableInterrupts(
CAN_Type *base, uint32_t mask)
1660#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1661 if (0 != FSL_FEATURE_FLEXCAN_INSTANCE_HAS_FLEXIBLE_DATA_RATEn(base))
1664 base->CTRL2 &= ~(uint32_t)(mask & (uint32_t)kFLEXCAN_FDErrorInterruptEnable);
1668#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1670 base->CTRL1_PN &= ~FLEXCAN_PN_STATUS_UNMASK(mask);
1673#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1675 base->ERFIER &= ~FLEXCAN_EFIFO_INT_UNMASK(mask);
1678#if (defined(FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL) && FSL_FEATURE_FLEXCAN_HAS_MEMORY_ERROR_CONTROL)
1680 base->MECR &= ~FLEXCAN_MECR_STATUS_UNMASK(mask);
1697#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1698static inline void FLEXCAN_EnableMbInterrupts(
CAN_Type *base, uint64_t mask)
1700static inline void FLEXCAN_EnableMbInterrupts(
CAN_Type *base, uint32_t mask)
1703#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1704 base->IMASK1 |= (uint32_t)(mask & 0xFFFFFFFFU);
1705 base->IMASK2 |= (uint32_t)(mask >> 32);
1707 base->IMASK1 |= mask;
1719#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1720static inline void FLEXCAN_DisableMbInterrupts(
CAN_Type *base, uint64_t mask)
1722static inline void FLEXCAN_DisableMbInterrupts(
CAN_Type *base, uint32_t mask)
1725#if (defined(FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER)) && (FSL_FEATURE_FLEXCAN_HAS_EXTENDED_FLAG_REGISTER > 0)
1726 base->IMASK1 &= ~((uint32_t)(mask & 0xFFFFFFFFU));
1727 base->IMASK2 &= ~((uint32_t)(mask >> 32));
1729 base->IMASK1 &= ~mask;
1735#if (defined(FSL_FEATURE_FLEXCAN_HAS_RX_FIFO_DMA) && FSL_FEATURE_FLEXCAN_HAS_RX_FIFO_DMA)
1749void FLEXCAN_EnableRxFifoDMA(
CAN_Type *base,
bool enable);
1759static inline uintptr_t FLEXCAN_GetRxFifoHeadAddr(
CAN_Type *base)
1761 return (uintptr_t) & (base->MB[0].CS);
1780static inline void FLEXCAN_Enable(
CAN_Type *base,
bool enable)
1784 base->MCR &= ~CAN_MCR_MDIS_MASK;
1787 while (0U != (base->MCR & CAN_MCR_LPMACK_MASK))
1793 base->MCR |= CAN_MCR_MDIS_MASK;
1796 while (0U == (base->MCR & CAN_MCR_LPMACK_MASK))
1834#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1848status_t FLEXCAN_WriteFDTxMb(
CAN_Type *base, uint8_t mbIdx,
const flexcan_fd_frame_t *pTxFrame);
1865status_t FLEXCAN_ReadFDRxMb(
CAN_Type *base, uint8_t mbIdx, flexcan_fd_frame_t *pRxFrame);
1880#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
1891status_t FLEXCAN_ReadEnhancedRxFifo(
CAN_Type *base, flexcan_fd_frame_t *pRxFrame);
1894#if (defined(FSL_FEATURE_FLEXCAN_HAS_PN_MODE) && FSL_FEATURE_FLEXCAN_HAS_PN_MODE)
1917#if (defined(FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE) && FSL_FEATURE_FLEXCAN_HAS_FLEXIBLE_DATA_RATE)
1929status_t FLEXCAN_TransferFDSendBlocking(
CAN_Type *base, uint8_t mbIdx, flexcan_fd_frame_t *pTxFrame);
1943status_t FLEXCAN_TransferFDReceiveBlocking(
CAN_Type *base, uint8_t mbIdx, flexcan_fd_frame_t *pRxFrame);
2036#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
2047status_t FLEXCAN_TransferReceiveEnhancedFifoBlocking(
CAN_Type *base, flexcan_fd_frame_t *pRxFrame);
2064 flexcan_transfer_callback_t callback,
2124#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
2151static inline status_t FLEXCAN_TransferGetReceiveEnhancedFifoCount(
CAN_Type *base,
2211#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
2235#if defined(__cplusplus)
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
uint8_t dataByte4
Definition: fsl_flexcan.h:701
flexcan_rx_fifo_filter_type_t idFilterType
Definition: fsl_flexcan.h:949
void FLEXCAN_Deinit(CAN_Type *base)
De-initializes a FlexCAN instance.
Definition: fsl_flexcan.c:1109
uint16_t preDivider
Definition: fsl_flexcan.h:767
void FLEXCAN_ExitFreezeMode(CAN_Type *base)
Exit FlexCAN Freeze Mode.
Definition: fsl_flexcan.c:519
status_t FLEXCAN_TransferReceiveFifoNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)
Receives a message from Rx FIFO using IRQ.
Definition: fsl_flexcan.c:3686
status_t FLEXCAN_TransferSendBlocking(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pTxFrame)
Performs a polling send transaction on the CAN bus.
Definition: fsl_flexcan.c:3139
flexcan_frame_t * frame
Definition: fsl_flexcan.h:1010
flexcan_frame_type_t type
Definition: fsl_flexcan.h:850
bool enableTimerSync
Definition: fsl_flexcan.h:808
uint8_t dataByte0
Definition: fsl_flexcan.h:697
uint8_t maxMbNum
Definition: fsl_flexcan.h:806
void FLEXCAN_SetRxFifoConfig(CAN_Type *base, const flexcan_rx_fifo_config_t *pRxFifoConfig, bool enable)
Configures the FlexCAN Legacy Rx FIFO.
Definition: fsl_flexcan.c:2313
flexcan_rx_fifo_priority_t priority
Definition: fsl_flexcan.h:950
size_t frameNum
Definition: fsl_flexcan.h:1021
status_t FLEXCAN_TransferSendNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)
Sends a message using IRQ.
Definition: fsl_flexcan.c:3452
uint32_t bitRate
Definition: fsl_flexcan.h:798
void FLEXCAN_EnterFreezeMode(CAN_Type *base)
Enter FlexCAN Freeze Mode.
Definition: fsl_flexcan.c:501
flexcan_frame_t *volatile mbFrameBuf[CAN_WORD1_COUNT]
Definition: fsl_flexcan.h:1056
uint32_t timestamp
Definition: fsl_flexcan.h:673
_flexcan_frame_format
FlexCAN frame format.
Definition: fsl_flexcan.h:323
_flexcan_interrupt_enable
FlexCAN interrupt enable enumerations.
Definition: fsl_flexcan.h:452
size_t rxFifoFrameNum
Definition: fsl_flexcan.h:1065
void FLEXCAN_GetDefaultConfig(flexcan_config_t *pConfig)
Gets the default configuration structure.
Definition: fsl_flexcan.c:1154
void FLEXCAN_SetRxIndividualMask(CAN_Type *base, uint8_t maskIdx, uint32_t mask)
Sets the FlexCAN receive individual mask.
Definition: fsl_flexcan.c:1501
bool enableListenOnlyMode
Definition: fsl_flexcan.h:812
void FLEXCAN_SetRxMbGlobalMask(CAN_Type *base, uint32_t mask)
Sets the FlexCAN receive message buffer global mask.
Definition: fsl_flexcan.c:1453
uint32_t dataWord0
Definition: fsl_flexcan.h:689
uint8_t dataByte1
Definition: fsl_flexcan.h:696
uint32_t id
Definition: fsl_flexcan.h:847
bool enableSelfWakeup
Definition: fsl_flexcan.h:809
uint8_t dataByte3
Definition: fsl_flexcan.h:694
status_t FLEXCAN_ReadRxFifo(CAN_Type *base, flexcan_frame_t *pRxFrame)
Reads a FlexCAN Message from Legacy Rx FIFO.
Definition: fsl_flexcan.c:3029
uint8_t mbIdx
Definition: fsl_flexcan.h:1011
uint8_t dataByte5
Definition: fsl_flexcan.h:700
uint8_t propSeg
Definition: fsl_flexcan.h:771
uint8_t idFilterNum
Definition: fsl_flexcan.h:948
bool FLEXCAN_CalculateImprovedTimingValues(CAN_Type *base, uint32_t bitRate, uint32_t sourceClock_Hz, flexcan_timing_config_t *pTimingConfig)
Calculates the improved timing values by specific bit Rates for classical CAN.
Definition: fsl_flexcan.c:1685
_flexcan_clock_source
FlexCAN clock source.
Definition: fsl_flexcan.h:340
enum _flexcan_rx_fifo_filter_type flexcan_rx_fifo_filter_type_t
FlexCAN Rx Fifo Filter type.
void FLEXCAN_SetTimingConfig(CAN_Type *base, const flexcan_timing_config_t *pConfig)
Sets the FlexCAN classical CAN protocol timing characteristic.
Definition: fsl_flexcan.c:1327
uint32_t FLEXCAN_GetInstance(CAN_Type *base)
Get the FlexCAN instance from peripheral base address.
Definition: fsl_flexcan.c:345
enum _flexcan_wake_up_source flexcan_wake_up_source_t
FlexCAN wake up source.
uint32_t idhit
Definition: fsl_flexcan.h:678
enum _flexcan_frame_format flexcan_frame_format_t
FlexCAN frame format.
status_t FLEXCAN_TransferReceiveBlocking(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pRxFrame)
Performs a polling receive transaction on the CAN bus.
Definition: fsl_flexcan.c:3188
status_t FLEXCAN_TransferReceiveNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)
Receives a message using IRQ.
Definition: fsl_flexcan.c:3516
uint32_t length
Definition: fsl_flexcan.h:674
uint32_t baudRate
Definition: fsl_flexcan.h:791
size_t rxFifoTransferTotalNum
Definition: fsl_flexcan.h:1066
void * userData
Definition: fsl_flexcan.h:1054
void FLEXCAN_SetRxMbConfig(CAN_Type *base, uint8_t mbIdx, const flexcan_rx_mb_config_t *pRxMbConfig, bool enable)
Configures a FlexCAN Receive Message Buffer.
Definition: fsl_flexcan.c:2191
flexcan_wake_up_source_t wakeupSrc
Definition: fsl_flexcan.h:805
uint32_t type
Definition: fsl_flexcan.h:675
uint8_t dataByte2
Definition: fsl_flexcan.h:695
uint8_t dataByte6
Definition: fsl_flexcan.h:699
volatile uint8_t mbState[CAN_WORD1_COUNT]
Definition: fsl_flexcan.h:1067
void FLEXCAN_TransferHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)
FlexCAN IRQ handle function.
Definition: fsl_flexcan.c:4422
bool disableSelfReception
Definition: fsl_flexcan.h:811
uint8_t dataByte7
Definition: fsl_flexcan.h:698
void FLEXCAN_TransferAbortReceive(CAN_Type *base, flexcan_handle_t *handle, uint8_t mbIdx)
Aborts the interrupt driven message receive process.
Definition: fsl_flexcan.c:3939
status_t FLEXCAN_WriteTxMb(CAN_Type *base, uint8_t mbIdx, const flexcan_frame_t *pTxFrame)
Writes a FlexCAN Message to the Transmit Message Buffer.
Definition: fsl_flexcan.c:2682
status_t FLEXCAN_TransferReceiveFifoBlocking(CAN_Type *base, flexcan_frame_t *pRxFrame)
Performs a polling receive transaction from Legacy Rx FIFO on the CAN bus.
Definition: fsl_flexcan.c:3310
struct _flexcan_rx_mb_config flexcan_rx_mb_config_t
FlexCAN Receive Message Buffer configuration structure.
enum _flexcan_clock_source flexcan_clock_source_t
FlexCAN clock source.
void FLEXCAN_TransferAbortReceiveFifo(CAN_Type *base, flexcan_handle_t *handle)
Aborts the interrupt driven message receive from Rx FIFO process.
Definition: fsl_flexcan.c:3970
flexcan_transfer_callback_t callback
Definition: fsl_flexcan.h:1053
volatile uint8_t rxFifoState
Definition: fsl_flexcan.h:1068
flexcan_clock_source_t clkSrc
Definition: fsl_flexcan.h:804
_flexcan_rx_fifo_filter_type
FlexCAN Rx Fifo Filter type.
Definition: fsl_flexcan.h:356
struct _flexcan_config flexcan_config_t
FlexCAN module configuration structure.
uint32_t format
Definition: fsl_flexcan.h:676
void FLEXCAN_TransferAbortSend(CAN_Type *base, flexcan_handle_t *handle, uint8_t mbIdx)
Aborts the interrupt driven message send process.
Definition: fsl_flexcan.c:3823
bool enableLoopBack
Definition: fsl_flexcan.h:807
_flexcan_wake_up_source
FlexCAN wake up source.
Definition: fsl_flexcan.h:349
struct _flexcan_timing_config flexcan_timing_config_t
FlexCAN protocol timing characteristic configuration structure.
uint8_t phaseSeg1
Definition: fsl_flexcan.h:769
_flexcan_frame_type
FlexCAN frame type.
Definition: fsl_flexcan.h:330
enum _flexcan_frame_type flexcan_frame_type_t
FlexCAN frame type.
bool enableSupervisorMode
Definition: fsl_flexcan.h:814
void FLEXCAN_TransferCreateHandle(CAN_Type *base, flexcan_handle_t *handle, flexcan_transfer_callback_t callback, void *userData)
Initializes the FlexCAN handle.
Definition: fsl_flexcan.c:3367
volatile uint32_t timestamp[CAN_WORD1_COUNT]
Definition: fsl_flexcan.h:1069
struct _flexcan_frame flexcan_frame_t
FlexCAN message frame structure.
void FLEXCAN_SetRxFifoGlobalMask(CAN_Type *base, uint32_t mask)
Sets the FlexCAN receive FIFO global mask.
Definition: fsl_flexcan.c:1475
flexcan_frame_t *volatile rxFifoFrameBuf
Definition: fsl_flexcan.h:1061
status_t FLEXCAN_ReadRxMb(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pRxFrame)
Reads a FlexCAN Message from Receive Message Buffer.
Definition: fsl_flexcan.c:2854
struct _flexcan_fifo_transfer flexcan_fifo_transfer_t
FlexCAN Rx FIFO transfer.
struct _flexcan_rx_fifo_config flexcan_rx_fifo_config_t
FlexCAN Legacy Rx FIFO configuration structure.
status_t FLEXCAN_TransferGetReceiveFifoCount(CAN_Type *base, flexcan_handle_t *handle, size_t *count)
Gets the Legacy Rx Fifo transfer status during a interrupt non-blocking receive.
Definition: fsl_flexcan.c:3736
flexcan_frame_format_t format
Definition: fsl_flexcan.h:849
void FLEXCAN_SetTxMbConfig(CAN_Type *base, uint8_t mbIdx, bool enable)
Configures a FlexCAN transmit message buffer.
Definition: fsl_flexcan.c:1527
uint32_t FLEXCAN_GetTimeStamp(flexcan_handle_t *handle, uint8_t mbIdx)
Gets the detail index of Mailbox's Timestamp by handle.
Definition: fsl_flexcan.c:4044
uint32_t id
Definition: fsl_flexcan.h:682
_flexcan_error_flags
FlexCAN error status flags.
Definition: fsl_flexcan.h:564
enum _flexcan_rx_fifo_priority flexcan_rx_fifo_priority_t
FlexCAN Enhanced/Legacy Rx FIFO priority.
uint32_t * idFilterTable
Definition: fsl_flexcan.h:947
uint8_t phaseSeg2
Definition: fsl_flexcan.h:770
uint32_t dataWord1
Definition: fsl_flexcan.h:690
uint8_t rJumpwidth
Definition: fsl_flexcan.h:768
flexcan_frame_t * frame
Definition: fsl_flexcan.h:1020
void FLEXCAN_Init(CAN_Type *base, const flexcan_config_t *pConfig, uint32_t sourceClock_Hz)
Initializes a FlexCAN instance.
Definition: fsl_flexcan.c:780
struct _flexcan_mb_transfer flexcan_mb_transfer_t
FlexCAN Message Buffer transfer.
status_t FLEXCAN_SetBitRate(CAN_Type *base, uint32_t sourceClock_Hz, uint32_t bitRate_Bps)
Set bit rate of FlexCAN classical CAN frame or CAN FD frame nominal phase.
Definition: fsl_flexcan.c:713
_flexcan_rx_fifo_priority
FlexCAN Enhanced/Legacy Rx FIFO priority.
Definition: fsl_flexcan.h:440
_flexcan_flags
FlexCAN status flags.
Definition: fsl_flexcan.h:495
bool enableIndividMask
Definition: fsl_flexcan.h:810
@ kFLEXCAN_FrameFormatExtend
Definition: fsl_flexcan.h:325
@ kFLEXCAN_FrameFormatStandard
Definition: fsl_flexcan.h:324
@ kFLEXCAN_ErrorInterruptEnable
Definition: fsl_flexcan.h:454
@ kFLEXCAN_RxWarningInterruptEnable
Definition: fsl_flexcan.h:456
@ kFLEXCAN_TxWarningInterruptEnable
Definition: fsl_flexcan.h:455
@ kFLEXCAN_WakeUpInterruptEnable
Definition: fsl_flexcan.h:457
@ kFLEXCAN_BusOffInterruptEnable
Definition: fsl_flexcan.h:453
@ kFLEXCAN_ClkSrc0
Definition: fsl_flexcan.h:343
@ kFLEXCAN_ClkSrc1
Definition: fsl_flexcan.h:344
@ kFLEXCAN_ClkSrcPeri
Definition: fsl_flexcan.h:342
@ kFLEXCAN_ClkSrcOsc
Definition: fsl_flexcan.h:341
@ kStatus_FLEXCAN_TxBusy
Definition: fsl_flexcan.h:298
@ kStatus_FLEXCAN_ErrorStatus
Definition: fsl_flexcan.h:311
@ kStatus_FLEXCAN_TxSwitchToRx
Definition: fsl_flexcan.h:300
@ kStatus_FLEXCAN_RxFifoOverflow
Definition: fsl_flexcan.h:307
@ kStatus_FLEXCAN_RxFifoDisabled
Definition: fsl_flexcan.h:309
@ kStatus_FLEXCAN_RxFifoWarning
Definition: fsl_flexcan.h:308
@ kStatus_FLEXCAN_RxBusy
Definition: fsl_flexcan.h:302
@ kStatus_FLEXCAN_RxFifoIdle
Definition: fsl_flexcan.h:306
@ kStatus_FLEXCAN_RxFifoBusy
Definition: fsl_flexcan.h:305
@ kStatus_FLEXCAN_UnHandled
Definition: fsl_flexcan.h:313
@ kStatus_FLEXCAN_RxOverflow
Definition: fsl_flexcan.h:304
@ kStatus_FLEXCAN_TxIdle
Definition: fsl_flexcan.h:299
@ kStatus_FLEXCAN_RxRemote
Definition: fsl_flexcan.h:314
@ kStatus_FLEXCAN_WakeUp
Definition: fsl_flexcan.h:312
@ kStatus_FLEXCAN_RxIdle
Definition: fsl_flexcan.h:303
@ kFLEXCAN_RxFifoFrameAvlFlag
Definition: fsl_flexcan.h:594
@ kFLEXCAN_RxFifoWarningFlag
Definition: fsl_flexcan.h:593
@ kFLEXCAN_RxFifoOverflowFlag
Definition: fsl_flexcan.h:592
@ kFLEXCAN_RxFifoFilterTypeB
Definition: fsl_flexcan.h:358
@ kFLEXCAN_RxFifoFilterTypeA
Definition: fsl_flexcan.h:357
@ kFLEXCAN_RxFifoFilterTypeD
Definition: fsl_flexcan.h:362
@ kFLEXCAN_RxFifoFilterTypeC
Definition: fsl_flexcan.h:360
@ kFLEXCAN_WakeupSrcFiltered
Definition: fsl_flexcan.h:351
@ kFLEXCAN_WakeupSrcUnfiltered
Definition: fsl_flexcan.h:350
@ kFLEXCAN_FrameTypeData
Definition: fsl_flexcan.h:331
@ kFLEXCAN_FrameTypeRemote
Definition: fsl_flexcan.h:332
@ kFLEXCAN_AckError
Definition: fsl_flexcan.h:577
@ kFLEXCAN_FormError
Definition: fsl_flexcan.h:575
@ kFLEXCAN_CrcError
Definition: fsl_flexcan.h:576
@ kFLEXCAN_Bit1Error
Definition: fsl_flexcan.h:579
@ kFLEXCAN_RxErrorWarningFlag
Definition: fsl_flexcan.h:573
@ kFLEXCAN_TxErrorWarningFlag
Definition: fsl_flexcan.h:572
@ kFLEXCAN_StuffingError
Definition: fsl_flexcan.h:574
@ kFLEXCAN_Bit0Error
Definition: fsl_flexcan.h:578
@ kFLEXCAN_RxFifoPrioLow
Definition: fsl_flexcan.h:441
@ kFLEXCAN_RxFifoPrioHigh
Definition: fsl_flexcan.h:442
@ kFLEXCAN_TransmittingFlag
Definition: fsl_flexcan.h:506
@ kFLEXCAN_RxWarningIntFlag
Definition: fsl_flexcan.h:503
@ kFLEXCAN_ReceivingFlag
Definition: fsl_flexcan.h:507
@ kFLEXCAN_FaultConfinementFlag
Definition: fsl_flexcan.h:505
@ kFLEXCAN_SynchFlag
Definition: fsl_flexcan.h:501
@ kFLEXCAN_IdleFlag
Definition: fsl_flexcan.h:504
@ kFLEXCAN_BusOffIntFlag
Definition: fsl_flexcan.h:508
@ kFLEXCAN_WakeUpIntFlag
Definition: fsl_flexcan.h:510
@ kFLEXCAN_TxWarningIntFlag
Definition: fsl_flexcan.h:502
@ kFLEXCAN_ErrorIntFlag
Definition: fsl_flexcan.h:509
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_FLEXCAN
Definition: fsl_common.h:125
Definition: MIMXRT1052.h:4122
FlexCAN module configuration structure.
Definition: fsl_flexcan.h:786
FlexCAN Rx FIFO transfer.
Definition: fsl_flexcan.h:1016
FlexCAN message frame structure.
Definition: fsl_flexcan.h:670
FlexCAN handle structure.
Definition: fsl_flexcan.h:1052
FlexCAN Message Buffer transfer.
Definition: fsl_flexcan.h:1006
FlexCAN Legacy Rx FIFO configuration structure.
Definition: fsl_flexcan.h:946
FlexCAN Receive Message Buffer configuration structure.
Definition: fsl_flexcan.h:846
FlexCAN protocol timing characteristic configuration structure.
Definition: fsl_flexcan.h:766