1 /*
2  * Copyright (c) 2020 Alexander Wachter
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  */
7 
8 #ifndef ZEPHYR_DRIVERS_CAN_MCAN_INT_H_
9 #define ZEPHYR_DRIVERS_CAN_MCAN_INT_H_
10 
11 #include <drivers/can.h>
12 
13 /*
14  * Register Masks are taken from the stm32cube library and extended for
15  * full M_CAN IPs
16  * Copyright (c) 2019 STMicroelectronics.
17  */
18 /****************  Bit definition for CAN_MCAN_CREL register  *****************/
19 /* Timestamp Day */
20 #define CAN_MCAN_CREL_DAY_POS        (0U)
21 #define CAN_MCAN_CREL_DAY_MSK        (0xFFUL << CAN_MCAN_CREL_DAY_POS)
22 #define CAN_MCAN_CREL_DAY            CAN_MCAN_CREL_DAY_MSK
23 /* Timestamp Month */
24 #define CAN_MCAN_CREL_MON_POS        (8U)
25 #define CAN_MCAN_CREL_MON_MSK        (0xFFUL << CAN_MCAN_CREL_MON_POS)
26 #define CAN_MCAN_CREL_MON            CAN_MCAN_CREL_MON_MSK
27 /* Timestamp Year */
28 #define CAN_MCAN_CREL_YEAR_POS       (16U)
29 #define CAN_MCAN_CREL_YEAR_MSK       (0xFUL << CAN_MCAN_CREL_YEAR_POS)
30 #define CAN_MCAN_CREL_YEAR           CAN_MCAN_CREL_YEAR_MSK
31 /* Substep of Core release */
32 #define CAN_MCAN_CREL_SUBSTEP_POS    (20U)
33 #define CAN_MCAN_CREL_SUBSTEP_MSK    (0xFUL << CAN_MCAN_CREL_SUBSTEP_POS)
34 #define CAN_MCAN_CREL_SUBSTEP        CAN_MCAN_CREL_SUBSTEP_MSK
35 /* Step of Core release */
36 #define CAN_MCAN_CREL_STEP_POS       (24U)
37 #define CAN_MCAN_CREL_STEP_MSK       (0xFUL << CAN_MCAN_CREL_STEP_POS)
38 #define CAN_MCAN_CREL_STEP           CAN_MCAN_CREL_STEP_MSK
39 /* Core release */
40 #define CAN_MCAN_CREL_REL_POS        (28U)
41 #define CAN_MCAN_CREL_REL_MSK        (0xFUL << CAN_MCAN_CREL_REL_POS)
42 #define CAN_MCAN_CREL_REL            CAN_MCAN_CREL_REL_MSK
43 
44 /****************  Bit definition for CAN_MCAN_ENDN register  *****************/
45 /* Endiannes Test Value */
46 #define CAN_MCAN_ENDN_ETV_POS        (0U)
47 #define CAN_MCAN_ENDN_ETV_MSK        (0xFFFFFFFFUL << CAN_MCAN_ENDN_ETV_POS)
48 #define CAN_MCAN_ENDN_ETV            CAN_MCAN_ENDN_ETV_MSK
49 
50 /***************  Bit definition for CAN_MCAN_DBTP register  ******************/
51 /* Synchronization Jump Width */
52 #define CAN_MCAN_DBTP_DSJW_POS       (0U)
53 #define CAN_MCAN_DBTP_DSJW_MSK       (0xFUL << CAN_MCAN_DBTP_DSJW_POS)
54 #define CAN_MCAN_DBTP_DSJW           CAN_MCAN_DBTP_DSJW_MSK
55 /* Data time segment after sample point */
56 #define CAN_MCAN_DBTP_DTSEG2_POS     (4U)
57 #define CAN_MCAN_DBTP_DTSEG2_MSK     (0xFUL << CAN_MCAN_DBTP_DTSEG2_POS)
58 #define CAN_MCAN_DBTP_DTSEG2         CAN_MCAN_DBTP_DTSEG2_MSK
59 /* Data time segment before sample point */
60 #define CAN_MCAN_DBTP_DTSEG1_POS     (8U)
61 #define CAN_MCAN_DBTP_DTSEG1_MSK     (0x1FUL << CAN_MCAN_DBTP_DTSEG1_POS)
62 #define CAN_MCAN_DBTP_DTSEG1         CAN_MCAN_DBTP_DTSEG1_MSK
63 /* Data BIt Rate Prescaler */
64 #define CAN_MCAN_DBTP_DBRP_POS       (16U)
65 #define CAN_MCAN_DBTP_DBRP_MSK       (0x1FUL << CAN_MCAN_DBTP_DBRP_POS)
66 #define CAN_MCAN_DBTP_DBRP           CAN_MCAN_DBTP_DBRP_MSK
67 /* Transceiver Delay Compensation */
68 #define CAN_MCAN_DBTP_TDC_POS        (23U)
69 #define CAN_MCAN_DBTP_TDC_MSK        (0x1UL << CAN_MCAN_DBTP_TDC_POS)
70 #define CAN_MCAN_DBTP_TDC            CAN_MCAN_DBTP_TDC_MSK
71 
72 /***************  Bit definition for CAN_MCAN_TEST register  *****************/
73 /* Loop Back mode */
74 #define CAN_MCAN_TEST_LBCK_POS       (4U)
75 #define CAN_MCAN_TEST_LBCK_MSK       (0x1UL << CAN_MCAN_TEST_LBCK_POS)
76 #define CAN_MCAN_TEST_LBCK           CAN_MCAN_TEST_LBCK_MSK
77 /* Control of Transmit Pin */
78 #define CAN_MCAN_TEST_TX_POS         (5U)
79 #define CAN_MCAN_TEST_TX_MSK         (0x3UL << CAN_MCAN_TEST_TX_POS)
80 #define CAN_MCAN_TEST_TX             CAN_MCAN_TEST_TX_MSK
81 /* Receive Pin */
82 #define CAN_MCAN_TEST_RX_POS         (7U)
83 #define CAN_MCAN_TEST_RX_MSK         (0x1UL << CAN_MCAN_TEST_RX_POS)
84 #define CAN_MCAN_TEST_RX             CAN_MCAN_TEST_RX_MSK
85 /* Does not exist on STM32 begin */
86 /* Tx Buffer Number Prepared */
87 #define CAN_MCAN_TEST_TXBNP_POS      (8U)
88 #define CAN_MCAN_TEST_TXBNP_MSK      (0x1FUL << CAN_MCAN_TEST_TXBNP_POS)
89 #define CAN_MCAN_TEST_TXBNP          CAN_MCAN_TEST_RX_MSK
90 /* Prepared Valid */
91 #define CAN_MCAN_TEST_PVAL_POS       (13U)
92 #define CAN_MCAN_TEST_PVAL_MSK       (0x1UL << CAN_MCAN_TEST_PVAL_POS)
93 #define CAN_MCAN_TEST_PVAL           CAN_MCAN_TEST_RX_MSK
94 /* Tx Buffer Number Started */
95 #define CAN_MCAN_TEST_TXBNS_POS      (16U)
96 #define CAN_MCAN_TEST_TXBNS_MSK      (0x1FUL << CAN_MCAN_TEST_TXBNS_POS)
97 #define CAN_MCAN_TEST_TXBNS          CAN_MCAN_TEST_RX_MSK
98 /* Started Valid */
99 #define CAN_MCAN_TEST_SVAL_POS       (12U)
100 #define CAN_MCAN_TEST_SVAL_MSK       (0x1UL << CAN_MCAN_TEST_SVAL_POS)
101 #define CAN_MCAN_TEST_SVAL           CAN_MCAN_TEST_RX_MSK
102 /* Does not exist on STM32 end */
103 
104 /***************  Bit definition for CAN_MCAN_RWD register  ******************/
105 /* Watchdog configuration */
106 #define CAN_MCAN_RWD_WDC_POS         (0U)
107 #define CAN_MCAN_RWD_WDC_MSK         (0xFFUL << CAN_MCAN_RWD_WDC_POS)
108 #define CAN_MCAN_RWD_WDC             CAN_MCAN_RWD_WDC_MSK
109 /* Watchdog value */
110 #define CAN_MCAN_RWD_WDV_POS         (8U)
111 #define CAN_MCAN_RWD_WDV_MSK         (0xFFUL << CAN_MCAN_RWD_WDV_POS)
112 #define CAN_MCAN_RWD_WDV             CAN_MCAN_RWD_WDV_MSK
113 
114 /***************  Bit definition for CAN_MCAN_CCCR register  ******************/
115 /* Initialization */
116 #define CAN_MCAN_CCCR_INIT_POS       (0U)
117 #define CAN_MCAN_CCCR_INIT_MSK       (0x1UL << CAN_MCAN_CCCR_INIT_POS)
118 #define CAN_MCAN_CCCR_INIT           CAN_MCAN_CCCR_INIT_MSK
119 /* Configuration Change Enable */
120 #define CAN_MCAN_CCCR_CCE_POS        (1U)
121 #define CAN_MCAN_CCCR_CCE_MSK        (0x1UL << CAN_MCAN_CCCR_CCE_POS)
122 #define CAN_MCAN_CCCR_CCE            CAN_MCAN_CCCR_CCE_MSK
123 /* ASM Restricted Operation Mode */
124 #define CAN_MCAN_CCCR_ASM_POS        (2U)
125 #define CAN_MCAN_CCCR_ASM_MSK        (0x1UL << CAN_MCAN_CCCR_ASM_POS)
126 #define CAN_MCAN_CCCR_ASM            CAN_MCAN_CCCR_ASM_MSK
127 /* Clock Stop Acknowledge */
128 #define CAN_MCAN_CCCR_CSA_POS        (3U)
129 #define CAN_MCAN_CCCR_CSA_MSK        (0x1UL << CAN_MCAN_CCCR_CSA_POS)
130 #define CAN_MCAN_CCCR_CSA            CAN_MCAN_CCCR_CSA_MSK
131 /* Clock Stop Request */
132 #define CAN_MCAN_CCCR_CSR_POS        (4U)
133 #define CAN_MCAN_CCCR_CSR_MSK        (0x1UL << CAN_MCAN_CCCR_CSR_POS)
134 #define CAN_MCAN_CCCR_CSR            CAN_MCAN_CCCR_CSR_MSK
135 /* Bus Monitoring Mode */
136 #define CAN_MCAN_CCCR_MON_POS        (5U)
137 #define CAN_MCAN_CCCR_MON_MSK        (0x1UL << CAN_MCAN_CCCR_MON_POS)
138 #define CAN_MCAN_CCCR_MON            CAN_MCAN_CCCR_MON_MSK
139 /* Disable Automatic Retransmission */
140 #define CAN_MCAN_CCCR_DAR_POS        (6U)
141 #define CAN_MCAN_CCCR_DAR_MSK        (0x1UL << CAN_MCAN_CCCR_DAR_POS)
142 #define CAN_MCAN_CCCR_DAR            CAN_MCAN_CCCR_DAR_MSK
143 /* Test Mode Enable */
144 #define CAN_MCAN_CCCR_TEST_POS       (7U)
145 #define CAN_MCAN_CCCR_TEST_MSK       (0x1UL << CAN_MCAN_CCCR_TEST_POS)
146 #define CAN_MCAN_CCCR_TEST           CAN_MCAN_CCCR_TEST_MSK
147 /* FD Operation Enable */
148 #define CAN_MCAN_CCCR_FDOE_POS       (8U)
149 #define CAN_MCAN_CCCR_FDOE_MSK       (0x1UL << CAN_MCAN_CCCR_FDOE_POS)
150 #define CAN_MCAN_CCCR_FDOE           CAN_MCAN_CCCR_FDOE_MSK
151 /* FDCAN Bit Rate Switching */
152 #define CAN_MCAN_CCCR_BRSE_POS       (9U)
153 #define CAN_MCAN_CCCR_BRSE_MSK       (0x1UL << CAN_MCAN_CCCR_BRSE_POS)
154 #define CAN_MCAN_CCCR_BRSE           CAN_MCAN_CCCR_BRSE_MSK
155 /* does not exist on stm32 begin*/
156 /* Use Timestamping Uni */
157 #define CAN_MCAN_CCCR_UTSU_POS       (10U)
158 #define CAN_MCAN_CCCR_UTSU_MSK       (0x1UL << CAN_MCAN_CCCR_UTSU_POS)
159 #define CAN_MCAN_CCCR_UTSU           CAN_MCAN_CCCR_UTSU_MSK
160 /* FDCAN Wide Message Marker */
161 #define CAN_MCAN_CCCR_WMM_POS       (11U)
162 #define CAN_MCAN_CCCR_WMM_MSK       (0x1UL << CAN_MCAN_CCCR_WMM_POS)
163 #define CAN_MCAN_CCCR_WMM           CAN_MCAN_CCCR_WMM_MSK
164 /* end */
165 /* Protocol Exception Handling Disable */
166 #define CAN_MCAN_CCCR_PXHD_POS       (12U)
167 #define CAN_MCAN_CCCR_PXHD_MSK       (0x1UL << CAN_MCAN_CCCR_PXHD_POS)
168 #define CAN_MCAN_CCCR_PXHD           CAN_MCAN_CCCR_PXHD_MSK
169 /* Edge Filtering during Bus Integration */
170 #define CAN_MCAN_CCCR_EFBI_POS       (13U)
171 #define CAN_MCAN_CCCR_EFBI_MSK       (0x1UL << CAN_MCAN_CCCR_EFBI_POS)
172 #define CAN_MCAN_CCCR_EFBI           CAN_MCAN_CCCR_EFBI_MSK
173 /* Two CAN bit times Pause */
174 #define CAN_MCAN_CCCR_TXP_POS        (14U)
175 #define CAN_MCAN_CCCR_TXP_MSK        (0x1UL << CAN_MCAN_CCCR_TXP_POS)
176 #define CAN_MCAN_CCCR_TXP            CAN_MCAN_CCCR_TXP_MSK
177 /* Non ISO Operation */
178 #define CAN_MCAN_CCCR_NISO_POS       (15U)
179 #define CAN_MCAN_CCCR_NISO_MSK       (0x1UL << CAN_MCAN_CCCR_NISO_POS)
180 #define CAN_MCAN_CCCR_NISO           CAN_MCAN_CCCR_NISO_MSK
181 
182 /***************  Bit definition for CAN_MCAN_NBTP register  ******************/
183 /* Nominal Time segment after sample point */
184 #define CAN_MCAN_NBTP_NTSEG2_POS     (0U)
185 #define CAN_MCAN_NBTP_NTSEG2_MSK     (0x7FUL << CAN_MCAN_NBTP_NTSEG2_POS)
186 #define CAN_MCAN_NBTP_NTSEG2         CAN_MCAN_NBTP_NTSEG2_MSK
187 /* Nominal Time segment before sample point */
188 #define CAN_MCAN_NBTP_NTSEG1_POS     (8U)
189 #define CAN_MCAN_NBTP_NTSEG1_MSK     (0xFFUL << CAN_MCAN_NBTP_NTSEG1_POS)
190 #define CAN_MCAN_NBTP_NTSEG1         CAN_MCAN_NBTP_NTSEG1_MSK
191 /* Bit Rate Prescaler */
192 #define CAN_MCAN_NBTP_NBRP_POS       (16U)
193 #define CAN_MCAN_NBTP_NBRP_MSK       (0x1FFUL << CAN_MCAN_NBTP_NBRP_POS)
194 #define CAN_MCAN_NBTP_NBRP           CAN_MCAN_NBTP_NBRP_MSK
195 /* Nominal (Re)Synchronization Jump Width */
196 #define CAN_MCAN_NBTP_NSJW_POS       (25U)
197 #define CAN_MCAN_NBTP_NSJW_MSK       (0x7FUL << CAN_MCAN_NBTP_NSJW_POS)
198 #define CAN_MCAN_NBTP_NSJW           CAN_MCAN_NBTP_NSJW_MSK
199 
200 /***************  Bit definition for CAN_MCAN_TSCC register  ******************/
201 /* Timestamp Select */
202 #define CAN_MCAN_TSCC_TSS_POS        (0U)
203 #define CAN_MCAN_TSCC_TSS_MSK        (0x3UL << CAN_MCAN_TSCC_TSS_POS)
204 #define CAN_MCAN_TSCC_TSS            CAN_MCAN_TSCC_TSS_MSK
205 /* Timestamp Counter Prescaler */
206 #define CAN_MCAN_TSCC_TCP_POS        (16U)
207 #define CAN_MCAN_TSCC_TCP_MSK        (0xFUL << CAN_MCAN_TSCC_TCP_POS)
208 #define CAN_MCAN_TSCC_TCP            CAN_MCAN_TSCC_TCP_MSK
209 /***************  Bit definition for CAN_MCAN_TSCV register  ******************/
210 /* Timestamp Counter */
211 #define CAN_MCAN_TSCV_TSC_POS        (0U)
212 #define CAN_MCAN_TSCV_TSC_MSK        (0xFFFFUL << CAN_MCAN_TSCV_TSC_POS)
213 #define CAN_MCAN_TSCV_TSC            CAN_MCAN_TSCV_TSC_MSK
214 
215 /***************  Bit definition for CAN_MCAN_TOCC register  ******************/
216 /* Enable Timeout Counter */
217 #define CAN_MCAN_TOCC_ETOC_POS       (0U)
218 #define CAN_MCAN_TOCC_ETOC_MSK       (0x1UL << CAN_MCAN_TOCC_ETOC_POS)
219 #define CAN_MCAN_TOCC_ETOC           CAN_MCAN_TOCC_ETOC_MSK
220 /* Timeout Select */
221 #define CAN_MCAN_TOCC_TOS_POS        (1U)
222 #define CAN_MCAN_TOCC_TOS_MSK        (0x3UL << CAN_MCAN_TOCC_TOS_POS)
223 #define CAN_MCAN_TOCC_TOS            CAN_MCAN_TOCC_TOS_MSK
224 /* Timeout Period */
225 #define CAN_MCAN_TOCC_TOP_POS        (16U)
226 #define CAN_MCAN_TOCC_TOP_MSK        (0xFFFFUL << CAN_MCAN_TOCC_TOP_POS)
227 #define CAN_MCAN_TOCC_TOP            CAN_MCAN_TOCC_TOP_MSK
228 
229 /***************  Bit definition for CAN_MCAN_TOCV register  ******************/
230 /* Timeout Counter */
231 #define CAN_MCAN_TOCV_TOC_POS        (0U)
232 #define CAN_MCAN_TOCV_TOC_MSK        (0xFFFFUL << CAN_MCAN_TOCV_TOC_POS)
233 #define CAN_MCAN_TOCV_TOC            CAN_MCAN_TOCV_TOC_MSK
234 
235 /***************  Bit definition for CAN_MCAN_ECR register  *******************/
236 /* Transmit Error Counter */
237 #define CAN_MCAN_ECR_TEC_POS         (0U)
238 #define CAN_MCAN_ECR_TEC_MSK         (0xFFUL << CAN_MCAN_ECR_TEC_POS)
239 #define CAN_MCAN_ECR_TEC             CAN_MCAN_ECR_TEC_MSK
240 /* Receive Error Counter */
241 #define CAN_MCAN_ECR_REC_POS         (8U)
242 #define CAN_MCAN_ECR_REC_MSK         (0x7FUL << CAN_MCAN_ECR_REC_POS)
243 #define CAN_MCAN_ECR_REC             CAN_MCAN_ECR_REC_MSK
244 /* Receive Error Passive */
245 #define CAN_MCAN_ECR_RP_POS          (15U)
246 #define CAN_MCAN_ECR_RP_MSK          (0x1UL << CAN_MCAN_ECR_RP_POS)
247 #define CAN_MCAN_ECR_RP              CAN_MCAN_ECR_RP_MSK
248 /* CAN Error Logging */
249 #define CAN_MCAN_ECR_CEL_POS         (16U)
250 #define CAN_MCAN_ECR_CEL_MSK         (0xFFUL << CAN_MCAN_ECR_CEL_POS)
251 #define CAN_MCAN_ECR_CEL             CAN_MCAN_ECR_CEL_MSK
252 
253 /***************  Bit definition for CAN_MCAN_PSR register  *******************/
254 /* Last Error Code */
255 #define CAN_MCAN_PSR_LEC_POS         (0U)
256 #define CAN_MCAN_PSR_LEC_MSK         (0x7UL << CAN_MCAN_PSR_LEC_POS)
257 #define CAN_MCAN_PSR_LEC             CAN_MCAN_PSR_LEC_MSK
258 /* Activity */
259 #define CAN_MCAN_PSR_ACT_POS         (3U)
260 #define CAN_MCAN_PSR_ACT_MSK         (0x3UL << CAN_MCAN_PSR_ACT_POS)
261 #define CAN_MCAN_PSR_ACT             CAN_MCAN_PSR_ACT_MSK
262 /* Error Passive */
263 #define CAN_MCAN_PSR_EP_POS          (5U)
264 #define CAN_MCAN_PSR_EP_MSK          (0x1UL << CAN_MCAN_PSR_EP_POS)
265 #define CAN_MCAN_PSR_EP              CAN_MCAN_PSR_EP_MSK
266 /* Warning Status */
267 #define CAN_MCAN_PSR_EW_POS          (6U)
268 #define CAN_MCAN_PSR_EW_MSK          (0x1UL << CAN_MCAN_PSR_EW_POS)
269 #define CAN_MCAN_PSR_EW              CAN_MCAN_PSR_EW_MSK
270 /* Bus_Off Status */
271 #define CAN_MCAN_PSR_BO_POS          (7U)
272 #define CAN_MCAN_PSR_BO_MSK          (0x1UL << CAN_MCAN_PSR_BO_POS)
273 #define CAN_MCAN_PSR_BO              CAN_MCAN_PSR_BO_MSK
274 /* Data Last Error Code */
275 #define CAN_MCAN_PSR_DLEC_POS        (8U)
276 #define CAN_MCAN_PSR_DLEC_MSK        (0x7UL << CAN_MCAN_PSR_DLEC_POS)
277 #define CAN_MCAN_PSR_DLEC            CAN_MCAN_PSR_DLEC_MSK
278 /* ESI flag of last received FDCAN Message */
279 #define CAN_MCAN_PSR_RESI_POS        (11U)
280 #define CAN_MCAN_PSR_RESI_MSK        (0x1UL << CAN_MCAN_PSR_RESI_POS)
281 #define CAN_MCAN_PSR_RESI            CAN_MCAN_PSR_RESI_MSK
282 /* BRS flag of last received FDCAN Message */
283 #define CAN_MCAN_PSR_RBRS_POS        (12U)
284 #define CAN_MCAN_PSR_RBRS_MSK        (0x1UL << CAN_MCAN_PSR_RBRS_POS)
285 #define CAN_MCAN_PSR_RBRS            CAN_MCAN_PSR_RBRS_MSK
286 /* Received FDCAN Message */
287 #define CAN_MCAN_PSR_REDL_POS        (13U)
288 #define CAN_MCAN_PSR_REDL_MSK        (0x1UL << CAN_MCAN_PSR_REDL_POS)
289 #define CAN_MCAN_PSR_REDL            CAN_MCAN_PSR_REDL_MSK
290 /* Protocol Exception Event */
291 #define CAN_MCAN_PSR_PXE_POS         (14U)
292 #define CAN_MCAN_PSR_PXE_MSK         (0x1UL << CAN_MCAN_PSR_PXE_POS)
293 #define CAN_MCAN_PSR_PXE             CAN_MCAN_PSR_PXE_MSK
294  /* Transmitter Delay Compensation Value */
295 #define CAN_MCAN_PSR_TDCV_POS        (16U)
296 #define CAN_MCAN_PSR_TDCV_MSK        (0x7FUL << CAN_MCAN_PSR_TDCV_POS)
297 #define CAN_MCAN_PSR_TDCV            CAN_MCAN_PSR_TDCV_MSK
298 
299 /***************  Bit definition for CAN_MCAN_TDCR register  ******************/
300 /* Transmitter Delay Compensation Filter */
301 #define CAN_MCAN_TDCR_TDCF_POS       (0U)
302 #define CAN_MCAN_TDCR_TDCF_MSK       (0x7FUL << CAN_MCAN_TDCR_TDCF_POS)
303 #define CAN_MCAN_TDCR_TDCF           CAN_MCAN_TDCR_TDCF_MSK
304 /* Transmitter Delay Compensation Offset */
305 #define CAN_MCAN_TDCR_TDCO_POS       (8U)
306 #define CAN_MCAN_TDCR_TDCO_MSK       (0x7FUL << CAN_MCAN_TDCR_TDCO_POS)
307 #define CAN_MCAN_TDCR_TDCO           CAN_MCAN_TDCR_TDCO_MSK
308 
309 /***************  Bit definition for CAN_MCAN_IR register  ********************/
310 #ifdef CONFIG_CAN_STM32FD
311 /* Rx FIFO 0 New Message */
312 #define CAN_MCAN_IR_RF0N_POS         (0U)
313 #define CAN_MCAN_IR_RF0N_MSK         (0x1UL << CAN_MCAN_IR_RF0N_POS)
314 #define CAN_MCAN_IR_RF0N             CAN_MCAN_IR_RF0N_MSK
315 /* Rx FIFO 0 Full */
316 #define CAN_MCAN_IR_RF0F_POS         (1U)
317 #define CAN_MCAN_IR_RF0F_MSK         (0x1UL << CAN_MCAN_IR_RF0F_POS)
318 #define CAN_MCAN_IR_RF0F             CAN_MCAN_IR_RF0F_MSK
319 /* Rx FIFO 0 Message Lost */
320 #define CAN_MCAN_IR_RF0L_POS         (2U)
321 #define CAN_MCAN_IR_RF0L_MSK         (0x1UL << CAN_MCAN_IR_RF0L_POS)
322 #define CAN_MCAN_IR_RF0L             CAN_MCAN_IR_RF0L_MSK
323 /* Rx FIFO 1 New Message */
324 #define CAN_MCAN_IR_RF1N_POS         (3U)
325 #define CAN_MCAN_IR_RF1N_MSK         (0x1UL << CAN_MCAN_IR_RF1N_POS)
326 #define CAN_MCAN_IR_RF1N             CAN_MCAN_IR_RF1N_MSK
327 /* Rx FIFO 1 Full */
328 #define CAN_MCAN_IR_RF1F_POS         (4U)
329 #define CAN_MCAN_IR_RF1F_MSK         (0x1UL << CAN_MCAN_IR_RF1F_POS)
330 #define CAN_MCAN_IR_RF1F             CAN_MCAN_IR_RF1F_MSK
331 /* Rx FIFO 1 Message Lost */
332 #define CAN_MCAN_IR_RF1L_POS         (5U)
333 #define CAN_MCAN_IR_RF1L_MSK         (0x1UL << CAN_MCAN_IR_RF1L_POS)
334 #define CAN_MCAN_IR_RF1L             CAN_MCAN_IR_RF1L_MSK
335 /* High Priority Message */
336 #define CAN_MCAN_IR_HPM_POS          (6U)
337 #define CAN_MCAN_IR_HPM_MSK          (0x1UL << CAN_MCAN_IR_HPM_POS)
338 #define CAN_MCAN_IR_HPM              CAN_MCAN_IR_HPM_MSK
339 /* Transmission Completed     */
340 #define CAN_MCAN_IR_TC_POS           (7U)
341 #define CAN_MCAN_IR_TC_MSK           (0x1UL << CAN_MCAN_IR_TC_POS)
342 #define CAN_MCAN_IR_TC               CAN_MCAN_IR_TC_MSK
343 /* Transmission Cancellation Finished */
344 #define CAN_MCAN_IR_TCF_POS          (8U)
345 #define CAN_MCAN_IR_TCF_MSK          (0x1UL << CAN_MCAN_IR_TCF_POS)
346 #define CAN_MCAN_IR_TCF              CAN_MCAN_IR_TCF_MSK
347 /* Tx FIFO Empty */
348 #define CAN_MCAN_IR_TFE_POS          (9U)
349 #define CAN_MCAN_IR_TFE_MSK          (0x1UL << CAN_MCAN_IR_TFE_POS)
350 #define CAN_MCAN_IR_TFE              CAN_MCAN_IR_TFE_MSK
351 /* Tx Event FIFO New Entry */
352 #define CAN_MCAN_IR_TEFN_POS         (10U)
353 #define CAN_MCAN_IR_TEFN_MSK         (0x1UL << CAN_MCAN_IR_TEFN_POS)
354 #define CAN_MCAN_IR_TEFN             CAN_MCAN_IR_TEFN_MSK
355 /* Tx Event FIFO Full */
356 #define CAN_MCAN_IR_TEFF_POS         (11U)
357 #define CAN_MCAN_IR_TEFF_MSK         (0x1UL << CAN_MCAN_IR_TEFF_POS)
358 #define CAN_MCAN_IR_TEFF             CAN_MCAN_IR_TEFF_MSK
359 /* Tx Event FIFO Element Lost */
360 #define CAN_MCAN_IR_TEFL_POS         (12U)
361 #define CAN_MCAN_IR_TEFL_MSK         (0x1UL << CAN_MCAN_IR_TEFL_POS)
362 #define CAN_MCAN_IR_TEFL             CAN_MCAN_IR_TEFL_MSK
363 /* Timestamp Wraparound */
364 #define CAN_MCAN_IR_TSW_POS          (13U)
365 #define CAN_MCAN_IR_TSW_MSK          (0x1UL << CAN_MCAN_IR_TSW_POS)
366 #define CAN_MCAN_IR_TSW              CAN_MCAN_IR_TSW_MSK
367 /* Message RAM Access Failure */
368 #define CAN_MCAN_IR_MRAF_POS         (14U)
369 #define CAN_MCAN_IR_MRAF_MSK         (0x1UL << CAN_MCAN_IR_MRAF_POS)
370 #define CAN_MCAN_IR_MRAF             CAN_MCAN_IR_MRAF_MSK
371 /* Timeout Occurred */
372 #define CAN_MCAN_IR_TOO_POS          (15U)
373 #define CAN_MCAN_IR_TOO_MSK          (0x1UL << CAN_MCAN_IR_TOO_POS)
374 #define CAN_MCAN_IR_TOO              CAN_MCAN_IR_TOO_MSK
375 /* Error Logging Overflow */
376 #define CAN_MCAN_IR_ELO_POS          (16U)
377 #define CAN_MCAN_IR_ELO_MSK          (0x1UL << CAN_MCAN_IR_ELO_POS)
378 #define CAN_MCAN_IR_ELO              CAN_MCAN_IR_ELO_MSK
379 /* Error Passive */
380 #define CAN_MCAN_IR_EP_POS           (17U)
381 #define CAN_MCAN_IR_EP_MSK           (0x1UL << CAN_MCAN_IR_EP_POS)
382 #define CAN_MCAN_IR_EP               CAN_MCAN_IR_EP_MSK
383 /* Warning Status */
384 #define CAN_MCAN_IR_EW_POS           (18U)
385 #define CAN_MCAN_IR_EW_MSK           (0x1UL << CAN_MCAN_IR_EW_POS)
386 #define CAN_MCAN_IR_EW               CAN_MCAN_IR_EW_MSK
387 /* Bus_Off Status */
388 #define CAN_MCAN_IR_BO_POS           (19U)
389 #define CAN_MCAN_IR_BO_MSK           (0x1UL << CAN_MCAN_IR_BO_POS)
390 #define CAN_MCAN_IR_BO                CAN_MCAN_IR_BO_MSK
391 /* Watchdog Interrupt */
392 #define CAN_MCAN_IR_WDI_POS          (20U)
393 #define CAN_MCAN_IR_WDI_MSK          (0x1UL << CAN_MCAN_IR_WDI_POS)
394 #define CAN_MCAN_IR_WDI              CAN_MCAN_IR_WDI_MSK
395 /* Protocol Error in Arbitration Phase */
396 #define CAN_MCAN_IR_PEA_POS          (21U)
397 #define CAN_MCAN_IR_PEA_MSK          (0x1UL << CAN_MCAN_IR_PEA_POS)
398 #define CAN_MCAN_IR_PEA              CAN_MCAN_IR_PEA_MSK
399 /* Protocol Error in Data Phase */
400 #define CAN_MCAN_IR_PED_POS          (22U)
401 #define CAN_MCAN_IR_PED_MSK          (0x1UL << CAN_MCAN_IR_PED_POS)
402 #define CAN_MCAN_IR_PED              CAN_MCAN_IR_PED_MSK
403  /* Access to Reserved Address */
404 #define CAN_MCAN_IR_ARA_POS          (23U)
405 #define CAN_MCAN_IR_ARA_MSK          (0x1UL << CAN_MCAN_IR_ARA_POS)
406 #define CAN_MCAN_IR_ARA              CAN_MCAN_IR_ARA_MSK
407 
408 #else /* CONFIG_CAN_STM32FD */
409 
410 /* Rx FIFO 0 New Message */
411 #define CAN_MCAN_IR_RF0N_POS         (0U)
412 #define CAN_MCAN_IR_RF0N_MSK         (0x1UL << CAN_MCAN_IR_RF0N_POS)
413 #define CAN_MCAN_IR_RF0N             CAN_MCAN_IR_RF0N_MSK
414 /* Rx FIFO 0 Watermark Reached*/
415 #define CAN_MCAN_IR_RF0W_POS         (1U)
416 #define CAN_MCAN_IR_RF0W_MSK         (0x1UL << CAN_MCAN_IR_RF0W_POS)
417 #define CAN_MCAN_IR_RF0W             CAN_MCAN_IR_RF0W_MSK
418 /* Rx FIFO 0 Full */
419 #define CAN_MCAN_IR_RF0F_POS         (2U)
420 #define CAN_MCAN_IR_RF0F_MSK         (0x1UL << CAN_MCAN_IR_RF0F_POS)
421 #define CAN_MCAN_IR_RF0F             CAN_MCAN_IR_RF0F_MSK
422 /* Rx FIFO 0 Message Lost */
423 #define CAN_MCAN_IR_RF0L_POS         (3U)
424 #define CAN_MCAN_IR_RF0L_MSK         (0x1UL << CAN_MCAN_IR_RF0L_POS)
425 #define CAN_MCAN_IR_RF0L             CAN_MCAN_IR_RF0L_MSK
426 /* Rx FIFO 1 New Message */
427 #define CAN_MCAN_IR_RF1N_POS         (4U)
428 #define CAN_MCAN_IR_RF1N_MSK         (0x1UL << CAN_MCAN_IR_RF1N_POS)
429 #define CAN_MCAN_IR_RF1N             CAN_MCAN_IR_RF1N_MSK
430 /* Rx FIFO 1 Watermark Reached*/
431 #define CAN_MCAN_IR_RF1W_POS         (5U)
432 #define CAN_MCAN_IR_RF1W_MSK         (0x1UL << CAN_MCAN_IR_RF1W_POS)
433 #define CAN_MCAN_IR_RF1W             CAN_MCAN_IR_RF1W_MSK
434 /* Rx FIFO 1 Full */
435 #define CAN_MCAN_IR_RF1F_POS         (6U)
436 #define CAN_MCAN_IR_RF1F_MSK         (0x1UL << CAN_MCAN_IR_RF1F_POS)
437 #define CAN_MCAN_IR_RF1F             CAN_MCAN_IR_RF1F_MSK
438 /* Rx FIFO 1 Message Lost */
439 #define CAN_MCAN_IR_RF1L_POS         (7U)
440 #define CAN_MCAN_IR_RF1L_MSK         (0x1UL << CAN_MCAN_IR_RF1L_POS)
441 #define CAN_MCAN_IR_RF1L             CAN_MCAN_IR_RF1L_MSK
442 /* High Priority Message */
443 #define CAN_MCAN_IR_HPM_POS          (8U)
444 #define CAN_MCAN_IR_HPM_MSK          (0x1UL << CAN_MCAN_IR_HPM_POS)
445 #define CAN_MCAN_IR_HPM              CAN_MCAN_IR_HPM_MSK
446 /* Transmission Completed */
447 #define CAN_MCAN_IR_TC_POS           (9U)
448 #define CAN_MCAN_IR_TC_MSK           (0x1UL << CAN_MCAN_IR_TC_POS)
449 #define CAN_MCAN_IR_TC               CAN_MCAN_IR_TC_MSK
450 /* Transmission Cancellation Finished */
451 #define CAN_MCAN_IR_TCF_POS          (10U)
452 #define CAN_MCAN_IR_TCF_MSK          (0x1UL << CAN_MCAN_IR_TCF_POS)
453 #define CAN_MCAN_IR_TCF              CAN_MCAN_IR_TCF_MSK
454 /* Tx FIFO Empty */
455 #define CAN_MCAN_IR_TFE_POS          (11U)
456 #define CAN_MCAN_IR_TFE_MSK          (0x1UL << CAN_MCAN_IR_TFE_POS)
457 #define CAN_MCAN_IR_TFE              CAN_MCAN_IR_TFE_MSK
458 /* Tx Event FIFO New Entry */
459 #define CAN_MCAN_IR_TEFN_POS         (12U)
460 #define CAN_MCAN_IR_TEFN_MSK         (0x1UL << CAN_MCAN_IR_TEFN_POS)
461 #define CAN_MCAN_IR_TEFN             CAN_MCAN_IR_TEFN_MSK
462 /* Tx Event FIFO Watermark */
463 #define CAN_MCAN_IR_TEFW_POS         (13U)
464 #define CAN_MCAN_IR_TEFW_MSK         (0x1UL << CAN_MCAN_IR_TEFW_POS)
465 #define CAN_MCAN_IR_TEFW             CAN_MCAN_IR_TEFW_MSK
466 /* Tx Event FIFO Full */
467 #define CAN_MCAN_IR_TEFF_POS         (14U)
468 #define CAN_MCAN_IR_TEFF_MSK         (0x1UL << CAN_MCAN_IR_TEFF_POS)
469 #define CAN_MCAN_IR_TEFF             CAN_MCAN_IR_TEFF_MSK
470 /* Tx Event FIFO Element Lost */
471 #define CAN_MCAN_IR_TEFL_POS         (15U)
472 #define CAN_MCAN_IR_TEFL_MSK         (0x1UL << CAN_MCAN_IR_TEFL_POS)
473 #define CAN_MCAN_IR_TEFL             CAN_MCAN_IR_TEFL_MSK
474 /* Timestamp Wraparound */
475 #define CAN_MCAN_IR_TSW_POS          (16U)
476 #define CAN_MCAN_IR_TSW_MSK          (0x1UL << CAN_MCAN_IR_TSW_POS)
477 #define CAN_MCAN_IR_TSW              CAN_MCAN_IR_TSW_MSK
478 /* Message RAM Access Failure */
479 #define CAN_MCAN_IR_MRAF_POS         (17U)
480 #define CAN_MCAN_IR_MRAF_MSK         (0x1UL << CAN_MCAN_IR_MRAF_POS)
481 #define CAN_MCAN_IR_MRAF             CAN_MCAN_IR_MRAF_MSK
482 /* Timeout Occurred */
483 #define CAN_MCAN_IR_TOO_POS          (18U)
484 #define CAN_MCAN_IR_TOO_MSK          (0x1UL << CAN_MCAN_IR_TOO_POS)
485 #define CAN_MCAN_IR_TOO              CAN_MCAN_IR_TOO_MSK
486 /* Message stored to Dedicated Rx Buffer */
487 #define CAN_MCAN_IR_DRX_POS          (19U)
488 #define CAN_MCAN_IR_DRX_MSK          (0x1UL << CAN_MCAN_IR_DRX_POS)
489 #define CAN_MCAN_IR_DRX              CAN_MCAN_IR_DRX_MSK
490 /* Bit Error Corrected */
491 #define CAN_MCAN_IR_BEC_POS          (20U)
492 #define CAN_MCAN_IR_BEC_MSK          (0x1UL << CAN_MCAN_IR_BEC_POS)
493 #define CAN_MCAN_IR_BEC              CAN_MCAN_IR_BEC_MSK
494 /* Bit Error Uncorrected */
495 #define CAN_MCAN_IR_BEU_POS          (21U)
496 #define CAN_MCAN_IR_BEU_MSK          (0x1UL << CAN_MCAN_IR_BEU_POS)
497 #define CAN_MCAN_IR_BEU              CAN_MCAN_IR_BEU_MSK
498 /* Error Logging Overflow */
499 #define CAN_MCAN_IR_ELO_POS          (22U)
500 #define CAN_MCAN_IR_ELO_MSK          (0x1UL << CAN_MCAN_IR_ELO_POS)
501 #define CAN_MCAN_IR_ELO              CAN_MCAN_IR_ELO_MSK
502 /* Error Passive*/
503 #define CAN_MCAN_IR_EP_POS           (23U)
504 #define CAN_MCAN_IR_EP_MSK           (0x1UL << CAN_MCAN_IR_EP_POS)
505 #define CAN_MCAN_IR_EP               CAN_MCAN_IR_EP_MSK
506 /* Warning Status*/
507 #define CAN_MCAN_IR_EW_POS           (24U)
508 #define CAN_MCAN_IR_EW_MSK           (0x1UL << CAN_MCAN_IR_EW_POS)
509 #define CAN_MCAN_IR_EW               CAN_MCAN_IR_EW_MSK
510 /* Bus_Off Status*/
511 #define CAN_MCAN_IR_BO_POS           (25U)
512 #define CAN_MCAN_IR_BO_MSK           (0x1UL << CAN_MCAN_IR_BO_POS)
513 #define CAN_MCAN_IR_BO               CAN_MCAN_IR_BO_MSK
514 /* Watchdog Interrupt */
515 #define CAN_MCAN_IR_WDI_POS          (26U)
516 #define CAN_MCAN_IR_WDI_MSK          (0x1UL << CAN_MCAN_IR_WDI_POS)
517 #define CAN_MCAN_IR_WDI              CAN_MCAN_IR_WDI_MSK
518 /* Protocol Error in Arbitration Phase */
519 #define CAN_MCAN_IR_PEA_POS          (27U)
520 #define CAN_MCAN_IR_PEA_MSK          (0x1UL << CAN_MCAN_IR_PEA_POS)
521 #define CAN_MCAN_IR_PEA              CAN_MCAN_IR_PEA_MSK
522 /* Protocol Error in Data Phase */
523 #define CAN_MCAN_IR_PED_POS          (28U)
524 #define CAN_MCAN_IR_PED_MSK          (0x1UL << CAN_MCAN_IR_PED_POS)
525 #define CAN_MCAN_IR_PED              CAN_MCAN_IR_PED_MSK
526 /* Access to Reserved Address */
527 #define CAN_MCAN_IR_ARA_POS          (29U)
528 #define CAN_MCAN_IR_ARA_MSK          (0x1UL << CAN_MCAN_IR_ARA_POS)
529 #define CAN_MCAN_IR_ARA              CAN_MCAN_IR_ARA_MSK
530 
531 #endif /* CONFIG_CAN_STM32FD */
532 
533 /***************  Bit definition for CAN_MCAN_IE register  ********************/
534 #ifdef CONFIG_CAN_STM32FD
535 /* Rx FIFO 0 New Message Enable */
536 #define CAN_MCAN_IE_RF0N_POS        (0U)
537 #define CAN_MCAN_IE_RF0N_MSK        (0x1UL << CAN_MCAN_IE_RF0N_POS)
538 #define CAN_MCAN_IE_RF0N            CAN_MCAN_IE_RF0N_MSK
539 /* Rx FIFO 0 Full Enable */
540 #define CAN_MCAN_IE_RF0F_POS        (1U)
541 #define CAN_MCAN_IE_RF0F_MSK        (0x1UL << CAN_MCAN_IE_RF0F_POS)
542 #define CAN_MCAN_IE_RF0F            CAN_MCAN_IE_RF0F_MSK
543 /* Rx FIFO 0 Message Lost Enable */
544 #define CAN_MCAN_IE_RF0L_POS        (2U)
545 #define CAN_MCAN_IE_RF0L_MSK        (0x1UL << CAN_MCAN_IE_RF0L_POS)
546 #define CAN_MCAN_IE_RF0L            CAN_MCAN_IE_RF0L_MSK
547 /* Rx FIFO 1 New Message Enable */
548 #define CAN_MCAN_IE_RF1N_POS        (3U)
549 #define CAN_MCAN_IE_RF1N_MSK        (0x1UL << CAN_MCAN_IE_RF1N_POS)
550 #define CAN_MCAN_IE_RF1N            CAN_MCAN_IE_RF1N_MSK
551 /* Rx FIFO 1 Full Enable */
552 #define CAN_MCAN_IE_RF1F_POS        (4U)
553 #define CAN_MCAN_IE_RF1F_MSK        (0x1UL << CAN_MCAN_IE_RF1F_POS)
554 #define CAN_MCAN_IE_RF1F            CAN_MCAN_IE_RF1F_MSK
555 /* Rx FIFO 1 Message Lost Enable */
556 #define CAN_MCAN_IE_RF1L_POS        (5U)
557 #define CAN_MCAN_IE_RF1L_MSK        (0x1UL << CAN_MCAN_IE_RF1L_POS)
558 #define CAN_MCAN_IE_RF1L            CAN_MCAN_IE_RF1L_MSK
559 /* High Priority Message Enable */
560 #define CAN_MCAN_IE_HPM_POS         (6U)
561 #define CAN_MCAN_IE_HPM_MSK         (0x1UL << CAN_MCAN_IE_HPM_POS)
562 #define CAN_MCAN_IE_HPM             CAN_MCAN_IE_HPM_MSK
563 /* Transmission Completed Enable */
564 #define CAN_MCAN_IE_TC_POS          (7U)
565 #define CAN_MCAN_IE_TC_MSK          (0x1UL << CAN_MCAN_IE_TC_POS)
566 #define CAN_MCAN_IE_TC              CAN_MCAN_IE_TC_MSK
567 /* Transmission Cancellation Finished Enable*/
568 #define CAN_MCAN_IE_TCF_POS         (8U)
569 #define CAN_MCAN_IE_TCF_MSK         (0x1UL << CAN_MCAN_IE_TCF_POS)
570 #define CAN_MCAN_IE_TCF             CAN_MCAN_IE_TCF_MSK
571 /* Tx FIFO Empty Enable */
572 #define CAN_MCAN_IE_TFE_POS         (9U)
573 #define CAN_MCAN_IE_TFE_MSK         (0x1UL << CAN_MCAN_IE_TFE_POS)
574 #define CAN_MCAN_IE_TFE             CAN_MCAN_IE_TFE_MSK
575 /* Tx Event FIFO New Entry Enable */
576 #define CAN_MCAN_IE_TEFN_POS        (10U)
577 #define CAN_MCAN_IE_TEFN_MSK        (0x1UL << CAN_MCAN_IE_TEFN_POS)
578 #define CAN_MCAN_IE_TEFN            CAN_MCAN_IE_TEFN_MSK
579 /* Tx Event FIFO Full Enable */
580 #define CAN_MCAN_IE_TEFF_POS        (11U)
581 #define CAN_MCAN_IE_TEFF_MSK        (0x1UL << CAN_MCAN_IE_TEFF_POS)
582 #define CAN_MCAN_IE_TEFF            CAN_MCAN_IE_TEFF_MSK
583 /* Tx Event FIFO Element Lost Enable */
584 #define CAN_MCAN_IE_TEFL_POS        (12U)
585 #define CAN_MCAN_IE_TEFL_MSK        (0x1UL << CAN_MCAN_IE_TEFL_POS)
586 #define CAN_MCAN_IE_TEFL            CAN_MCAN_IE_TEFL_MSK
587  /* Timestamp Wraparound Enable */
588 #define CAN_MCAN_IE_TSW_POS         (13U)
589 #define CAN_MCAN_IE_TSW_MSK         (0x1UL << CAN_MCAN_IE_TSW_POS)
590 #define CAN_MCAN_IE_TSW             CAN_MCAN_IE_TSW_MSK
591 /* Message RAM Access Failure Enable */
592 #define CAN_MCAN_IE_MRAF_POS        (14U)
593 #define CAN_MCAN_IE_MRAF_MSK        (0x1UL << CAN_MCAN_IE_MRAF_POS)
594 #define CAN_MCAN_IE_MRAF            CAN_MCAN_IE_MRAF_MSK
595 /* Timeout Occurred Enable */
596 #define CAN_MCAN_IE_TOO_POS         (15U)
597 #define CAN_MCAN_IE_TOO_MSK         (0x1UL << CAN_MCAN_IE_TOO_POS)
598 #define CAN_MCAN_IE_TOO             CAN_MCAN_IE_TOO_MSK
599 /* Error Logging Overflow Enable */
600 #define CAN_MCAN_IE_ELO_POS         (16U)
601 #define CAN_MCAN_IE_ELO_MSK         (0x1UL << CAN_MCAN_IE_ELO_POS)
602 #define CAN_MCAN_IE_ELO             CAN_MCAN_IE_ELO_MSK
603 /* Error Passive Enable */
604 #define CAN_MCAN_IE_EP_POS          (17U)
605 #define CAN_MCAN_IE_EP_MSK          (0x1UL << CAN_MCAN_IE_EP_POS)
606 #define CAN_MCAN_IE_EP              CAN_MCAN_IE_EP_MSK
607 /* Warning Status Enable */
608 #define CAN_MCAN_IE_EW_POS          (18U)
609 #define CAN_MCAN_IE_EW_MSK          (0x1UL << CAN_MCAN_IE_EW_POS)
610 #define CAN_MCAN_IE_EW              CAN_MCAN_IE_EW_MSK
611 /* Bus_Off Status Enable */
612 #define CAN_MCAN_IE_BO_POS          (19U)
613 #define CAN_MCAN_IE_BO_MSK          (0x1UL << CAN_MCAN_IE_BO_POS)
614 #define CAN_MCAN_IE_BO              CAN_MCAN_IE_BO_MSK
615 /* Watchdog Interrupt Enable  */
616 #define CAN_MCAN_IE_WDI_POS         (20U)
617 #define CAN_MCAN_IE_WDI_MSK         (0x1UL << CAN_MCAN_IE_WDI_POS)
618 #define CAN_MCAN_IE_WDI             CAN_MCAN_IE_WDIE_MSK
619 /* Protocol Error in Arbitration Phase Enable */
620 #define CAN_MCAN_IE_PEA_POS         (21U)
621 #define CAN_MCAN_IE_PEA_MSK         (0x1UL << CAN_MCAN_IE_PEA_POS)
622 #define CAN_MCAN_IE_PEA             CAN_MCAN_IE_PEA_MSK
623 /* Protocol Error in Data Phase Enable */
624 #define CAN_MCAN_IE_PED_POS         (22U)
625 #define CAN_MCAN_IE_PED_MSK         (0x1UL << CAN_MCAN_IE_PED_POS)
626 #define CAN_MCAN_IE_PED             CAN_MCAN_IE_PED_MSK
627 /* Access to Reserved Address Enable */
628 #define CAN_MCAN_IE_ARA_POS         (23U)
629 #define CAN_MCAN_IE_ARA_MSK         (0x1UL << CAN_MCAN_IE_ARA_POS)
630 #define CAN_MCAN_IE_ARA             CAN_MCAN_IE_ARA_MSK
631 
632 #else /* CONFIG_CAN_STM32FD */
633 
634 /* Rx FIFO 0 New Message */
635 #define CAN_MCAN_IE_RF0N_POS         (0U)
636 #define CAN_MCAN_IE_RF0N_MSK         (0x1UL << CAN_MCAN_IE_RF0N_POS)
637 #define CAN_MCAN_IE_RF0N             CAN_MCAN_IE_RF0N_MSK
638 /* Rx FIFO 0 Watermark Reached*/
639 #define CAN_MCAN_IE_RF0W_POS         (1U)
640 #define CAN_MCAN_IE_RF0W_MSK         (0x1UL << CAN_MCAN_IE_RF0W_POS)
641 #define CAN_MCAN_IE_RF0W             CAN_MCAN_IE_RF0W_MSK
642 /* Rx FIFO 0 Full */
643 #define CAN_MCAN_IE_RF0F_POS         (2U)
644 #define CAN_MCAN_IE_RF0F_MSK         (0x1UL << CAN_MCAN_IE_RF0F_POS)
645 #define CAN_MCAN_IE_RF0F             CAN_MCAN_IE_RF0F_MSK
646 /* Rx FIFO 0 Message Lost */
647 #define CAN_MCAN_IE_RF0L_POS         (3U)
648 #define CAN_MCAN_IE_RF0L_MSK         (0x1UL << CAN_MCAN_IE_RF0L_POS)
649 #define CAN_MCAN_IE_RF0L             CAN_MCAN_IE_RF0L_MSK
650 /* Rx FIFO 1 New Message */
651 #define CAN_MCAN_IE_RF1N_POS         (4U)
652 #define CAN_MCAN_IE_RF1N_MSK         (0x1UL << CAN_MCAN_IE_RF1N_POS)
653 #define CAN_MCAN_IE_RF1N             CAN_MCAN_IE_RF1N_MSK
654 /* Rx FIFO 1 Watermark Reached*/
655 #define CAN_MCAN_IE_RF1W_POS         (5U)
656 #define CAN_MCAN_IE_RF1W_MSK         (0x1UL << CAN_MCAN_IE_RF1W_POS)
657 #define CAN_MCAN_IE_RF1W             CAN_MCAN_IE_RF1W_MSK
658 /* Rx FIFO 1 Full */
659 #define CAN_MCAN_IE_RF1F_POS         (6U)
660 #define CAN_MCAN_IE_RF1F_MSK         (0x1UL << CAN_MCAN_IE_RF1F_POS)
661 #define CAN_MCAN_IE_RF1F             CAN_MCAN_IE_RF1F_MSK
662 /* Rx FIFO 1 Message Lost */
663 #define CAN_MCAN_IE_RF1L_POS         (7U)
664 #define CAN_MCAN_IE_RF1L_MSK         (0x1UL << CAN_MCAN_IE_RF1L_POS)
665 #define CAN_MCAN_IE_RF1L             CAN_MCAN_IE_RF1L_MSK
666 /* High Priority Message */
667 #define CAN_MCAN_IE_HPM_POS          (8U)
668 #define CAN_MCAN_IE_HPM_MSK          (0x1UL << CAN_MCAN_IE_HPM_POS)
669 #define CAN_MCAN_IE_HPM              CAN_MCAN_IE_HPM_MSK
670 /* Transmission Completed */
671 #define CAN_MCAN_IE_TC_POS           (9U)
672 #define CAN_MCAN_IE_TC_MSK           (0x1UL << CAN_MCAN_IE_TC_POS)
673 #define CAN_MCAN_IE_TC               CAN_MCAN_IE_TC_MSK
674 /* Transmission Cancellation Finished */
675 #define CAN_MCAN_IE_TCF_POS          (10U)
676 #define CAN_MCAN_IE_TCF_MSK          (0x1UL << CAN_MCAN_IE_TCF_POS)
677 #define CAN_MCAN_IE_TCF              CAN_MCAN_IE_TCF_MSK
678 /* Tx FIFO Empty */
679 #define CAN_MCAN_IE_TFE_POS          (11U)
680 #define CAN_MCAN_IE_TFE_MSK          (0x1UL << CAN_MCAN_IE_TFE_POS)
681 #define CAN_MCAN_IE_TFE              CAN_MCAN_IE_TFE_MSK
682 /* Tx Event FIFO New Entry */
683 #define CAN_MCAN_IE_TEFN_POS         (12U)
684 #define CAN_MCAN_IE_TEFN_MSK         (0x1UL << CAN_MCAN_IE_TEFN_POS)
685 #define CAN_MCAN_IE_TEFN             CAN_MCAN_IE_TEFN_MSK
686 /* Tx Event FIFO Watermark */
687 #define CAN_MCAN_IE_TEFW_POS         (13U)
688 #define CAN_MCAN_IE_TEFW_MSK         (0x1UL << CAN_MCAN_IE_TEFW_POS)
689 #define CAN_MCAN_IE_TEFW             CAN_MCAN_IE_TEFW_MSK
690 /* Tx Event FIFO Full */
691 #define CAN_MCAN_IE_TEFF_POS         (14U)
692 #define CAN_MCAN_IE_TEFF_MSK         (0x1UL << CAN_MCAN_IE_TEFF_POS)
693 #define CAN_MCAN_IE_TEFF             CAN_MCAN_IE_TEFF_MSK
694 /* Tx Event FIFO Element Lost */
695 #define CAN_MCAN_IE_TEFL_POS         (15U)
696 #define CAN_MCAN_IE_TEFL_MSK         (0x1UL << CAN_MCAN_IE_TEFL_POS)
697 #define CAN_MCAN_IE_TEFL             CAN_MCAN_IE_TEFL_MSK
698 /* Timestamp Wraparound */
699 #define CAN_MCAN_IE_TSW_POS          (16U)
700 #define CAN_MCAN_IE_TSW_MSK          (0x1UL << CAN_MCAN_IE_TSW_POS)
701 #define CAN_MCAN_IE_TSW              CAN_MCAN_IE_TSW_MSK
702 /* Message RAM Access Failure */
703 #define CAN_MCAN_IE_MRAF_POS         (17U)
704 #define CAN_MCAN_IE_MRAF_MSK         (0x1UL << CAN_MCAN_IE_MRAF_POS)
705 #define CAN_MCAN_IE_MRAF             CAN_MCAN_IE_MRAF_MSK
706 /* Timeout Occurred */
707 #define CAN_MCAN_IE_TOO_POS          (18U)
708 #define CAN_MCAN_IE_TOO_MSK          (0x1UL << CAN_MCAN_IE_TOO_POS)
709 #define CAN_MCAN_IE_TOO              CAN_MCAN_IE_TOO_MSK
710 /* Message stored to Dedicated Rx Buffer */
711 #define CAN_MCAN_IE_DRX_POS          (19U)
712 #define CAN_MCAN_IE_DRX_MSK          (0x1UL << CAN_MCAN_IE_DRX_POS)
713 #define CAN_MCAN_IE_DRX              CAN_MCAN_IE_DRX_MSK
714 /* Bit Error Corrected */
715 #define CAN_MCAN_IE_BEC_POS          (20U)
716 #define CAN_MCAN_IE_BEC_MSK          (0x1UL << CAN_MCAN_IE_BEC_POS)
717 #define CAN_MCAN_IE_BEC              CAN_MCAN_IE_BEC_MSK
718 /* Bit Error Uncorrected */
719 #define CAN_MCAN_IE_BEU_POS          (21U)
720 #define CAN_MCAN_IE_BEU_MSK          (0x1UL << CAN_MCAN_IE_BEU_POS)
721 #define CAN_MCAN_IE_BEU              CAN_MCAN_IE_BEU_MSK
722 /* Error Logging Overflow */
723 #define CAN_MCAN_IE_ELO_POS          (22U)
724 #define CAN_MCAN_IE_ELO_MSK          (0x1UL << CAN_MCAN_IE_ELO_POS)
725 #define CAN_MCAN_IE_ELO              CAN_MCAN_IE_ELO_MSK
726 /* Error Passive*/
727 #define CAN_MCAN_IE_EP_POS           (23U)
728 #define CAN_MCAN_IE_EP_MSK           (0x1UL << CAN_MCAN_IE_EP_POS)
729 #define CAN_MCAN_IE_EP               CAN_MCAN_IE_EP_MSK
730 /* Warning Status*/
731 #define CAN_MCAN_IE_EW_POS           (24U)
732 #define CAN_MCAN_IE_EW_MSK           (0x1UL << CAN_MCAN_IE_EW_POS)
733 #define CAN_MCAN_IE_EW               CAN_MCAN_IE_EW_MSK
734 /* Bus_Off Status*/
735 #define CAN_MCAN_IE_BO_POS           (25U)
736 #define CAN_MCAN_IE_BO_MSK           (0x1UL << CAN_MCAN_IE_BO_POS)
737 #define CAN_MCAN_IE_BO               CAN_MCAN_IE_BO_MSK
738 /* Watchdog Interrupt */
739 #define CAN_MCAN_IE_WDI_POS          (26U)
740 #define CAN_MCAN_IE_WDI_MSK          (0x1UL << CAN_MCAN_IE_WDI_POS)
741 #define CAN_MCAN_IE_WDI              CAN_MCAN_IE_WDI_MSK
742 /* Protocol Error in Arbitration Phase */
743 #define CAN_MCAN_IE_PEA_POS          (27U)
744 #define CAN_MCAN_IE_PEA_MSK          (0x1UL << CAN_MCAN_IE_PEA_POS)
745 #define CAN_MCAN_IE_PEA              CAN_MCAN_IE_PEA_MSK
746 /* Protocol Error in Data Phase */
747 #define CAN_MCAN_IE_PED_POS          (28U)
748 #define CAN_MCAN_IE_PED_MSK          (0x1UL << CAN_MCAN_IE_PED_POS)
749 #define CAN_MCAN_IE_PED              CAN_MCAN_IE_PED_MSK
750 /* Access to Reserved Address */
751 #define CAN_MCAN_IE_ARA_POS          (29U)
752 #define CAN_MCAN_IE_ARA_MSK          (0x1UL << CAN_MCAN_IE_ARA_POS)
753 #define CAN_MCAN_IE_ARA              CAN_MCAN_IE_ARA_MSK
754 
755 #endif /* CONFIG_CAN_STM32FD */
756 
757 /***************  Bit definition for CAN_MCAN_ILS register  *******************/
758 #ifdef CONFIG_CAN_STM32FD
759 /* Rx FIFO 0 */
760 #define CAN_MCAN_ILS_RXFIFO0_POS     (0U)
761 #define CAN_MCAN_ILS_RXFIFO0_MSK     (0x1UL << CAN_MCAN_ILS_RXFIFO0_POS)
762 #define CAN_MCAN_ILS_RXFIFO0         CAN_MCAN_ILS_RXFIFO0_MSK
763 /* Rx FIFO 1 */
764 #define CAN_MCAN_ILS_RXFIFO1_POS     (1U)
765 #define CAN_MCAN_ILS_RXFIFO1_MSK     (0x1UL << CAN_MCAN_ILS_RXFIFO1_POS)
766 #define CAN_MCAN_ILS_RXFIFO1         CAN_MCAN_ILS_RXFIFO1_MSK
767 /* Transmission Cancellation Finished */
768 #define CAN_MCAN_ILS_SMSG_POS        (2U)
769 #define CAN_MCAN_ILS_SMSG_MSK        (0x1UL << CAN_MCAN_ILS_SMSG_POS)
770 #define CAN_MCAN_ILS_SMSG            CAN_MCAN_ILS_SMSG_MSK
771 /* Tx Event FIFO Element Lost */
772 #define CAN_MCAN_ILS_TFERR_POS       (3U)
773 #define CAN_MCAN_ILS_TFERR_MSK       (0x1UL << CAN_MCAN_ILS_TFERR_POS)
774 #define CAN_MCAN_ILS_TFERR           CAN_MCAN_ILS_TFERR_MSK
775 /* Timeout Occurred */
776 #define CAN_MCAN_ILS_MISC_POS        (4U)
777 #define CAN_MCAN_ILS_MISC_MSK        (0x1UL << CAN_MCAN_ILS_MISC_POS)
778 #define CAN_MCAN_ILS_MISC            CAN_MCAN_ILS_MISC_MSK
779 /* Error Passive Error Logging Overflow */
780 #define CAN_MCAN_ILS_BERR_POS        (5U)
781 #define CAN_MCAN_ILS_BERR_MSK        (0x1UL << CAN_MCAN_ILS_BERR_POS)
782 #define CAN_MCAN_ILS_BERR            CAN_MCAN_ILS_BERR_MSK
783 /* Access to Reserved Address Line */
784 #define CAN_MCAN_ILS_PERR_POS        (6U)
785 #define CAN_MCAN_ILS_PERR_MSK        (0x1UL << CAN_MCAN_ILS_PERR_POS)
786 #define CAN_MCAN_ILS_PERR            CAN_MCAN_ILS_PERR_MSK
787 
788 #else/* CONFIG_CAN_STM32FD */
789 /* Rx FIFO 0 New Message */
790 #define CAN_MCAN_ILS_RF0N_POS         (0U)
791 #define CAN_MCAN_ILS_RF0N_MSK         (0x1UL << CAN_MCAN_ILS_RF0N_POS)
792 #define CAN_MCAN_ILS_RF0N             CAN_MCAN_ILS_RF0N_MSK
793 /* Rx FIFO 0 Watermark Reached*/
794 #define CAN_MCAN_ILS_RF0W_POS         (1U)
795 #define CAN_MCAN_ILS_RF0W_MSK         (0x1UL << CAN_MCAN_ILS_RF0W_POS)
796 #define CAN_MCAN_ILS_RF0W             CAN_MCAN_ILS_RF0W_MSK
797 /* Rx FIFO 0 Full */
798 #define CAN_MCAN_ILS_RF0F_POS         (2U)
799 #define CAN_MCAN_ILS_RF0F_MSK         (0x1UL << CAN_MCAN_ILS_RF0F_POS)
800 #define CAN_MCAN_ILS_RF0F             CAN_MCAN_ILS_RF0F_MSK
801 /* Rx FIFO 0 Message Lost */
802 #define CAN_MCAN_ILS_RF0L_POS         (3U)
803 #define CAN_MCAN_ILS_RF0L_MSK         (0x1UL << CAN_MCAN_ILS_RF0L_POS)
804 #define CAN_MCAN_ILS_RF0L             CAN_MCAN_ILS_RF0L_MSK
805 /* Rx FIFO 1 New Message */
806 #define CAN_MCAN_ILS_RF1N_POS         (4U)
807 #define CAN_MCAN_ILS_RF1N_MSK         (0x1UL << CAN_MCAN_ILS_RF1N_POS)
808 #define CAN_MCAN_ILS_RF1N             CAN_MCAN_ILS_RF1N_MSK
809 /* Rx FIFO 1 Watermark Reached*/
810 #define CAN_MCAN_ILS_RF1W_POS         (5U)
811 #define CAN_MCAN_ILS_RF1W_MSK         (0x1UL << CAN_MCAN_ILS_RF1W_POS)
812 #define CAN_MCAN_ILS_RF1W             CAN_MCAN_ILS_RF1W_MSK
813 /* Rx FIFO 1 Full */
814 #define CAN_MCAN_ILS_RF1F_POS         (6U)
815 #define CAN_MCAN_ILS_RF1F_MSK         (0x1UL << CAN_MCAN_ILS_RF1F_POS)
816 #define CAN_MCAN_ILS_RF1F             CAN_MCAN_ILS_RF1F_MSK
817 /* Rx FIFO 1 Message Lost */
818 #define CAN_MCAN_ILS_RF1L_POS         (7U)
819 #define CAN_MCAN_ILS_RF1L_MSK         (0x1UL << CAN_MCAN_ILS_RF1L_POS)
820 #define CAN_MCAN_ILS_RF1L             CAN_MCAN_ILS_RF1L_MSK
821 /* High Priority Message */
822 #define CAN_MCAN_ILS_HPM_POS          (8U)
823 #define CAN_MCAN_ILS_HPM_MSK          (0x1UL << CAN_MCAN_ILS_HPM_POS)
824 #define CAN_MCAN_ILS_HPM              CAN_MCAN_ILS_HPM_MSK
825 /* Transmission Completed */
826 #define CAN_MCAN_ILS_TC_POS           (9U)
827 #define CAN_MCAN_ILS_TC_MSK           (0x1UL << CAN_MCAN_ILS_TC_POS)
828 #define CAN_MCAN_ILS_TC               CAN_MCAN_ILS_TC_MSK
829 /* Transmission Cancellation Finished */
830 #define CAN_MCAN_ILS_TCF_POS          (10U)
831 #define CAN_MCAN_ILS_TCF_MSK          (0x1UL << CAN_MCAN_ILS_TCF_POS)
832 #define CAN_MCAN_ILS_TCF              CAN_MCAN_ILS_TCF_MSK
833 /* Tx FIFO Empty */
834 #define CAN_MCAN_ILS_TFE_POS          (11U)
835 #define CAN_MCAN_ILS_TFE_MSK          (0x1UL << CAN_MCAN_ILS_TFE_POS)
836 #define CAN_MCAN_ILS_TFE              CAN_MCAN_ILS_TFE_MSK
837 /* Tx Event FIFO New Entry */
838 #define CAN_MCAN_ILS_TEFN_POS         (12U)
839 #define CAN_MCAN_ILS_TEFN_MSK         (0x1UL << CAN_MCAN_ILS_TEFN_POS)
840 #define CAN_MCAN_ILS_TEFN             CAN_MCAN_ILS_TEFN_MSK
841 /* Tx Event FIFO Watermark */
842 #define CAN_MCAN_ILS_TEFW_POS         (13U)
843 #define CAN_MCAN_ILS_TEFW_MSK         (0x1UL << CAN_MCAN_ILS_TEFW_POS)
844 #define CAN_MCAN_ILS_TEFW             CAN_MCAN_ILS_TEFW_MSK
845 /* Tx Event FIFO Full */
846 #define CAN_MCAN_ILS_TEFF_POS         (14U)
847 #define CAN_MCAN_ILS_TEFF_MSK         (0x1UL << CAN_MCAN_ILS_TEFF_POS)
848 #define CAN_MCAN_ILS_TEFF             CAN_MCAN_ILS_TEFF_MSK
849 /* Tx Event FIFO Element Lost */
850 #define CAN_MCAN_ILS_TEFL_POS         (15U)
851 #define CAN_MCAN_ILS_TEFL_MSK         (0x1UL << CAN_MCAN_ILS_TEFL_POS)
852 #define CAN_MCAN_ILS_TEFL             CAN_MCAN_ILS_TEFL_MSK
853 /* Timestamp Wraparound */
854 #define CAN_MCAN_ILS_TSW_POS          (16U)
855 #define CAN_MCAN_ILS_TSW_MSK          (0x1UL << CAN_MCAN_ILS_TSW_POS)
856 #define CAN_MCAN_ILS_TSW              CAN_MCAN_ILS_TSW_MSK
857 /* Message RAM Access Failure */
858 #define CAN_MCAN_ILS_MRAF_POS         (17U)
859 #define CAN_MCAN_ILS_MRAF_MSK         (0x1UL << CAN_MCAN_ILS_MRAF_POS)
860 #define CAN_MCAN_ILS_MRAF             CAN_MCAN_ILS_MRAF_MSK
861 /* Timeout Occurred */
862 #define CAN_MCAN_ILS_TOO_POS          (18U)
863 #define CAN_MCAN_ILS_TOO_MSK          (0x1UL << CAN_MCAN_ILS_TOO_POS)
864 #define CAN_MCAN_ILS_TOO              CAN_MCAN_ILS_TOO_MSK
865 /* Message stored to Dedicated Rx Buffer */
866 #define CAN_MCAN_ILS_DRX_POS          (19U)
867 #define CAN_MCAN_ILS_DRX_MSK          (0x1UL << CAN_MCAN_ILS_DRX_POS)
868 #define CAN_MCAN_ILS_DRX              CAN_MCAN_ILS_DRX_MSK
869 /* Bit Error Corrected */
870 #define CAN_MCAN_ILS_BEC_POS          (20U)
871 #define CAN_MCAN_ILS_BEC_MSK          (0x1UL << CAN_MCAN_ILS_BEC_POS)
872 #define CAN_MCAN_ILS_BEC              CAN_MCAN_ILS_BEC_MSK
873 /* Bit Error Uncorrected */
874 #define CAN_MCAN_ILS_BEU_POS          (21U)
875 #define CAN_MCAN_ILS_BEU_MSK          (0x1UL << CAN_MCAN_ILS_BEU_POS)
876 #define CAN_MCAN_ILS_BEU              CAN_MCAN_ILS_BEU_MSK
877 /* Error Logging Overflow */
878 #define CAN_MCAN_ILS_ELO_POS          (22U)
879 #define CAN_MCAN_ILS_ELO_MSK          (0x1UL << CAN_MCAN_ILS_ELO_POS)
880 #define CAN_MCAN_ILS_ELO              CAN_MCAN_ILS_ELO_MSK
881 /* Error Passive*/
882 #define CAN_MCAN_ILS_EP_POS           (23U)
883 #define CAN_MCAN_ILS_EP_MSK           (0x1UL << CAN_MCAN_ILS_EP_POS)
884 #define CAN_MCAN_ILS_EP               CAN_MCAN_ILS_EP_MSK
885 /* Warning Status*/
886 #define CAN_MCAN_ILS_EW_POS           (24U)
887 #define CAN_MCAN_ILS_EW_MSK           (0x1UL << CAN_MCAN_ILS_EW_POS)
888 #define CAN_MCAN_ILS_EW               CAN_MCAN_ILS_EW_MSK
889 /* Bus_Off Status*/
890 #define CAN_MCAN_ILS_BO_POS           (25U)
891 #define CAN_MCAN_ILS_BO_MSK           (0x1UL << CAN_MCAN_ILS_BO_POS)
892 #define CAN_MCAN_ILS_BO               CAN_MCAN_ILS_BO_MSK
893 /* Watchdog Interrupt */
894 #define CAN_MCAN_ILS_WDI_POS          (26U)
895 #define CAN_MCAN_ILS_WDI_MSK          (0x1UL << CAN_MCAN_ILS_WDI_POS)
896 #define CAN_MCAN_ILS_WDI              CAN_MCAN_ILS_WDI_MSK
897 /* Protocol Error in Arbitration Phase */
898 #define CAN_MCAN_ILS_PEA_POS          (27U)
899 #define CAN_MCAN_ILS_PEA_MSK          (0x1UL << CAN_MCAN_ILS_PEA_POS)
900 #define CAN_MCAN_ILS_PEA              CAN_MCAN_ILS_PEA_MSK
901 /* Protocol Error in Data Phase */
902 #define CAN_MCAN_ILS_PED_POS          (28U)
903 #define CAN_MCAN_ILS_PED_MSK          (0x1UL << CAN_MCAN_ILS_PED_POS)
904 #define CAN_MCAN_ILS_PED              CAN_MCAN_ILS_PED_MSK
905 /* Access to Reserved Address */
906 #define CAN_MCAN_ILS_ARA_POS          (29U)
907 #define CAN_MCAN_ILS_ARA_MSK          (0x1UL << CAN_MCAN_ILS_ARA_POS)
908 #define CAN_MCAN_ILS_ARA              CAN_MCAN_IL_ARA_MSK
909 
910 #endif /* CONFIG_CAN_STM32FD */
911 
912 /***************  Bit definition for CAN_MCAN_ILE register  *******************/
913 /* Enable Interrupt Line 0 */
914 #define CAN_MCAN_ILE_EINT0_POS       (0U)
915 #define CAN_MCAN_ILE_EINT0_MSK       (0x1UL << CAN_MCAN_ILE_EINT0_POS)
916 #define CAN_MCAN_ILE_EINT0           CAN_MCAN_ILE_EINT0_MSK
917 /* Enable Interrupt Line 1 */
918 #define CAN_MCAN_ILE_EINT1_POS       (1U)
919 #define CAN_MCAN_ILE_EINT1_MSK       (0x1UL << CAN_MCAN_ILE_EINT1_POS)
920 #define CAN_MCAN_ILE_EINT1           CAN_MCAN_ILE_EINT1_MSK
921 
922 /***************  Bit definition for CAN_MCAN_RXGFC register  *****************/
923 #ifdef CONFIG_CAN_STM32FD
924 /* Reject Remote Frames Extended */
925 #define CAN_MCAN_RXGFC_RRFE_POS      (0U)
926 #define CAN_MCAN_RXGFC_RRFE_MSK      (0x1UL << CAN_MCAN_RXGFC_RRFE_POS)
927 #define CAN_MCAN_RXGFC_RRFE          CAN_MCAN_RXGFC_RRFE_MSK
928 /* Reject Remote Frames Standard */
929 #define CAN_MCAN_RXGFC_RRFS_POS      (1U)
930 #define CAN_MCAN_RXGFC_RRFS_MSK      (0x1UL << CAN_MCAN_RXGFC_RRFS_POS)
931 #define CAN_MCAN_RXGFC_RRFS          CAN_MCAN_RXGFC_RRFS_MSK
932 /* Accept Non-matching Frames Extended */
933 #define CAN_MCAN_RXGFC_ANFE_POS      (2U)
934 #define CAN_MCAN_RXGFC_ANFE_MSK      (0x3UL << CAN_MCAN_RXGFC_ANFE_POS)
935 #define CAN_MCAN_RXGFC_ANFE          CAN_MCAN_RXGFC_ANFE_MSK
936 /* Accept Non-matching Frames Standard */
937 #define CAN_MCAN_RXGFC_ANFS_POS      (4U)
938 #define CAN_MCAN_RXGFC_ANFS_MSK      (0x3UL << CAN_MCAN_RXGFC_ANFS_POS)
939 #define CAN_MCAN_RXGFC_ANFS          CAN_MCAN_RXGFC_ANFS_MSK
940 /* FIFO 1 operation mode */
941 #define CAN_MCAN_RXGFC_F1OM_POS      (8U)
942 #define CAN_MCAN_RXGFC_F1OM_MSK      (0x1UL << CAN_MCAN_RXGFC_F1OM_POS)
943 #define CAN_MCAN_RXGFC_F1OM          CAN_MCAN_RXGFC_F1OM_MSK
944 /* FIFO 0 operation mode */
945 #define CAN_MCAN_RXGFC_F0OM_POS      (9U)
946 #define CAN_MCAN_RXGFC_F0OM_MSK      (0x1UL << CAN_MCAN_RXGFC_F0OM_POS)
947 #define CAN_MCAN_RXGFC_F0OM          CAN_MCAN_RXGFC_F0OM_MSK
948 /* List Size Standard */
949 #define CAN_MCAN_RXGFC_LSS_POS       (16U)
950 #define CAN_MCAN_RXGFC_LSS_MSK       (0x1FUL << CAN_MCAN_RXGFC_LSS_POS)
951 #define CAN_MCAN_RXGFC_LSS           CAN_MCAN_RXGFC_LSS_MSK
952 /* List Size Extended */
953 #define CAN_MCAN_RXGFC_LSE_POS       (24U)
954 #define CAN_MCAN_RXGFC_LSE_MSK       (0xFUL << CAN_MCAN_RXGFC_LSE_POS)
955 #define CAN_MCAN_RXGFC_LSE           CAN_MCAN_RXGFC_LSE_MSK
956 
957 #else /* CONFIG_CAN_STM32FD */
958 
959 /* Reject Remote Frames Extended */
960 #define CAN_MCAN_GFC_RRFE_POS      (0U)
961 #define CAN_MCAN_GFC_RRFE_MSK      (0x1UL << CAN_MCAN_GFC_RRFE_POS)
962 #define CAN_MCAN_GFC_RRFE          CAN_MCAN_GFC_RRFE_MSK
963 /* Reject Remote Frames Standard */
964 #define CAN_MCAN_GFC_RRFS_POS      (1U)
965 #define CAN_MCAN_GFC_RRFS_MSK      (0x1UL << CAN_MCAN_GFC_RRFS_POS)
966 #define CAN_MCAN_GFC_RRFS          CAN_MCAN_GFC_RRFS_MSK
967 /* Accept Non-matching Frames Extended */
968 #define CAN_MCAN_GFC_ANFE_POS      (2U)
969 #define CAN_MCAN_GFC_ANFE_MSK      (0x3UL << CAN_MCAN_GFC_ANFE_POS)
970 #define CAN_MCAN_GFC_ANFE          CAN_MCAN_GFC_ANFE_MSK
971 /* Accept Non-matching Frames Standard */
972 #define CAN_MCAN_GFC_ANFS_POS      (4U)
973 #define CAN_MCAN_GFC_ANFS_MSK      (0x3UL << CAN_MCAN_GFC_ANFS_POS)
974 #define CAN_MCAN_GFC_ANFS          CAN_MCAN_GFC_ANFS_MSK
975 
976 /*  Filter List Standard Start Address */
977 #define CAN_MCAN_SIDFC_FLSSA_POS      (2U)
978 #define CAN_MCAN_SIDFC_FLSSA_MSK      (0x3FFFUL << CAN_MCAN_SIDFC_FLSSA_POS)
979 #define CAN_MCAN_SIDFC_FLSSA           CAN_MCAN_SIDFC_FLSSA_MSK
980 /* List Size Standard */
981 #define CAN_MCAN_SIDFC_LSS_POS      (16U)
982 #define CAN_MCAN_SIDFC_LSS_MSK      (0xFFUL << CAN_MCAN_SIDFC_LSS_POS)
983 #define CAN_MCAN_SIDFC_LSS          CAN_MCAN_SIDFC_LSS_MSK
984 
985 /*  Filter List Extended Start Address */
986 #define CAN_MCAN_XIDFC_FLESA_POS      (2U)
987 #define CAN_MCAN_XIDFC_FLESA_MSK      (0x3FFFUL << CAN_MCAN_XIDFC_FLESA_POS)
988 #define CAN_MCAN_XIDFC_FLESA          CAN_MCAN_XIDFC_FLESA_MSK
989 /* List Size Extended */
990 #define CAN_MCAN_XIDFC_LSS_POS      (16U)
991 #define CAN_MCAN_XIDFC_LSS_MSK      (0x7FUL << CAN_MCAN_XIDFC_LSS_POS)
992 #define CAN_MCAN_XIDFC_LSS          CAN_MCAN_XIDFC_LSS_MSK
993 
994 #endif /* CONFIG_CAN_STM32FD */
995 
996 /***************  Bit definition for CAN_MCAN_XIDAM register  *****************/
997 /* Extended ID Mask */
998 #define CAN_MCAN_XIDAM_EIDM_POS      (0U)
999 #define CAN_MCAN_XIDAM_EIDM_MSK      (0x1FFFFFFFUL << CAN_MCAN_XIDAM_EIDM_POS)
1000 #define CAN_MCAN_XIDAM_EIDM          CAN_MCAN_XIDAM_EIDM_MSK
1001 
1002 /***************  Bit definition for CAN_MCAN_HPMS register  ******************/
1003 #ifdef CONFIG_CAN_STM32FD
1004 /* Buffer Index */
1005 #define CAN_MCAN_HPMS_BIDX_POS       (0U)
1006 #define CAN_MCAN_HPMS_BIDX_MSK       (0x7UL << CAN_MCAN_HPMS_BIDX_POS)
1007 #define CAN_MCAN_HPMS_BIDX           CAN_MCAN_HPMS_BIDX_MSK
1008 /* Message Storage Indicator */
1009 #define CAN_MCAN_HPMS_MSI_POS        (6U)
1010 #define CAN_MCAN_HPMS_MSI_MSK        (0x3UL << CAN_MCAN_HPMS_MSI_POS)
1011 #define CAN_MCAN_HPMS_MSI            CAN_MCAN_HPMS_MSI_MSK
1012 /* Filter Index */
1013 #define CAN_MCAN_HPMS_FIDX_POS       (8U)
1014 #define CAN_MCAN_HPMS_FIDX_MSK       (0x1FUL << CAN_MCAN_HPMS_FIDX_POS)
1015 #define CAN_MCAN_HPMS_FIDX           CAN_MCAN_HPMS_FIDX_MSK
1016 /* Filter List  */
1017 #define CAN_MCAN_HPMS_FLST_POS       (15U)
1018 #define CAN_MCAN_HPMS_FLST_MSK       (0x1UL << CAN_MCAN_HPMS_FLST_POS)
1019 #define CAN_MCAN_HPMS_FLST           CAN_MCAN_HPMS_FLST_MSK
1020 
1021 #else /* CONFIG_CAN_STM32FD */
1022 
1023 /* Buffer Index */
1024 #define CAN_MCAN_HPMS_BIDX_POS       (0U)
1025 #define CAN_MCAN_HPMS_BIDX_MSK       (0x3FUL << CAN_MCAN_HPMS_BIDX_POS)
1026 #define CAN_MCAN_HPMS_BIDX           CAN_MCAN_HPMS_BIDX_MSK
1027 /* Message Storage Indicator */
1028 #define CAN_MCAN_HPMS_MSI_POS        (6U)
1029 #define CAN_MCAN_HPMS_MSI_MSK        (0x3UL << CAN_MCAN_HPMS_MSI_POS)
1030 #define CAN_MCAN_HPMS_MSI            CAN_MCAN_HPMS_MSI_MSK
1031 /* Filter Index */
1032 #define CAN_MCAN_HPMS_FIDX_POS       (8U)
1033 #define CAN_MCAN_HPMS_FIDX_MSK       (0x7FUL << CAN_MCAN_HPMS_FIDX_POS)
1034 #define CAN_MCAN_HPMS_FIDX           CAN_MCAN_HPMS_FIDX_MSK
1035 /* Filter List  */
1036 #define CAN_MCAN_HPMS_FLST_POS       (15U)
1037 #define CAN_MCAN_HPMS_FLST_MSK       (0x1UL << CAN_MCAN_HPMS_FLST_POS)
1038 #define CAN_MCAN_HPMS_FLST           CAN_MCAN_HPMS_FLST_MSK
1039 
1040 #endif /* CONFIG_CAN_STM32FD */
1041 
1042 /***************  Bit definition for CAN_MCAN_RXF0C register  *****************/
1043 /* Rx FIFO 0 Start Address */
1044 #define CAN_MCAN_RXF0C_F0SA_POS      (2U)
1045 #define CAN_MCAN_RXF0C_F0SA_MSK      (0x3FFFUL << CAN_MCAN_RXF0C_F0SA_POS)
1046 #define CAN_MCAN_RXF0C_F0SA          CAN_MCAN_RXF0C_F0SA_MSK
1047 /* Rx FIFO 0 Size */
1048 #define CAN_MCAN_RXF0C_F0S_POS       (16U)
1049 #define CAN_MCAN_RXF0C_F0S_MSK       (0x7FUL << CAN_MCAN_RXF0C_F0S_POS)
1050 #define CAN_MCAN_RXF0C_F0S           CAN_MCAN_RXF0C_F0S_MSK
1051 /* Rx FIFO 0 Watermark */
1052 #define CAN_MCAN_RXF0C_F0WM_POS      (24)
1053 #define CAN_MCAN_RXF0C_F0WM_MSK      (0x7FUL << CAN_MCAN_RXF0C_F0WM_POS)
1054 #define CAN_MCAN_RXF0C_F0WM           CAN_MCAN_RXF0C_F0WM_MSK
1055 /* FIFO 0 Operation Mode */
1056 #define CAN_MCAN_RXF0C_F0OM_POS      (31)
1057 #define CAN_MCAN_RXF0C_F0OM_MSK      (0x1UL << CAN_MCAN_RXF0C_F0OM_POS)
1058 #define CAN_MCAN_RXF0C_F0OM           CAN_MCAN_RXF0C_F0OM_MSK
1059 
1060 /***************  Bit definition for CAN_MCAN_RXF0S register  *****************/
1061 #ifdef CONFIG_CAN_STM32FD
1062 /* Rx FIFO 0 Fill Level */
1063 #define CAN_MCAN_RXF0S_F0FL_POS      (0U)
1064 #define CAN_MCAN_RXF0S_F0FL_MSK      (0xFUL << CAN_MCAN_RXF0S_F0FL_POS)
1065 #define CAN_MCAN_RXF0S_F0FL          CAN_MCAN_RXF0S_F0FL_MSK
1066 /* Rx FIFO 0 Get Index */
1067 #define CAN_MCAN_RXF0S_F0GI_POS      (8U)
1068 #define CAN_MCAN_RXF0S_F0GI_MSK      (0x3UL << CAN_MCAN_RXF0S_F0GI_POS)
1069 #define CAN_MCAN_RXF0S_F0GI          CAN_MCAN_RXF0S_F0GI_MSK
1070 /* Rx FIFO 0 Put Index */
1071 #define CAN_MCAN_RXF0S_F0PI_POS      (16U)
1072 #define CAN_MCAN_RXF0S_F0PI_MSK      (0x3UL << CAN_MCAN_RXF0S_F0PI_POS)
1073 #define CAN_MCAN_RXF0S_F0PI          CAN_MCAN_RXF0S_F0PI_MSK
1074 /* Rx FIFO 0 Full */
1075 #define CAN_MCAN_RXF0S_F0F_POS       (24U)
1076 #define CAN_MCAN_RXF0S_F0F_MSK       (0x1UL << CAN_MCAN_RXF0S_F0F_POS)
1077 #define CAN_MCAN_RXF0S_F0F           CAN_MCAN_RXF0S_F0F_MSK
1078 /* Rx FIFO 0 Message Lost */
1079 #define CAN_MCAN_RXF0S_RF0L_POS      (25U)
1080 #define CAN_MCAN_RXF0S_RF0L_MSK      (0x1UL << CAN_MCAN_RXF0S_RF0L_POS)
1081 #define CAN_MCAN_RXF0S_RF0L          CAN_MCAN_RXF0S_RF0L_MSK
1082 
1083 #else /* CONFIG_CAN_STM32FD */
1084 
1085 /* Rx FIFO 0 Fill Level */
1086 #define CAN_MCAN_RXF0S_F0FL_POS      (0U)
1087 #define CAN_MCAN_RXF0S_F0FL_MSK      (0x3FUL << CAN_MCAN_RXF0S_F0FL_POS)
1088 #define CAN_MCAN_RXF0S_F0FL          CAN_MCAN_RXF0S_F0FL_MSK
1089 /* Rx FIFO 0 Get Index */
1090 #define CAN_MCAN_RXF0S_F0GI_POS      (8U)
1091 #define CAN_MCAN_RXF0S_F0GI_MSK      (0x3FUL << CAN_MCAN_RXF0S_F0GI_POS)
1092 #define CAN_MCAN_RXF0S_F0GI          CAN_MCAN_RXF0S_F0GI_MSK
1093 /* Rx FIFO 0 Put Index */
1094 #define CAN_MCAN_RXF0S_F0PI_POS      (16U)
1095 #define CAN_MCAN_RXF0S_F0PI_MSK      (0x3FUL << CAN_MCAN_RXF0S_F0PI_POS)
1096 #define CAN_MCAN_RXF0S_F0PI          CAN_MCAN_RXF0S_F0PI_MSK
1097 /* Rx FIFO 0 Full */
1098 #define CAN_MCAN_RXF0S_F0F_POS       (24U)
1099 #define CAN_MCAN_RXF0S_F0F_MSK       (0x1UL << CAN_MCAN_RXF0S_F0F_POS)
1100 #define CAN_MCAN_RXF0S_F0F           CAN_MCAN_RXF0S_F0F_MSK
1101 /* Rx FIFO 0 Message Lost */
1102 #define CAN_MCAN_RXF0S_RF0L_POS      (25U)
1103 #define CAN_MCAN_RXF0S_RF0L_MSK      (0x1UL << CAN_MCAN_RXF0S_RF0L_POS)
1104 #define CAN_MCAN_RXF0S_RF0L          CAN_MCAN_RXF0S_RF0L_MSK
1105 #endif
1106 
1107 /***************  Bit definition for CAN_MCAN_RXF0A register  *****************/
1108 #ifdef CONFIG_CAN_STM32FD
1109 /* Rx FIFO 0 Acknowledge Index */
1110 #define CAN_MCAN_RXF0A_F0AI_POS      (0U)
1111 #define CAN_MCAN_RXF0A_F0AI_MSK      (0x7UL << CAN_MCAN_RXF0A_F0AI_POS)
1112 #define CAN_MCAN_RXF0A_F0AI          CAN_MCAN_RXF0A_F0AI_MSK
1113 #else
1114 /* Rx FIFO 0 Acknowledge Index */
1115 #define CAN_MCAN_RXF0A_F0AI_POS      (0U)
1116 #define CAN_MCAN_RXF0A_F0AI_MSK      (0x3FUL << CAN_MCAN_RXF0A_F0AI_POS)
1117 #define CAN_MCAN_RXF0A_F0AI          CAN_MCAN_RXF0A_F0AI_MSK
1118 
1119 #endif /* CONFIG_CAN_STM32FD */
1120 
1121 /***************  Bit definition for CAN_MCAN_RXBC register  ******************/
1122 /*  Rx Buffer Start Address */
1123 #define CAN_MCAN_RXBC_RBSA_POS      (2U)
1124 #define CAN_MCAN_RXBC_RBSA_MSK      (0x3FFFUL << CAN_MCAN_RXBC_RBSA_POS)
1125 #define CAN_MCAN_RXBC_RBSA          CAN_MCAN_RXBC_RBSA_MSK
1126 
1127 /***************  Bit definition for CAN_MCAN_RXF1C register  *****************/
1128 /* Rx FIFO 0 Start Address */
1129 #define CAN_MCAN_RXF1C_F1SA_POS      (2U)
1130 #define CAN_MCAN_RXF1C_F1SA_MSK      (0x3FFFUL << CAN_MCAN_RXF1C_F1SA_POS)
1131 #define CAN_MCAN_RXF1C_F1SA          CAN_MCAN_RXF1C_F1SA_MSK
1132 /* Rx FIFO 0 Size */
1133 #define CAN_MCAN_RXF1C_F1S_POS       (16U)
1134 #define CAN_MCAN_RXF1C_F1S_MSK       (0x7FUL << CAN_MCAN_RXF1C_F1S_POS)
1135 #define CAN_MCAN_RXF1C_F1S           CAN_MCAN_RXF1C_F1S_MSK
1136 /* Rx FIFO 0 Watermark */
1137 #define CAN_MCAN_RXF1C_F1WM_POS      (24)
1138 #define CAN_MCAN_RXF1C_F1WM_MSK      (0x7FUL << CAN_MCAN_RXF1C_F1WM_POS)
1139 #define CAN_MCAN_RXF1C_F1WM           CAN_MCAN_RXF1C_F1WM_MSK
1140 /* FIFO 0 Operation Mode */
1141 #define CAN_MCAN_RXF1C_F1OM_POS      (31)
1142 #define CAN_MCAN_RXF1C_F1OM_MSK      (0x1UL << CAN_MCAN_RXF1C_F1OM_POS)
1143 #define CAN_MCAN_RXF1C_F1OM           CAN_MCAN_RXF1C_F1OM_MSK
1144 
1145 /***************  Bit definition for CAN_MCAN_RXF1S register  *****************/
1146 #ifdef CONFIG_CAN_STM32FD
1147 /* Rx FIFO 1 Fill Level */
1148 #define CAN_MCAN_RXF1S_F1FL_POS      (0U)
1149 #define CAN_MCAN_RXF1S_F1FL_MSK      (0xFUL << CAN_MCAN_RXF1S_F1FL_POS)
1150 #define CAN_MCAN_RXF1S_F1FL          CAN_MCAN_RXF1S_F1FL_MSK
1151 /* Rx FIFO 1 Get Index */
1152 #define CAN_MCAN_RXF1S_F1GI_POS      (8U)
1153 #define CAN_MCAN_RXF1S_F1GI_MSK      (0x3UL << CAN_MCAN_RXF1S_F1GI_POS)
1154 #define CAN_MCAN_RXF1S_F1GI          CAN_MCAN_RXF1S_F1GI_MSK
1155 /* Rx FIFO 1 Put Index */
1156 #define CAN_MCAN_RXF1S_F1PI_POS      (16U)
1157 #define CAN_MCAN_RXF1S_F1PI_MSK      (0x3UL << CAN_MCAN_RXF1S_F1PI_POS)
1158 #define CAN_MCAN_RXF1S_F1PI          CAN_MCAN_RXF1S_F1PI_MSK
1159 /* Rx FIFO 1 Full */
1160 #define CAN_MCAN_RXF1S_F1F_POS       (24U)
1161 #define CAN_MCAN_RXF1S_F1F_MSK       (0x1UL << CAN_MCAN_RXF1S_F1F_POS)
1162 #define CAN_MCAN_RXF1S_F1F           CAN_MCAN_RXF1S_F1F_MSK
1163 /* Rx FIFO 1 Message Lost */
1164 #define CAN_MCAN_RXF1S_RF1L_POS      (25U)
1165 #define CAN_MCAN_RXF1S_RF1L_MSK      (0x1UL << CAN_MCAN_RXF1S_RF1L_POS)
1166 #define CAN_MCAN_RXF1S_RF1L          CAN_MCAN_RXF1S_RF1L_MSK
1167 
1168 #else /* CONFIG_CAN_STM32FD */
1169 
1170 /* Rx FIFO 1 Fill Level */
1171 #define CAN_MCAN_RXF1S_F1FL_POS      (0U)
1172 #define CAN_MCAN_RXF1S_F1FL_MSK      (0x7FUL << CAN_MCAN_RXF1S_F1FL_POS)
1173 #define CAN_MCAN_RXF1S_F1FL          CAN_MCAN_RXF1S_F1FL_MSK
1174 /* Rx FIFO 1 Get Index */
1175 #define CAN_MCAN_RXF1S_F1GI_POS      (8U)
1176 #define CAN_MCAN_RXF1S_F1GI_MSK      (0x3FUL << CAN_MCAN_RXF1S_F1GI_POS)
1177 #define CAN_MCAN_RXF1S_F1GI          CAN_MCAN_RXF1S_F1GI_MSK
1178 /* Rx FIFO 1 Put Index */
1179 #define CAN_MCAN_RXF1S_F1PI_POS      (16U)
1180 #define CAN_MCAN_RXF1S_F1PI_MSK      (0x3FUL << CAN_MCAN_RXF1S_F1PI_POS)
1181 #define CAN_MCAN_RXF1S_F1PI          CAN_MCAN_RXF1S_F1PI_MSK
1182 /* Rx FIFO 1 Full */
1183 #define CAN_MCAN_RXF1S_F1F_POS       (24U)
1184 #define CAN_MCAN_RXF1S_F1F_MSK       (0x1UL << CAN_MCAN_RXF1S_F1F_POS)
1185 #define CAN_MCAN_RXF1S_F1F           CAN_MCAN_RXF1S_F1F_MSK
1186 /* Rx FIFO 1 Message Lost */
1187 #define CAN_MCAN_RXF1S_RF1L_POS      (25U)
1188 #define CAN_MCAN_RXF1S_RF1L_MSK      (0x1UL << CAN_MCAN_RXF1S_RF1L_POS)
1189 #define CAN_MCAN_RXF1S_RF1L          CAN_MCAN_RXF1S_RF1L_MSK
1190 
1191 #endif /* CONFIG_CAN_STM32FD */
1192 
1193 /***************  Bit definition for CAN_MCAN_RXF1A register  *****************/
1194 /* Rx FIFO 1 Acknowledge Index */
1195 #ifdef CONFIG_CAN_STM32FD
1196 #define CAN_MCAN_RXF1A_F1AI_POS      (0U)
1197 #define CAN_MCAN_RXF1A_F1AI_MSK      (0x7UL << CAN_MCAN_RXF1A_F1AI_POS)
1198 #define CAN_MCAN_RXF1A_F1AI          CAN_MCAN_RXF1A_F1AI_MSK
1199 #else
1200 #define CAN_MCAN_RXF1A_F1AI_POS      (0U)
1201 #define CAN_MCAN_RXF1A_F1AI_MSK      (0x3FUL << CAN_MCAN_RXF1A_F1AI_POS)
1202 #define CAN_MCAN_RXF1A_F1AI          CAN_MCAN_RXF1A_F1AI_MSK
1203 #endif /* CONFIG_CAN_STM32FD */
1204 
1205 /***************  Bit definition for CAN_MCAN_RXESC register  *****************/
1206 /* Rx FIFO 0 Data Field Size */
1207 #define CAN_MCAN_RXESC_F0DS_POS      (0U)
1208 #define CAN_MCAN_RXESC_F0DS_MSK      (0x7UL << CAN_MCAN_RXESC_F0DS_POS)
1209 #define CAN_MCAN_RXESC_F0DS          CAN_MCAN_RXESC_F0DS_MSK
1210 /* Rx FIFO 1 Data Field Size */
1211 #define CAN_MCAN_RXESC_F1DS_POS      (4U)
1212 #define CAN_MCAN_RXESC_F1DS_MSK      (0x7UL << CAN_MCAN_RXESC_F1DS_POS)
1213 #define CAN_MCAN_RXESC_F1DS          CAN_MCAN_RXESC_F1DS_MSK
1214 /* Receive Buffer Data Field Size */
1215 #define CAN_MCAN_RXESC_RBDS_POS      (8U)
1216 #define CAN_MCAN_RXESC_RBDS_MSK      (0x7UL << CAN_MCAN_RXESC_RBDS_POS)
1217 #define CAN_MCAN_RXESC_RBDS          CAN_MCAN_RXESC_RBDS_MSK
1218 
1219 /***************  Bit definition for CAN_MCAN_TXBC register  ******************/
1220 #ifdef CONFIG_CAN_STM32FD
1221 /* Tx FIFO/Queue Mode */
1222 #define CAN_MCAN_TXBC_TFQM_POS       (24U)
1223 #define CAN_MCAN_TXBC_TFQM_MSK       (0x1UL << CAN_MCAN_TXBC_TFQM_POS)
1224 #define CAN_MCAN_TXBC_TFQM           CAN_MCAN_TXBC_TFQM_MSK
1225 #else
1226 /* Tx Buffers Start Address */
1227 #define CAN_MCAN_TXBC_TBSA_POS       (2U)
1228 #define CAN_MCAN_TXBC_TBSA_MSK       (0x3FFFUL << CAN_MCAN_TXBC_TBSA_POS)
1229 #define CAN_MCAN_TXBC_TBSA           CAN_MCAN_TXBC_TBSA_MSK
1230 /* Number of Dedicated Transmit Buffers */
1231 #define CAN_MCAN_TXBC_NDTB_POS       (16U)
1232 #define CAN_MCAN_TXBC_NDTB_MSK       (0x3FUL << CAN_MCAN_TXBC_NDTB_POS)
1233 #define CAN_MCAN_TXBC_NDTB           CAN_MCAN_TXBC_NDTB_MSK
1234 /* Transmit FIFO/Queue Size */
1235 #define CAN_MCAN_TXBC_TFQS_POS       (24U)
1236 #define CAN_MCAN_TXBC_TFQS_MSK       (0x3FUL << CAN_MCAN_TXBC_TFQS_POS)
1237 #define CAN_MCAN_TXBC_TFQS           CAN_MCAN_TXBC_TFQS_MSK
1238 /* Tx FIFO/Queue Mode */
1239 #define CAN_MCAN_TXBC_TFQM_POS       (30U)
1240 #define CAN_MCAN_TXBC_TFQM_MSK       (0x3FUL << CAN_MCAN_TXBC_TFQM_POS)
1241 #define CAN_MCAN_TXBC_TFQM           CAN_MCAN_TXBC_TFQM_MSK
1242 
1243 #endif /* CONFIG_CAN_STM32FD */
1244 
1245 /***************  Bit definition for CAN_MCAN_TXFQS register  *****************/
1246 #ifdef CONFIG_CAN_STM32FD
1247 /* Tx FIFO Free Level */
1248 #define CAN_MCAN_TXFQS_TFFL_POS      (0U)
1249 #define CAN_MCAN_TXFQS_TFFL_MSK      (0x7UL << CAN_MCAN_TXFQS_TFFL_POS)
1250 #define CAN_MCAN_TXFQS_TFFL          CAN_MCAN_TXFQS_TFFL_MSK
1251 /* Tx FIFO Get Index */
1252 #define CAN_MCAN_TXFQS_TFGI_POS      (8U)
1253 #define CAN_MCAN_TXFQS_TFGI_MSK      (0x3UL << CAN_MCAN_TXFQS_TFGI_POS)
1254 #define CAN_MCAN_TXFQS_TFGI          CAN_MCAN_TXFQS_TFGI_MSK
1255 /* Tx FIFO/Queue Put Index */
1256 #define CAN_MCAN_TXFQS_TFQPI_POS     (16U)
1257 #define CAN_MCAN_TXFQS_TFQPI_MSK     (0x3UL << CAN_MCAN_TXFQS_TFQPI_POS)
1258 #define CAN_MCAN_TXFQS_TFQPI         CAN_MCAN_TXFQS_TFQPI_MSK
1259 /* Tx FIFO/Queue Full */
1260 #define CAN_MCAN_TXFQS_TFQF_POS      (21U)
1261 #define CAN_MCAN_TXFQS_TFQF_MSK      (0x1UL << CAN_MCAN_TXFQS_TFQF_POS)
1262 #define CAN_MCAN_TXFQS_TFQF          CAN_MCAN_TXFQS_TFQF_MSK
1263 
1264 #else /* CONFIG_CAN_STM32FD */
1265 
1266 /* Tx FIFO Free Level */
1267 #define CAN_MCAN_TXFQS_TFFL_POS      (0U)
1268 #define CAN_MCAN_TXFQS_TFFL_MSK      (0x3FUL << CAN_MCAN_TXFQS_TFFL_POS)
1269 #define CAN_MCAN_TXFQS_TFFL          CAN_MCAN_TXFQS_TFFL_MSK
1270 /* Tx FIFO Get Index */
1271 #define CAN_MCAN_TXFQS_TFGI_POS      (8U)
1272 #define CAN_MCAN_TXFQS_TFGI_MSK      (0x1FUL << CAN_MCAN_TXFQS_TFGI_POS)
1273 #define CAN_MCAN_TXFQS_TFGI          CAN_MCAN_TXFQS_TFGI_MSK
1274 /* Tx FIFO/Queue Put Index */
1275 #define CAN_MCAN_TXFQS_TFQPI_POS     (16U)
1276 #define CAN_MCAN_TXFQS_TFQPI_MSK     (0x1FUL << CAN_MCAN_TXFQS_TFQPI_POS)
1277 #define CAN_MCAN_TXFQS_TFQPI         CAN_MCAN_TXFQS_TFQPI_MSK
1278 /* Tx FIFO/Queue Full */
1279 #define CAN_MCAN_TXFQS_TFQF_POS      (21U)
1280 #define CAN_MCAN_TXFQS_TFQF_MSK      (0x1UL << CAN_MCAN_TXFQS_TFQF_POS)
1281 #define CAN_MCAN_TXFQS_TFQF          CAN_MCAN_TXFQS_TFQF_MSK
1282 
1283 #endif /* CONFIG_CAN_STM32FD */
1284 
1285 /***************  Bit definition for CAN_MCAN_TXESC register  *****************/
1286 /* Tx Buffer Data Field Size */
1287 #define CAN_MCAN_TXESC_TBDS_POS      (0U)
1288 #define CAN_MCAN_TXESC_TBDS_MSK      (0x7UL << CAN_MCAN_TXESC_TBDS_POS)
1289 #define CAN_MCAN_TXESC_TBDS          CAN_MCAN_TXESC_TBDS_MSK
1290 
1291 /***************  Bit definition for CAN_MCAN_TXBRP register  *****************/
1292 #ifdef CONFIG_CAN_STM32FD
1293 /* Transmission Request Pending */
1294 #define CAN_MCAN_TXBRP_TRP_POS       (0U)
1295 #define CAN_MCAN_TXBRP_TRP_MSK       (0x7UL << CAN_MCAN_TXBRP_TRP_POS)
1296 #define CAN_MCAN_TXBRP_TRP           CAN_MCAN_TXBRP_TRP_MSK
1297 #else
1298 /* Transmission Request Pending */
1299 #define CAN_MCAN_TXBRP_TRP_POS       (0U)
1300 #define CAN_MCAN_TXBRP_TRP_MSK       (0xFFFFFFFFUL << CAN_MCAN_TXBRP_TRP_POS)
1301 #define CAN_MCAN_TXBRP_TRP           CAN_MCAN_TXBRP_TRP_MSK
1302 #endif /* CONFIG_CAN_STM32FD */
1303 
1304 /***************  Bit definition for CAN_MCAN_TXBAR register  *****************/
1305 #ifdef CONFIG_CAN_STM32FD
1306 /* Add Request */
1307 #define CAN_MCAN_TXBAR_AR_POS        (0U)
1308 #define CAN_MCAN_TXBAR_AR_MSK        (0x7UL << CAN_MCAN_TXBAR_AR_POS)
1309 #define CAN_MCAN_TXBAR_AR            CAN_MCAN_TXBAR_AR_MSK
1310 #else
1311 /* Add Request */
1312 #define CAN_MCAN_TXBAR_AR_POS        (0U)
1313 #define CAN_MCAN_TXBAR_AR_MSK        (0xFFFFFFFFUL << CAN_MCAN_TXBAR_AR_POS)
1314 #define CAN_MCAN_TXBAR_AR            CAN_MCAN_TXBAR_AR_MSK
1315 #endif /* CONFIG_CAN_STM32FD */
1316 
1317 /***************  Bit definition for CAN_MCAN_TXBCR register  *****************/
1318 #ifdef CONFIG_CAN_STM32FD
1319 /* Cancellation Request */
1320 #define CAN_MCAN_TXBCR_CR_POS        (0U)
1321 #define CAN_MCAN_TXBCR_CR_MSK        (0x7UL << CAN_MCAN_TXBCR_CR_POS)
1322 #define CAN_MCAN_TXBCR_CR            CAN_MCAN_TXBCR_CR_MSK
1323 #else
1324 /* Cancellation Request */
1325 #define CAN_MCAN_TXBCR_CR_POS        (0U)
1326 #define CAN_MCAN_TXBCR_CR_MSK        (0xFFFFFFFFUL << CAN_MCAN_TXBCR_CR_POS)
1327 #define CAN_MCAN_TXBCR_CR            CAN_MCAN_TXBCR_CR_MSK
1328 #endif /* CONFIG_CAN_STM32FD */
1329 
1330 /***************  Bit definition for CAN_MCAN_TXBTO register  *****************/
1331 #ifdef CONFIG_CAN_STM32FD
1332 /* Transmission Occurred */
1333 #define CAN_MCAN_TXBTO_TO_POS        (0U)
1334 #define CAN_MCAN_TXBTO_TO_MSK        (0x7UL << CAN_MCAN_TXBTO_TO_POS)
1335 #define CAN_MCAN_TXBTO_TO            CAN_MCAN_TXBTO_TO_MSK
1336 #else
1337 /* Transmission Occurred */
1338 #define CAN_MCAN_TXBTO_TO_POS        (0U)
1339 #define CAN_MCAN_TXBTO_TO_MSK        (0xFFFFFFFFUL << CAN_MCAN_TXBTO_TO_POS)
1340 #define CAN_MCAN_TXBTO_TO            CAN_MCAN_TXBTO_TO_MSK
1341 #endif /* CONFIG_CAN_STM32FD */
1342 
1343 /***************  Bit definition for CAN_MCAN_TXBCF register  *****************/
1344 #ifdef CONFIG_CAN_STM32FD
1345 /* Cancellation Finished */
1346 #define CAN_MCAN_TXBCF_CF_POS        (0U)
1347 #define CAN_MCAN_TXBCF_CF_MSK        (0x7UL << CAN_MCAN_TXBCF_CF_POS)
1348 #define CAN_MCAN_TXBCF_CF            CAN_MCAN_TXBCF_CF_MSK
1349 #else
1350 /* Cancellation Finished */
1351 #define CAN_MCAN_TXBCF_CF_POS        (0U)
1352 #define CAN_MCAN_TXBCF_CF_MSK        (0xFFFFFFFFUL << CAN_MCAN_TXBCF_CF_POS)
1353 #define CAN_MCAN_TXBCF_CF            CAN_MCAN_TXBCF_CF_MSK
1354 #endif /* CONFIG_CAN_STM32FD */
1355 
1356 /***************  Bit definition for CAN_MCAN_TXBTIE register  ****************/
1357 #ifdef CONFIG_CAN_STM32FD
1358 /* Transmission Interrupt Enable */
1359 #define CAN_MCAN_TXBTIE_TIE_POS      (0U)
1360 #define CAN_MCAN_TXBTIE_TIE_MSK      (0x7UL << CAN_MCAN_TXBTIE_TIE_POS)
1361 #define CAN_MCAN_TXBTIE_TIE          CAN_MCAN_TXBTIE_TIE_MSK
1362 #else
1363 /* Transmission Interrupt Enable */
1364 #define CAN_MCAN_TXBTIE_TIE_POS      (0U)
1365 #define CAN_MCAN_TXBTIE_TIE_MSK      (0xFFFFFFFFUL << CAN_MCAN_TXBTIE_TIE_POS)
1366 #define CAN_MCAN_TXBTIE_TIE          CAN_MCAN_TXBTIE_TIE_MSK
1367 #endif /* CONFIG_CAN_STM32FD */
1368 
1369 /***************  Bit definition for CAN_MCAN_ TXBCIE register  ***************/
1370 #ifdef CONFIG_CAN_STM32FD
1371 /* Cancellation Finished Interrupt Enable */
1372 #define CAN_MCAN_TXBCIE_CFIE_POS     (0U)
1373 #define CAN_MCAN_TXBCIE_CFIE_MSK     (0x7UL << CAN_MCAN_TXBCIE_CFIE_POS)
1374 #define CAN_MCAN_TXBCIE_CFIE         CAN_MCAN_TXBCIE_CFIE_MSK
1375 #else
1376 /* Cancellation Finished Interrupt Enable */
1377 #define CAN_MCAN_TXBCIE_CFIE_POS     (0U)
1378 #define CAN_MCAN_TXBCIE_CFIE_MSK     (0xFFFFFFFFUL << CAN_MCAN_TXBCIE_CFIE_POS)
1379 #define CAN_MCAN_TXBCIE_CFIE         CAN_MCAN_TXBCIE_CFIE_MSK
1380 #endif /* CONFIG_CAN_STM32FD */
1381 
1382 /***************  Bit definition for CAN_MCAN_TXEFC register  *****************/
1383 /* Event FIFO Watermark */
1384 #define CAN_MCAN_TXEFC_EFSA_POS      (0U)
1385 #define CAN_MCAN_TXEFC_EFSA_MSK      (0x3FFFUL << CAN_MCAN_TXEFC_EFSA_POS)
1386 #define CAN_MCAN_TXEFC_EFSA          CAN_MCAN_TXEFC_EFSA_MSK
1387 /* Event FIFO Size */
1388 #define CAN_MCAN_TXEFC_EFS_POS      (16U)
1389 #define CAN_MCAN_TXEFC_EFS_MSK      (0x3FUL << CAN_MCAN_TXEFC_EFS_POS)
1390 #define CAN_MCAN_TXEFC_EFS          CAN_MCAN_TXEFC_EFS_MSK
1391 /* Event FIFO Start Address */
1392 #define CAN_MCAN_TXEFC_EFWM_POS     (24U)
1393 #define CAN_MCAN_TXEFC_EFWM_MSK     (0x3FUL << CAN_MCAN_TXEFC_EFWM_POS)
1394 #define CAN_MCAN_TXEFC_EFWM         CAN_MCAN_TXEFC_EFWM_POS
1395 
1396 /***************  Bit definition for CAN_MCAN_TXEFS register  *****************/
1397 #ifdef CONFIG_CAN_STM32FD
1398 /* Event FIFO Fill Level */
1399 #define CAN_MCAN_TXEFS_EFFL_POS      (0U)
1400 #define CAN_MCAN_TXEFS_EFFL_MSK      (0x7UL << CAN_MCAN_TXEFS_EFFL_POS)
1401 #define CAN_MCAN_TXEFS_EFFL          CAN_MCAN_TXEFS_EFFL_MSK
1402 /* Event FIFO Get Index */
1403 #define CAN_MCAN_TXEFS_EFGI_POS      (8U)
1404 #define CAN_MCAN_TXEFS_EFGI_MSK      (0x3UL << CAN_MCAN_TXEFS_EFGI_POS)
1405 #define CAN_MCAN_TXEFS_EFGI          CAN_MCAN_TXEFS_EFGI_MSK
1406 /* Event FIFO Put Index */
1407 #define CAN_MCAN_TXEFS_EFPI_POS      (16U)
1408 #define CAN_MCAN_TXEFS_EFPI_MSK      (0x3UL << CAN_MCAN_TXEFS_EFPI_POS)
1409 #define CAN_MCAN_TXEFS_EFPI          CAN_MCAN_TXEFS_EFPI_MSK
1410 /* Event FIFO Full */
1411 #define CAN_MCAN_TXEFS_EFF_POS       (24U)
1412 #define CAN_MCAN_TXEFS_EFF_MSK       (0x1UL << CAN_MCAN_TXEFS_EFF_POS)
1413 #define CAN_MCAN_TXEFS_EFF           CAN_MCAN_TXEFS_EFF_MSK
1414 /* Tx Event FIFO Element Lost */
1415 #define CAN_MCAN_TXEFS_TEFL_POS      (25U)
1416 #define CAN_MCAN_TXEFS_TEFL_MSK      (0x1UL << CAN_MCAN_TXEFS_TEFL_POS)
1417 #define CAN_MCAN_TXEFS_TEFL          CAN_MCAN_TXEFS_TEFL_MSK
1418 
1419 #else /* CONFIG_CAN_STM32FD */
1420 /* Event FIFO Fill Level */
1421 #define CAN_MCAN_TXEFS_EFFL_POS      (0U)
1422 #define CAN_MCAN_TXEFS_EFFL_MSK      (0x3FUL << CAN_MCAN_TXEFS_EFFL_POS)
1423 #define CAN_MCAN_TXEFS_EFFL          CAN_MCAN_TXEFS_EFFL_MSK
1424 /* Event FIFO Get Index */
1425 #define CAN_MCAN_TXEFS_EFGI_POS      (8U)
1426 #define CAN_MCAN_TXEFS_EFGI_MSK      (0x1FUL << CAN_MCAN_TXEFS_EFGI_POS)
1427 #define CAN_MCAN_TXEFS_EFGI          CAN_MCAN_TXEFS_EFGI_MSK
1428 #define CAN_MCAN_TXEFS_EFPI_POS      (16U)
1429 /* Event FIFO Put Index */
1430 #define CAN_MCAN_TXEFS_EFPI_MSK      (0x1FUL << CAN_MCAN_TXEFS_EFPI_POS)
1431 #define CAN_MCAN_TXEFS_EFPI          CAN_MCAN_TXEFS_EFPI_MSK
1432 /* Event FIFO Full */
1433 #define CAN_MCAN_TXEFS_EFF_POS       (24U)
1434 #define CAN_MCAN_TXEFS_EFF_MSK       (0x1UL << CAN_MCAN_TXEFS_EFF_POS)
1435 #define CAN_MCAN_TXEFS_EFF           CAN_MCAN_TXEFS_EFF_MSK
1436 /* Tx Event FIFO Element Lost */
1437 #define CAN_MCAN_TXEFS_TEFL_POS      (25U)
1438 #define CAN_MCAN_TXEFS_TEFL_MSK      (0x1UL << CAN_MCAN_TXEFS_TEFL_POS)
1439 #define CAN_MCAN_TXEFS_TEFL          CAN_MCAN_TXEFS_TEFL_MSK
1440 
1441 #endif /* CONFIG_CAN_STM32FD */
1442 
1443 /***************  Bit definition for CAN_MCAN_TXEFA register  *****************/
1444 #ifdef CONFIG_CAN_STM32FD
1445 /* Event FIFO Acknowledge Index */
1446 #define CAN_MCAN_TXEFA_EFAI_POS      (0U)
1447 #define CAN_MCAN_TXEFA_EFAI_MSK      (0x3UL << CAN_MCAN_TXEFA_EFAI_POS)
1448 #define CAN_MCAN_TXEFA_EFAI          CAN_MCAN_TXEFA_EFAI_MSK
1449 #else
1450 /* Event FIFO Acknowledge Index */
1451 #define CAN_MCAN_TXEFA_EFAI_POS      (0U)
1452 #define CAN_MCAN_TXEFA_EFAI_MSK      (0x1FUL << CAN_MCAN_TXEFA_EFAI_POS)
1453 #define CAN_MCAN_TXEFA_EFAI          CAN_MCAN_TXEFA_EFAI_MSK
1454 #endif /* CONFIG_CAN_STM32FD */
1455 
1456 #ifdef CONFIG_CAN_STM32FD
1457 struct can_mcan_reg {
1458 	volatile uint32_t crel;     /* Core Release Register */
1459 	volatile uint32_t endn;     /* Endian Register */
1460 	volatile uint32_t cust;     /* Customer Register */
1461 	volatile uint32_t dbtp;     /* Data Bit Timing & Prescaler Register */
1462 	volatile uint32_t test;     /* Test Register */
1463 	volatile uint32_t rwd;      /* RAM Watchdog */
1464 	volatile uint32_t cccr;     /* CC Control Register */
1465 	volatile uint32_t nbtp;     /* Nominal Bit Timing & Prescaler Register */
1466 	volatile uint32_t tscc;     /* Timestamp Counter Configuration */
1467 	volatile uint32_t tscv;     /* Timestamp Counter Value */
1468 	volatile uint32_t tocc;     /* Timeout Counter Configuration */
1469 	volatile uint32_t tocv;     /* Timeout Counter Value */
1470 	uint32_t res1[4];           /* Reserved (4) */
1471 	volatile uint32_t ecr;      /* Error Counter Register */
1472 	volatile uint32_t psr;      /* Protocol Status Register */
1473 	volatile uint32_t tdcr;     /* Transmitter Delay Compensation */
1474 	uint32_t res2;              /* Reserved (1) */
1475 	volatile uint32_t ir;       /* Interrupt Register */
1476 	volatile uint32_t ie;       /* Interrupt Enable */
1477 	volatile uint32_t ils;      /* Interrupt Line Select */
1478 	volatile uint32_t ile;      /* Interrupt Line Enable */
1479 	uint32_t res3[8];           /* Reserved (8) */
1480 	volatile uint32_t rxgfc;    /* Global Filter Configuration */
1481 	volatile uint32_t xidam;    /* Extended ID AND Mask */
1482 	volatile uint32_t hpms;     /* High Priority Message Status */
1483 	uint32_t res4;              /* Reserved (1) */
1484 	volatile uint32_t rxf0s;    /* Rx FIFO 0 Status */
1485 	volatile uint32_t rxf0a;    /* Rx FIFO 0 Acknowledge */
1486 	volatile uint32_t rxf1s;    /* Rx FIFO 1 Status */
1487 	volatile uint32_t rxf1a;    /* Rx FIFO 1 Acknowledge */
1488 	uint32_t res5[8];           /* Reserved (8) */
1489 	volatile uint32_t txbc;     /* Tx Buffer Configuration */
1490 	volatile uint32_t txfqs;    /* Tx FIFO/Queue Status */
1491 	volatile uint32_t txbrp;    /* Tx Buffer Request Pending */
1492 	volatile uint32_t txbar;    /* Tx Buffer Add Request */
1493 	volatile uint32_t txbcr;    /* Tx Buffer Cancellation */
1494 	volatile uint32_t txbto;    /* Tx Buffer Transmission */
1495 	volatile uint32_t txbcf;    /* Tx Buffer Cancellation Finished */
1496 	volatile uint32_t txbtie;   /* Tx Buffer Transmission Interrupt Enable */
1497 	volatile uint32_t txcbie;   /* Tx Buffer Cancellation Fi.Interrupt En. */
1498 	volatile uint32_t txefs;    /* Tx Event FIFO Status */
1499 	volatile uint32_t txefa;    /* Tx Event FIFO Acknowledge */
1500 };
1501 #else /* CONFIG_CAN_STM32FD */
1502 
1503 struct can_mcan_reg {
1504 	volatile uint32_t crel;     /* Core Release Register */
1505 	volatile uint32_t endn;     /* Endian Register */
1506 	volatile uint32_t cust;     /* Customer Register */
1507 	volatile uint32_t dbtp;     /* Data Bit Timing & Prescaler Register */
1508 	volatile uint32_t test;     /* Test Register */
1509 	volatile uint32_t rwd;      /* RAM Watchdog */
1510 	volatile uint32_t cccr;     /* CC Control Register */
1511 	volatile uint32_t nbtp;     /* Nominal Bit Timing & Prescaler Register */
1512 	volatile uint32_t tscc;     /* Timestamp Counter Configuration */
1513 	volatile uint32_t tscv;     /* Timestamp Counter Value */
1514 	volatile uint32_t tocc;     /* Timeout Counter Configuration */
1515 	volatile uint32_t tocv;     /* Timeout Counter Value */
1516 	uint32_t res1[4];           /* Reserved (4) */
1517 	volatile uint32_t ecr;      /* Error Counter Register */
1518 	volatile uint32_t psr;      /* Protocol Status Register */
1519 	volatile uint32_t tdcr;     /* Transmitter Delay Compensation */
1520 	uint32_t res2;              /* Reserved (1) */
1521 	volatile uint32_t ir;       /* Interrupt Register */
1522 	volatile uint32_t ie;       /* Interrupt Enable */
1523 	volatile uint32_t ils;      /* Interrupt Line Select */
1524 	volatile uint32_t ile;      /* Interrupt Line Enable */
1525 	uint32_t res3[8];           /* Reserved (8) */
1526 	volatile uint32_t gfc;      /* Global Filter Configuration */
1527 	volatile uint32_t sidfc;    /* Standard ID Filter Configuration */
1528 	volatile uint32_t xidfc;    /* Extended ID Filter Configuration */
1529 	volatile uint32_t res4;     /* Reserved (1) */
1530 	volatile uint32_t xidam;    /* Extended ID AND Mask */
1531 	volatile uint32_t hpms;     /* High Priority Message Status */
1532 	volatile uint32_t ndata1;   /* New Data 1 */
1533 	volatile uint32_t ndata2;   /* New Data 2 */
1534 	volatile uint32_t rxf0c;    /* Rx FIFO 0 Configuration */
1535 	volatile uint32_t rxf0s;    /* Rx FIFO 0 Status */
1536 	volatile uint32_t rxf0a;    /* FIFO 0 Acknowledge */
1537 	volatile uint32_t rxbc;     /* Rx Buffer Configuration */
1538 	volatile uint32_t rxf1c;    /* Rx FIFO 1 Configuration */
1539 	volatile uint32_t rxf1s;    /* Rx FIFO 1 Status */
1540 	volatile uint32_t rxf1a;    /* Rx FIFO 1 Acknowledge*/
1541 	volatile uint32_t rxesc;    /* Rx Buffer / FIFO Element Size Config */
1542 	volatile uint32_t txbc;     /* Buffer Configuration */
1543 	volatile uint32_t txfqs;    /* FIFO/Queue Status */
1544 	volatile uint32_t txesc;    /* Tx Buffer Element Size Configuration */
1545 	volatile uint32_t txbrp;    /* Buffer Request Pending */
1546 	volatile uint32_t txbar;    /* Add Request */
1547 	volatile uint32_t txbcr;    /* Buffer Cancellation Request */
1548 	volatile uint32_t txbto;    /* Tx Buffer Transmission Occurred  */
1549 	volatile uint32_t txbcf;    /* Tx Buffer Cancellation Finished */
1550 	volatile uint32_t txbtie;   /* Tx Buffer Transmission Interrupt Enable */
1551 	volatile uint32_t txbcie;   /* Tx Buffer Cancellation Fin. Interrupt En. */
1552 	volatile uint32_t res5[2];  /* Reserved (2) */
1553 	volatile uint32_t txefc;    /* Tx Event FIFO Configuration */
1554 	volatile uint32_t txefs;    /* Tx Event FIFO Status */
1555 	volatile uint32_t txefa;    /* Tx Event FIFO Acknowledge */
1556 };
1557 
1558 #endif /* CONFIG_CAN_STM32FD */
1559 
1560 #endif /*ZEPHYR_DRIVERS_CAN_MCAN_INT_H_*/
1561