bxcan.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
3  * Bit definitions were copied from NuttX STM32 CAN driver.
4  */
5 
6 #pragma once
7 
9 
10 #include <uavcan/uavcan.hpp>
11 #include <stdint.h>
12 
13 #ifndef UAVCAN_CPP_VERSION
14 # error UAVCAN_CPP_VERSION
15 #endif
16 
17 #if UAVCAN_CPP_VERSION < UAVCAN_CPP11
18 // #undef'ed at the end of this file
19 # define constexpr const
20 #endif
21 
22 namespace uavcan_stm32
23 {
24 namespace bxcan
25 {
26 
28 {
29  volatile uint32_t TIR;
30  volatile uint32_t TDTR;
31  volatile uint32_t TDLR;
32  volatile uint32_t TDHR;
33 };
34 
36 {
37  volatile uint32_t RIR;
38  volatile uint32_t RDTR;
39  volatile uint32_t RDLR;
40  volatile uint32_t RDHR;
41 };
42 
44 {
45  volatile uint32_t FR1;
46  volatile uint32_t FR2;
47 };
48 
49 struct CanType
50 {
51  volatile uint32_t MCR;
52  volatile uint32_t MSR;
53  volatile uint32_t TSR;
54  volatile uint32_t RF0R;
55  volatile uint32_t RF1R;
56  volatile uint32_t IER;
57  volatile uint32_t ESR;
58  volatile uint32_t BTR;
63  volatile uint32_t FMR;
64  volatile uint32_t FM1R;
66  volatile uint32_t FS1R;
68  volatile uint32_t FFA1R;
70  volatile uint32_t FA1R;
73 };
74 
78 CanType* const Can[UAVCAN_STM32_NUM_IFACES] =
79 {
80  reinterpret_cast<CanType*>(0x40006400)
81 #if UAVCAN_STM32_NUM_IFACES > 1
82  ,
83  reinterpret_cast<CanType*>(0x40006800)
84 #endif
85 };
86 
87 /* CAN master control register */
88 
89 constexpr unsigned long MCR_INRQ = (1U << 0); /* Bit 0: Initialization Request */
90 constexpr unsigned long MCR_SLEEP = (1U << 1); /* Bit 1: Sleep Mode Request */
91 constexpr unsigned long MCR_TXFP = (1U << 2); /* Bit 2: Transmit FIFO Priority */
92 constexpr unsigned long MCR_RFLM = (1U << 3); /* Bit 3: Receive FIFO Locked Mode */
93 constexpr unsigned long MCR_NART = (1U << 4); /* Bit 4: No Automatic Retransmission */
94 constexpr unsigned long MCR_AWUM = (1U << 5); /* Bit 5: Automatic Wakeup Mode */
95 constexpr unsigned long MCR_ABOM = (1U << 6); /* Bit 6: Automatic Bus-Off Management */
96 constexpr unsigned long MCR_TTCM = (1U << 7); /* Bit 7: Time Triggered Communication Mode Enable */
97 constexpr unsigned long MCR_RESET = (1U << 15);/* Bit 15: bxCAN software master reset */
98 constexpr unsigned long MCR_DBF = (1U << 16);/* Bit 16: Debug freeze */
99 
100 /* CAN master status register */
101 
102 constexpr unsigned long MSR_INAK = (1U << 0); /* Bit 0: Initialization Acknowledge */
103 constexpr unsigned long MSR_SLAK = (1U << 1); /* Bit 1: Sleep Acknowledge */
104 constexpr unsigned long MSR_ERRI = (1U << 2); /* Bit 2: Error Interrupt */
105 constexpr unsigned long MSR_WKUI = (1U << 3); /* Bit 3: Wakeup Interrupt */
106 constexpr unsigned long MSR_SLAKI = (1U << 4); /* Bit 4: Sleep acknowledge interrupt */
107 constexpr unsigned long MSR_TXM = (1U << 8); /* Bit 8: Transmit Mode */
108 constexpr unsigned long MSR_RXM = (1U << 9); /* Bit 9: Receive Mode */
109 constexpr unsigned long MSR_SAMP = (1U << 10);/* Bit 10: Last Sample Point */
110 constexpr unsigned long MSR_RX = (1U << 11);/* Bit 11: CAN Rx Signal */
111 
112 /* CAN transmit status register */
113 
114 constexpr unsigned long TSR_RQCP0 = (1U << 0); /* Bit 0: Request Completed Mailbox 0 */
115 constexpr unsigned long TSR_TXOK0 = (1U << 1); /* Bit 1 : Transmission OK of Mailbox 0 */
116 constexpr unsigned long TSR_ALST0 = (1U << 2); /* Bit 2 : Arbitration Lost for Mailbox 0 */
117 constexpr unsigned long TSR_TERR0 = (1U << 3); /* Bit 3 : Transmission Error of Mailbox 0 */
118 constexpr unsigned long TSR_ABRQ0 = (1U << 7); /* Bit 7 : Abort Request for Mailbox 0 */
119 constexpr unsigned long TSR_RQCP1 = (1U << 8); /* Bit 8 : Request Completed Mailbox 1 */
120 constexpr unsigned long TSR_TXOK1 = (1U << 9); /* Bit 9 : Transmission OK of Mailbox 1 */
121 constexpr unsigned long TSR_ALST1 = (1U << 10);/* Bit 10 : Arbitration Lost for Mailbox 1 */
122 constexpr unsigned long TSR_TERR1 = (1U << 11);/* Bit 11 : Transmission Error of Mailbox 1 */
123 constexpr unsigned long TSR_ABRQ1 = (1U << 15);/* Bit 15 : Abort Request for Mailbox 1 */
124 constexpr unsigned long TSR_RQCP2 = (1U << 16);/* Bit 16 : Request Completed Mailbox 2 */
125 constexpr unsigned long TSR_TXOK2 = (1U << 17);/* Bit 17 : Transmission OK of Mailbox 2 */
126 constexpr unsigned long TSR_ALST2 = (1U << 18);/* Bit 18: Arbitration Lost for Mailbox 2 */
127 constexpr unsigned long TSR_TERR2 = (1U << 19);/* Bit 19: Transmission Error of Mailbox 2 */
128 constexpr unsigned long TSR_ABRQ2 = (1U << 23);/* Bit 23: Abort Request for Mailbox 2 */
129 constexpr unsigned long TSR_CODE_SHIFT = (24U); /* Bits 25-24: Mailbox Code */
130 constexpr unsigned long TSR_CODE_MASK = (3U << TSR_CODE_SHIFT);
131 constexpr unsigned long TSR_TME0 = (1U << 26);/* Bit 26: Transmit Mailbox 0 Empty */
132 constexpr unsigned long TSR_TME1 = (1U << 27);/* Bit 27: Transmit Mailbox 1 Empty */
133 constexpr unsigned long TSR_TME2 = (1U << 28);/* Bit 28: Transmit Mailbox 2 Empty */
134 constexpr unsigned long TSR_LOW0 = (1U << 29);/* Bit 29: Lowest Priority Flag for Mailbox 0 */
135 constexpr unsigned long TSR_LOW1 = (1U << 30);/* Bit 30: Lowest Priority Flag for Mailbox 1 */
136 constexpr unsigned long TSR_LOW2 = (1U << 31);/* Bit 31: Lowest Priority Flag for Mailbox 2 */
137 
138 /* CAN receive FIFO 0/1 registers */
139 
140 constexpr unsigned long RFR_FMP_SHIFT = (0U); /* Bits 1-0: FIFO Message Pending */
141 constexpr unsigned long RFR_FMP_MASK = (3U << RFR_FMP_SHIFT);
142 constexpr unsigned long RFR_FULL = (1U << 3); /* Bit 3: FIFO 0 Full */
143 constexpr unsigned long RFR_FOVR = (1U << 4); /* Bit 4: FIFO 0 Overrun */
144 constexpr unsigned long RFR_RFOM = (1U << 5); /* Bit 5: Release FIFO 0 Output Mailbox */
145 
146 /* CAN interrupt enable register */
147 
148 constexpr unsigned long IER_TMEIE = (1U << 0); /* Bit 0: Transmit Mailbox Empty Interrupt Enable */
149 constexpr unsigned long IER_FMPIE0 = (1U << 1); /* Bit 1: FIFO Message Pending Interrupt Enable */
150 constexpr unsigned long IER_FFIE0 = (1U << 2); /* Bit 2: FIFO Full Interrupt Enable */
151 constexpr unsigned long IER_FOVIE0 = (1U << 3); /* Bit 3: FIFO Overrun Interrupt Enable */
152 constexpr unsigned long IER_FMPIE1 = (1U << 4); /* Bit 4: FIFO Message Pending Interrupt Enable */
153 constexpr unsigned long IER_FFIE1 = (1U << 5); /* Bit 5: FIFO Full Interrupt Enable */
154 constexpr unsigned long IER_FOVIE1 = (1U << 6); /* Bit 6: FIFO Overrun Interrupt Enable */
155 constexpr unsigned long IER_EWGIE = (1U << 8); /* Bit 8: Error Warning Interrupt Enable */
156 constexpr unsigned long IER_EPVIE = (1U << 9); /* Bit 9: Error Passive Interrupt Enable */
157 constexpr unsigned long IER_BOFIE = (1U << 10);/* Bit 10: Bus-Off Interrupt Enable */
158 constexpr unsigned long IER_LECIE = (1U << 11);/* Bit 11: Last Error Code Interrupt Enable */
159 constexpr unsigned long IER_ERRIE = (1U << 15);/* Bit 15: Error Interrupt Enable */
160 constexpr unsigned long IER_WKUIE = (1U << 16);/* Bit 16: Wakeup Interrupt Enable */
161 constexpr unsigned long IER_SLKIE = (1U << 17);/* Bit 17: Sleep Interrupt Enable */
162 
163 /* CAN error status register */
164 
165 constexpr unsigned long ESR_EWGF = (1U << 0); /* Bit 0: Error Warning Flag */
166 constexpr unsigned long ESR_EPVF = (1U << 1); /* Bit 1: Error Passive Flag */
167 constexpr unsigned long ESR_BOFF = (1U << 2); /* Bit 2: Bus-Off Flag */
168 constexpr unsigned long ESR_LEC_SHIFT = (4U); /* Bits 6-4: Last Error Code */
169 constexpr unsigned long ESR_LEC_MASK = (7U << ESR_LEC_SHIFT);
170 constexpr unsigned long ESR_NOERROR = (0U << ESR_LEC_SHIFT);/* 000: No Error */
171 constexpr unsigned long ESR_STUFFERROR = (1U << ESR_LEC_SHIFT);/* 001: Stuff Error */
172 constexpr unsigned long ESR_FORMERROR = (2U << ESR_LEC_SHIFT);/* 010: Form Error */
173 constexpr unsigned long ESR_ACKERROR = (3U << ESR_LEC_SHIFT);/* 011: Acknowledgment Error */
174 constexpr unsigned long ESR_BRECERROR = (4U << ESR_LEC_SHIFT);/* 100: Bit recessive Error */
175 constexpr unsigned long ESR_BDOMERROR = (5U << ESR_LEC_SHIFT);/* 101: Bit dominant Error */
176 constexpr unsigned long ESR_CRCERRPR = (6U << ESR_LEC_SHIFT);/* 110: CRC Error */
177 constexpr unsigned long ESR_SWERROR = (7U << ESR_LEC_SHIFT);/* 111: Set by software */
178 constexpr unsigned long ESR_TEC_SHIFT = (16U); /* Bits 23-16: LS byte of the 9-bit Transmit Error Counter */
179 constexpr unsigned long ESR_TEC_MASK = (0xFFU << ESR_TEC_SHIFT);
180 constexpr unsigned long ESR_REC_SHIFT = (24U); /* Bits 31-24: Receive Error Counter */
181 constexpr unsigned long ESR_REC_MASK = (0xFFU << ESR_REC_SHIFT);
182 
183 /* CAN bit timing register */
184 
185 constexpr unsigned long BTR_BRP_SHIFT = (0U); /* Bits 9-0: Baud Rate Prescaler */
186 constexpr unsigned long BTR_BRP_MASK = (0x03FFU << BTR_BRP_SHIFT);
187 constexpr unsigned long BTR_TS1_SHIFT = (16U); /* Bits 19-16: Time Segment 1 */
188 constexpr unsigned long BTR_TS1_MASK = (0x0FU << BTR_TS1_SHIFT);
189 constexpr unsigned long BTR_TS2_SHIFT = (20U); /* Bits 22-20: Time Segment 2 */
190 constexpr unsigned long BTR_TS2_MASK = (7U << BTR_TS2_SHIFT);
191 constexpr unsigned long BTR_SJW_SHIFT = (24U); /* Bits 25-24: Resynchronization Jump Width */
192 constexpr unsigned long BTR_SJW_MASK = (3U << BTR_SJW_SHIFT);
193 constexpr unsigned long BTR_LBKM = (1U << 30);/* Bit 30: Loop Back Mode (Debug);*/
194 constexpr unsigned long BTR_SILM = (1U << 31);/* Bit 31: Silent Mode (Debug);*/
195 
196 constexpr unsigned long BTR_BRP_MAX = (1024U); /* Maximum BTR value (without decrement);*/
197 constexpr unsigned long BTR_TSEG1_MAX = (16U); /* Maximum TSEG1 value (without decrement);*/
198 constexpr unsigned long BTR_TSEG2_MAX = (8U); /* Maximum TSEG2 value (without decrement);*/
199 
200 /* TX mailbox identifier register */
201 
202 constexpr unsigned long TIR_TXRQ = (1U << 0); /* Bit 0: Transmit Mailbox Request */
203 constexpr unsigned long TIR_RTR = (1U << 1); /* Bit 1: Remote Transmission Request */
204 constexpr unsigned long TIR_IDE = (1U << 2); /* Bit 2: Identifier Extension */
205 constexpr unsigned long TIR_EXID_SHIFT = (3U); /* Bit 3-31: Extended Identifier */
206 constexpr unsigned long TIR_EXID_MASK = (0x1FFFFFFFU << TIR_EXID_SHIFT);
207 constexpr unsigned long TIR_STID_SHIFT = (21U); /* Bits 21-31: Standard Identifier */
208 constexpr unsigned long TIR_STID_MASK = (0x07FFU << TIR_STID_SHIFT);
209 
210 /* Mailbox data length control and time stamp register */
211 
212 constexpr unsigned long TDTR_DLC_SHIFT = (0U); /* Bits 3:0: Data Length Code */
213 constexpr unsigned long TDTR_DLC_MASK = (0x0FU << TDTR_DLC_SHIFT);
214 constexpr unsigned long TDTR_TGT = (1U << 8); /* Bit 8: Transmit Global Time */
215 constexpr unsigned long TDTR_TIME_SHIFT = (16U); /* Bits 31:16: Message Time Stamp */
216 constexpr unsigned long TDTR_TIME_MASK = (0xFFFFU << TDTR_TIME_SHIFT);
217 
218 /* Mailbox data low register */
219 
220 constexpr unsigned long TDLR_DATA0_SHIFT = (0U); /* Bits 7-0: Data Byte 0 */
221 constexpr unsigned long TDLR_DATA0_MASK = (0xFFU << TDLR_DATA0_SHIFT);
222 constexpr unsigned long TDLR_DATA1_SHIFT = (8U); /* Bits 15-8: Data Byte 1 */
223 constexpr unsigned long TDLR_DATA1_MASK = (0xFFU << TDLR_DATA1_SHIFT);
224 constexpr unsigned long TDLR_DATA2_SHIFT = (16U); /* Bits 23-16: Data Byte 2 */
225 constexpr unsigned long TDLR_DATA2_MASK = (0xFFU << TDLR_DATA2_SHIFT);
226 constexpr unsigned long TDLR_DATA3_SHIFT = (24U); /* Bits 31-24: Data Byte 3 */
227 constexpr unsigned long TDLR_DATA3_MASK = (0xFFU << TDLR_DATA3_SHIFT);
228 
229 /* Mailbox data high register */
230 
231 constexpr unsigned long TDHR_DATA4_SHIFT = (0U); /* Bits 7-0: Data Byte 4 */
232 constexpr unsigned long TDHR_DATA4_MASK = (0xFFU << TDHR_DATA4_SHIFT);
233 constexpr unsigned long TDHR_DATA5_SHIFT = (8U); /* Bits 15-8: Data Byte 5 */
234 constexpr unsigned long TDHR_DATA5_MASK = (0xFFU << TDHR_DATA5_SHIFT);
235 constexpr unsigned long TDHR_DATA6_SHIFT = (16U); /* Bits 23-16: Data Byte 6 */
236 constexpr unsigned long TDHR_DATA6_MASK = (0xFFU << TDHR_DATA6_SHIFT);
237 constexpr unsigned long TDHR_DATA7_SHIFT = (24U); /* Bits 31-24: Data Byte 7 */
238 constexpr unsigned long TDHR_DATA7_MASK = (0xFFU << TDHR_DATA7_SHIFT);
239 
240 /* Rx FIFO mailbox identifier register */
241 
242 constexpr unsigned long RIR_RTR = (1U << 1); /* Bit 1: Remote Transmission Request */
243 constexpr unsigned long RIR_IDE = (1U << 2); /* Bit 2: Identifier Extension */
244 constexpr unsigned long RIR_EXID_SHIFT = (3U); /* Bit 3-31: Extended Identifier */
245 constexpr unsigned long RIR_EXID_MASK = (0x1FFFFFFFU << RIR_EXID_SHIFT);
246 constexpr unsigned long RIR_STID_SHIFT = (21U); /* Bits 21-31: Standard Identifier */
247 constexpr unsigned long RIR_STID_MASK = (0x07FFU << RIR_STID_SHIFT);
248 
249 /* Receive FIFO mailbox data length control and time stamp register */
250 
251 constexpr unsigned long RDTR_DLC_SHIFT = (0U); /* Bits 3:0: Data Length Code */
252 constexpr unsigned long RDTR_DLC_MASK = (0x0FU << RDTR_DLC_SHIFT);
253 constexpr unsigned long RDTR_FM_SHIFT = (8U); /* Bits 15-8: Filter Match Index */
254 constexpr unsigned long RDTR_FM_MASK = (0xFFU << RDTR_FM_SHIFT);
255 constexpr unsigned long RDTR_TIME_SHIFT = (16U); /* Bits 31:16: Message Time Stamp */
256 constexpr unsigned long RDTR_TIME_MASK = (0xFFFFU << RDTR_TIME_SHIFT);
257 
258 /* Receive FIFO mailbox data low register */
259 
260 constexpr unsigned long RDLR_DATA0_SHIFT = (0U); /* Bits 7-0: Data Byte 0 */
261 constexpr unsigned long RDLR_DATA0_MASK = (0xFFU << RDLR_DATA0_SHIFT);
262 constexpr unsigned long RDLR_DATA1_SHIFT = (8U); /* Bits 15-8: Data Byte 1 */
263 constexpr unsigned long RDLR_DATA1_MASK = (0xFFU << RDLR_DATA1_SHIFT);
264 constexpr unsigned long RDLR_DATA2_SHIFT = (16U); /* Bits 23-16: Data Byte 2 */
265 constexpr unsigned long RDLR_DATA2_MASK = (0xFFU << RDLR_DATA2_SHIFT);
266 constexpr unsigned long RDLR_DATA3_SHIFT = (24U); /* Bits 31-24: Data Byte 3 */
267 constexpr unsigned long RDLR_DATA3_MASK = (0xFFU << RDLR_DATA3_SHIFT);
268 
269 /* Receive FIFO mailbox data high register */
270 
271 constexpr unsigned long RDHR_DATA4_SHIFT = (0U); /* Bits 7-0: Data Byte 4 */
272 constexpr unsigned long RDHR_DATA4_MASK = (0xFFU << RDHR_DATA4_SHIFT);
273 constexpr unsigned long RDHR_DATA5_SHIFT = (8U); /* Bits 15-8: Data Byte 5 */
274 constexpr unsigned long RDHR_DATA5_MASK = (0xFFU << RDHR_DATA5_SHIFT);
275 constexpr unsigned long RDHR_DATA6_SHIFT = (16U); /* Bits 23-16: Data Byte 6 */
276 constexpr unsigned long RDHR_DATA6_MASK = (0xFFU << RDHR_DATA6_SHIFT);
277 constexpr unsigned long RDHR_DATA7_SHIFT = (24U); /* Bits 31-24: Data Byte 7 */
278 constexpr unsigned long RDHR_DATA7_MASK = (0xFFU << RDHR_DATA7_SHIFT);
279 
280 /* CAN filter master register */
281 
282 constexpr unsigned long FMR_FINIT = (1U << 0); /* Bit 0: Filter Init Mode */
283 
284 }
285 }
286 
287 #if UAVCAN_CPP_VERSION < UAVCAN_CPP11
288 # undef constexpr
289 #endif
uavcan_stm32::bxcan::CanType::RESERVED3
uint32_t RESERVED3
Definition: bxcan.hpp:67
uavcan_stm32::bxcan::RFR_FULL
constexpr unsigned long RFR_FULL
Definition: bxcan.hpp:142
uavcan_stm32::bxcan::ESR_TEC_SHIFT
constexpr unsigned long ESR_TEC_SHIFT
Definition: bxcan.hpp:178
uavcan_stm32::bxcan::TDLR_DATA1_SHIFT
constexpr unsigned long TDLR_DATA1_SHIFT
Definition: bxcan.hpp:222
uavcan_stm32::bxcan::RDLR_DATA0_MASK
constexpr unsigned long RDLR_DATA0_MASK
Definition: bxcan.hpp:261
uavcan_stm32::bxcan::RIR_STID_SHIFT
constexpr unsigned long RIR_STID_SHIFT
Definition: bxcan.hpp:246
uavcan_stm32::bxcan::RDHR_DATA7_SHIFT
constexpr unsigned long RDHR_DATA7_SHIFT
Definition: bxcan.hpp:277
uavcan_stm32::bxcan::TDTR_TIME_MASK
constexpr unsigned long TDTR_TIME_MASK
Definition: bxcan.hpp:216
uavcan_stm32::bxcan::BTR_TS2_MASK
constexpr unsigned long BTR_TS2_MASK
Definition: bxcan.hpp:190
uavcan_stm32::bxcan::IER_FFIE0
constexpr unsigned long IER_FFIE0
Definition: bxcan.hpp:150
uavcan_stm32::bxcan::ESR_ACKERROR
constexpr unsigned long ESR_ACKERROR
Definition: bxcan.hpp:173
uavcan_stm32::bxcan::IER_EWGIE
constexpr unsigned long IER_EWGIE
Definition: bxcan.hpp:155
uavcan_stm32::bxcan::ESR_STUFFERROR
constexpr unsigned long ESR_STUFFERROR
Definition: bxcan.hpp:171
uavcan_stm32::bxcan::BTR_TSEG2_MAX
constexpr unsigned long BTR_TSEG2_MAX
Definition: bxcan.hpp:198
uavcan_stm32::bxcan::BTR_TS1_MASK
constexpr unsigned long BTR_TS1_MASK
Definition: bxcan.hpp:188
uavcan_stm32::bxcan::RDTR_TIME_MASK
constexpr unsigned long RDTR_TIME_MASK
Definition: bxcan.hpp:256
uavcan_stm32::bxcan::CanType::RF0R
volatile uint32_t RF0R
Definition: bxcan.hpp:54
uavcan_stm32::bxcan::TDLR_DATA0_SHIFT
constexpr unsigned long TDLR_DATA0_SHIFT
Definition: bxcan.hpp:220
uavcan_stm32::bxcan::ESR_BDOMERROR
constexpr unsigned long ESR_BDOMERROR
Definition: bxcan.hpp:175
uavcan_stm32::bxcan::RxMailboxType
Definition: bxcan.hpp:35
uavcan_stm32::bxcan::TSR_TXOK2
constexpr unsigned long TSR_TXOK2
Definition: bxcan.hpp:125
uavcan::uint32_t
std::uint32_t uint32_t
Definition: std.hpp:26
uavcan_stm32::bxcan::ESR_REC_SHIFT
constexpr unsigned long ESR_REC_SHIFT
Definition: bxcan.hpp:180
uavcan_stm32::bxcan::TxMailboxType::TIR
volatile uint32_t TIR
Definition: bxcan.hpp:29
uavcan_stm32::bxcan::MCR_DBF
constexpr unsigned long MCR_DBF
Definition: bxcan.hpp:98
uavcan_stm32::bxcan::CanType::FA1R
volatile uint32_t FA1R
Definition: bxcan.hpp:70
uavcan_stm32::bxcan::BTR_BRP_MAX
constexpr unsigned long BTR_BRP_MAX
Definition: bxcan.hpp:196
uavcan_stm32::bxcan::RDLR_DATA2_MASK
constexpr unsigned long RDLR_DATA2_MASK
Definition: bxcan.hpp:265
uavcan_stm32::bxcan::TSR_ALST0
constexpr unsigned long TSR_ALST0
Definition: bxcan.hpp:116
uavcan_stm32::bxcan::MCR_AWUM
constexpr unsigned long MCR_AWUM
Definition: bxcan.hpp:94
uavcan_stm32::bxcan::TSR_ABRQ0
constexpr unsigned long TSR_ABRQ0
Definition: bxcan.hpp:118
uavcan_stm32::bxcan::RxMailboxType::RDTR
volatile uint32_t RDTR
Definition: bxcan.hpp:38
uavcan_stm32::bxcan::TDHR_DATA4_MASK
constexpr unsigned long TDHR_DATA4_MASK
Definition: bxcan.hpp:232
uavcan_stm32::bxcan::TDHR_DATA5_MASK
constexpr unsigned long TDHR_DATA5_MASK
Definition: bxcan.hpp:234
uavcan_stm32::bxcan::RIR_EXID_MASK
constexpr unsigned long RIR_EXID_MASK
Definition: bxcan.hpp:245
uavcan_stm32::bxcan::IER_FOVIE1
constexpr unsigned long IER_FOVIE1
Definition: bxcan.hpp:154
uavcan_stm32::bxcan::TDTR_DLC_MASK
constexpr unsigned long TDTR_DLC_MASK
Definition: bxcan.hpp:213
build_config.hpp
uavcan_stm32::bxcan::RDTR_DLC_MASK
constexpr unsigned long RDTR_DLC_MASK
Definition: bxcan.hpp:252
uavcan_stm32::bxcan::IER_FMPIE0
constexpr unsigned long IER_FMPIE0
Definition: bxcan.hpp:149
uavcan_stm32::bxcan::CanType::ESR
volatile uint32_t ESR
Definition: bxcan.hpp:57
uavcan_stm32::bxcan::FMR_FINIT
constexpr unsigned long FMR_FINIT
Definition: bxcan.hpp:282
uavcan_stm32::bxcan::RxMailboxType::RDLR
volatile uint32_t RDLR
Definition: bxcan.hpp:39
uavcan_stm32
Definition: bxcan.hpp:22
uavcan_stm32::bxcan::BTR_TS2_SHIFT
constexpr unsigned long BTR_TS2_SHIFT
Definition: bxcan.hpp:189
uavcan_stm32::bxcan::MCR_ABOM
constexpr unsigned long MCR_ABOM
Definition: bxcan.hpp:95
uavcan_stm32::bxcan::ESR_LEC_MASK
constexpr unsigned long ESR_LEC_MASK
Definition: bxcan.hpp:169
uavcan_stm32::bxcan::RDTR_DLC_SHIFT
constexpr unsigned long RDTR_DLC_SHIFT
Definition: bxcan.hpp:251
uavcan_stm32::bxcan::MSR_WKUI
constexpr unsigned long MSR_WKUI
Definition: bxcan.hpp:105
uavcan_stm32::bxcan::CanType::FFA1R
volatile uint32_t FFA1R
Definition: bxcan.hpp:68
uavcan_stm32::bxcan::CanType::IER
volatile uint32_t IER
Definition: bxcan.hpp:56
uavcan_stm32::bxcan::IER_FMPIE1
constexpr unsigned long IER_FMPIE1
Definition: bxcan.hpp:152
uavcan_stm32::bxcan::RDLR_DATA0_SHIFT
constexpr unsigned long RDLR_DATA0_SHIFT
Definition: bxcan.hpp:260
uavcan_stm32::bxcan::ESR_BRECERROR
constexpr unsigned long ESR_BRECERROR
Definition: bxcan.hpp:174
uavcan_stm32::bxcan::RDHR_DATA5_SHIFT
constexpr unsigned long RDHR_DATA5_SHIFT
Definition: bxcan.hpp:273
uavcan_stm32::bxcan::MSR_RXM
constexpr unsigned long MSR_RXM
Definition: bxcan.hpp:108
uavcan_stm32::bxcan::TxMailboxType::TDLR
volatile uint32_t TDLR
Definition: bxcan.hpp:31
uavcan_stm32::bxcan::RDHR_DATA7_MASK
constexpr unsigned long RDHR_DATA7_MASK
Definition: bxcan.hpp:278
uavcan_stm32::bxcan::TSR_ABRQ1
constexpr unsigned long TSR_ABRQ1
Definition: bxcan.hpp:123
uavcan_stm32::bxcan::RxMailboxType::RDHR
volatile uint32_t RDHR
Definition: bxcan.hpp:40
uavcan_stm32::bxcan::TIR_EXID_SHIFT
constexpr unsigned long TIR_EXID_SHIFT
Definition: bxcan.hpp:205
uavcan_stm32::bxcan::ESR_EPVF
constexpr unsigned long ESR_EPVF
Definition: bxcan.hpp:166
uavcan_stm32::bxcan::TDHR_DATA5_SHIFT
constexpr unsigned long TDHR_DATA5_SHIFT
Definition: bxcan.hpp:233
uavcan_stm32::bxcan::CanType::RESERVED1
uint32_t RESERVED1[12]
Definition: bxcan.hpp:62
uavcan_stm32::bxcan::TSR_LOW0
constexpr unsigned long TSR_LOW0
Definition: bxcan.hpp:134
uavcan_stm32::bxcan::TDTR_TGT
constexpr unsigned long TDTR_TGT
Definition: bxcan.hpp:214
uavcan_stm32::bxcan::TDLR_DATA0_MASK
constexpr unsigned long TDLR_DATA0_MASK
Definition: bxcan.hpp:221
uavcan_stm32::bxcan::RDLR_DATA2_SHIFT
constexpr unsigned long RDLR_DATA2_SHIFT
Definition: bxcan.hpp:264
uavcan_stm32::bxcan::CanType::RESERVED5
uint32_t RESERVED5[8]
Definition: bxcan.hpp:71
uavcan_stm32::bxcan::TDLR_DATA3_SHIFT
constexpr unsigned long TDLR_DATA3_SHIFT
Definition: bxcan.hpp:226
uavcan_stm32::bxcan::TDTR_DLC_SHIFT
constexpr unsigned long TDTR_DLC_SHIFT
Definition: bxcan.hpp:212
uavcan_stm32::bxcan::RIR_IDE
constexpr unsigned long RIR_IDE
Definition: bxcan.hpp:243
uavcan_stm32::bxcan::TSR_ALST2
constexpr unsigned long TSR_ALST2
Definition: bxcan.hpp:126
uavcan_stm32::bxcan::RxMailboxType::RIR
volatile uint32_t RIR
Definition: bxcan.hpp:37
uavcan_stm32::bxcan::IER_BOFIE
constexpr unsigned long IER_BOFIE
Definition: bxcan.hpp:157
uavcan_stm32::bxcan::TSR_CODE_SHIFT
constexpr unsigned long TSR_CODE_SHIFT
Definition: bxcan.hpp:129
uavcan_stm32::bxcan::ESR_LEC_SHIFT
constexpr unsigned long ESR_LEC_SHIFT
Definition: bxcan.hpp:168
uavcan_stm32::bxcan::TSR_TME1
constexpr unsigned long TSR_TME1
Definition: bxcan.hpp:132
uavcan_stm32::bxcan::ESR_EWGF
constexpr unsigned long ESR_EWGF
Definition: bxcan.hpp:165
uavcan_stm32::bxcan::MCR_SLEEP
constexpr unsigned long MCR_SLEEP
Definition: bxcan.hpp:90
uavcan_stm32::bxcan::IER_EPVIE
constexpr unsigned long IER_EPVIE
Definition: bxcan.hpp:156
uavcan_stm32::bxcan::RIR_STID_MASK
constexpr unsigned long RIR_STID_MASK
Definition: bxcan.hpp:247
uavcan_stm32::bxcan::CanType::RF1R
volatile uint32_t RF1R
Definition: bxcan.hpp:55
uavcan_stm32::bxcan::RDLR_DATA3_MASK
constexpr unsigned long RDLR_DATA3_MASK
Definition: bxcan.hpp:267
uavcan_stm32::bxcan::TSR_TERR2
constexpr unsigned long TSR_TERR2
Definition: bxcan.hpp:127
uavcan_stm32::bxcan::IER_FFIE1
constexpr unsigned long IER_FFIE1
Definition: bxcan.hpp:153
uavcan_stm32::bxcan::TSR_TME2
constexpr unsigned long TSR_TME2
Definition: bxcan.hpp:133
uavcan_stm32::bxcan::ESR_BOFF
constexpr unsigned long ESR_BOFF
Definition: bxcan.hpp:167
uavcan_stm32::bxcan::TIR_RTR
constexpr unsigned long TIR_RTR
Definition: bxcan.hpp:203
uavcan_stm32::bxcan::MCR_TXFP
constexpr unsigned long MCR_TXFP
Definition: bxcan.hpp:91
uavcan_stm32::bxcan::RFR_FOVR
constexpr unsigned long RFR_FOVR
Definition: bxcan.hpp:143
uavcan_stm32::bxcan::TDHR_DATA6_MASK
constexpr unsigned long TDHR_DATA6_MASK
Definition: bxcan.hpp:236
uavcan_stm32::bxcan::MSR_ERRI
constexpr unsigned long MSR_ERRI
Definition: bxcan.hpp:104
uavcan_stm32::bxcan::TDHR_DATA7_MASK
constexpr unsigned long TDHR_DATA7_MASK
Definition: bxcan.hpp:238
uavcan_stm32::bxcan::CanType::FM1R
volatile uint32_t FM1R
Definition: bxcan.hpp:64
uavcan_stm32::bxcan::CanType::MSR
volatile uint32_t MSR
Definition: bxcan.hpp:52
uavcan_stm32::bxcan::BTR_SJW_SHIFT
constexpr unsigned long BTR_SJW_SHIFT
Definition: bxcan.hpp:191
uavcan_stm32::bxcan::RIR_EXID_SHIFT
constexpr unsigned long RIR_EXID_SHIFT
Definition: bxcan.hpp:244
uavcan_stm32::bxcan::MCR_RESET
constexpr unsigned long MCR_RESET
Definition: bxcan.hpp:97
uavcan_stm32::bxcan::ESR_TEC_MASK
constexpr unsigned long ESR_TEC_MASK
Definition: bxcan.hpp:179
uavcan_stm32::bxcan::FilterRegisterType
Definition: bxcan.hpp:43
uavcan_stm32::bxcan::TSR_RQCP0
constexpr unsigned long TSR_RQCP0
Definition: bxcan.hpp:114
uavcan_stm32::bxcan::BTR_LBKM
constexpr unsigned long BTR_LBKM
Definition: bxcan.hpp:193
uavcan_stm32::bxcan::MSR_TXM
constexpr unsigned long MSR_TXM
Definition: bxcan.hpp:107
uavcan_stm32::bxcan::CanType::FilterRegister
FilterRegisterType FilterRegister[28]
Definition: bxcan.hpp:72
uavcan_stm32::bxcan::IER_FOVIE0
constexpr unsigned long IER_FOVIE0
Definition: bxcan.hpp:151
uavcan_stm32::bxcan::RFR_FMP_SHIFT
constexpr unsigned long RFR_FMP_SHIFT
Definition: bxcan.hpp:140
uavcan_stm32::bxcan::CanType::MCR
volatile uint32_t MCR
Definition: bxcan.hpp:51
uavcan_stm32::bxcan::RDTR_TIME_SHIFT
constexpr unsigned long RDTR_TIME_SHIFT
Definition: bxcan.hpp:255
uavcan_stm32::bxcan::TxMailboxType::TDHR
volatile uint32_t TDHR
Definition: bxcan.hpp:32
uavcan_stm32::bxcan::ESR_FORMERROR
constexpr unsigned long ESR_FORMERROR
Definition: bxcan.hpp:172
uavcan_stm32::bxcan::MSR_RX
constexpr unsigned long MSR_RX
Definition: bxcan.hpp:110
uavcan_stm32::bxcan::TSR_TXOK0
constexpr unsigned long TSR_TXOK0
Definition: bxcan.hpp:115
uavcan_stm32::bxcan::RDLR_DATA1_MASK
constexpr unsigned long RDLR_DATA1_MASK
Definition: bxcan.hpp:263
uavcan_stm32::bxcan::TDLR_DATA1_MASK
constexpr unsigned long TDLR_DATA1_MASK
Definition: bxcan.hpp:223
uavcan_stm32::bxcan::TIR_EXID_MASK
constexpr unsigned long TIR_EXID_MASK
Definition: bxcan.hpp:206
uavcan_stm32::bxcan::IER_TMEIE
constexpr unsigned long IER_TMEIE
Definition: bxcan.hpp:148
uavcan_stm32::bxcan::IER_WKUIE
constexpr unsigned long IER_WKUIE
Definition: bxcan.hpp:160
uavcan_stm32::bxcan::RDHR_DATA5_MASK
constexpr unsigned long RDHR_DATA5_MASK
Definition: bxcan.hpp:274
uavcan_stm32::bxcan::TSR_LOW2
constexpr unsigned long TSR_LOW2
Definition: bxcan.hpp:136
uavcan_stm32::bxcan::TSR_TXOK1
constexpr unsigned long TSR_TXOK1
Definition: bxcan.hpp:120
uavcan_stm32::bxcan::MCR_NART
constexpr unsigned long MCR_NART
Definition: bxcan.hpp:93
uavcan_stm32::bxcan::MCR_INRQ
constexpr unsigned long MCR_INRQ
Definition: bxcan.hpp:89
uavcan_stm32::bxcan::ESR_NOERROR
constexpr unsigned long ESR_NOERROR
Definition: bxcan.hpp:170
uavcan_stm32::bxcan::RDTR_FM_SHIFT
constexpr unsigned long RDTR_FM_SHIFT
Definition: bxcan.hpp:253
uavcan_stm32::bxcan::TDLR_DATA2_SHIFT
constexpr unsigned long TDLR_DATA2_SHIFT
Definition: bxcan.hpp:224
uavcan_stm32::bxcan::TIR_IDE
constexpr unsigned long TIR_IDE
Definition: bxcan.hpp:204
uavcan_stm32::bxcan::CanType::FMR
volatile uint32_t FMR
Definition: bxcan.hpp:63
uavcan_stm32::bxcan::CanType::RESERVED4
uint32_t RESERVED4
Definition: bxcan.hpp:69
uavcan_stm32::bxcan::MSR_SLAK
constexpr unsigned long MSR_SLAK
Definition: bxcan.hpp:103
uavcan_stm32::bxcan::TSR_TERR0
constexpr unsigned long TSR_TERR0
Definition: bxcan.hpp:117
uavcan_stm32::bxcan::TDHR_DATA7_SHIFT
constexpr unsigned long TDHR_DATA7_SHIFT
Definition: bxcan.hpp:237
uavcan_stm32::bxcan::RDTR_FM_MASK
constexpr unsigned long RDTR_FM_MASK
Definition: bxcan.hpp:254
uavcan_stm32::bxcan::RDLR_DATA1_SHIFT
constexpr unsigned long RDLR_DATA1_SHIFT
Definition: bxcan.hpp:262
uavcan_stm32::bxcan::CanType::RESERVED2
uint32_t RESERVED2
Definition: bxcan.hpp:65
uavcan.hpp
uavcan_stm32::bxcan::TSR_CODE_MASK
constexpr unsigned long TSR_CODE_MASK
Definition: bxcan.hpp:130
uavcan_stm32::bxcan::RDHR_DATA6_SHIFT
constexpr unsigned long RDHR_DATA6_SHIFT
Definition: bxcan.hpp:275
uavcan_stm32::bxcan::TIR_STID_SHIFT
constexpr unsigned long TIR_STID_SHIFT
Definition: bxcan.hpp:207
uavcan_stm32::bxcan::BTR_BRP_MASK
constexpr unsigned long BTR_BRP_MASK
Definition: bxcan.hpp:186
uavcan_stm32::bxcan::CanType::RxMailbox
RxMailboxType RxMailbox[2]
Definition: bxcan.hpp:61
uavcan_stm32::bxcan::RDHR_DATA6_MASK
constexpr unsigned long RDHR_DATA6_MASK
Definition: bxcan.hpp:276
uavcan_stm32::bxcan::MSR_INAK
constexpr unsigned long MSR_INAK
Definition: bxcan.hpp:102
uavcan_stm32::bxcan::BTR_TS1_SHIFT
constexpr unsigned long BTR_TS1_SHIFT
Definition: bxcan.hpp:187
uavcan_stm32::bxcan::RIR_RTR
constexpr unsigned long RIR_RTR
Definition: bxcan.hpp:242
uavcan_stm32::bxcan::BTR_BRP_SHIFT
constexpr unsigned long BTR_BRP_SHIFT
Definition: bxcan.hpp:185
uavcan_stm32::bxcan::ESR_CRCERRPR
constexpr unsigned long ESR_CRCERRPR
Definition: bxcan.hpp:176
uavcan_stm32::bxcan::Can
CanType *const Can[UAVCAN_STM32_NUM_IFACES]
Definition: bxcan.hpp:78
uavcan_stm32::bxcan::TDHR_DATA6_SHIFT
constexpr unsigned long TDHR_DATA6_SHIFT
Definition: bxcan.hpp:235
uavcan_stm32::bxcan::CanType::FS1R
volatile uint32_t FS1R
Definition: bxcan.hpp:66
uavcan_stm32::bxcan::TSR_TERR1
constexpr unsigned long TSR_TERR1
Definition: bxcan.hpp:122
uavcan_stm32::bxcan::RDHR_DATA4_SHIFT
constexpr unsigned long RDHR_DATA4_SHIFT
Definition: bxcan.hpp:271
uavcan_stm32::bxcan::FilterRegisterType::FR2
volatile uint32_t FR2
Definition: bxcan.hpp:46
uavcan_stm32::bxcan::MSR_SLAKI
constexpr unsigned long MSR_SLAKI
Definition: bxcan.hpp:106
uavcan_stm32::bxcan::IER_ERRIE
constexpr unsigned long IER_ERRIE
Definition: bxcan.hpp:159
uavcan_stm32::bxcan::TDLR_DATA2_MASK
constexpr unsigned long TDLR_DATA2_MASK
Definition: bxcan.hpp:225
uavcan_stm32::bxcan::CanType::TSR
volatile uint32_t TSR
Definition: bxcan.hpp:53
uavcan_stm32::bxcan::RFR_RFOM
constexpr unsigned long RFR_RFOM
Definition: bxcan.hpp:144
uavcan_stm32::bxcan::TDTR_TIME_SHIFT
constexpr unsigned long TDTR_TIME_SHIFT
Definition: bxcan.hpp:215
uavcan_stm32::bxcan::RDLR_DATA3_SHIFT
constexpr unsigned long RDLR_DATA3_SHIFT
Definition: bxcan.hpp:266
uavcan_stm32::bxcan::CanType::BTR
volatile uint32_t BTR
Definition: bxcan.hpp:58
uavcan_stm32::bxcan::TSR_RQCP1
constexpr unsigned long TSR_RQCP1
Definition: bxcan.hpp:119
uavcan_stm32::bxcan::MCR_TTCM
constexpr unsigned long MCR_TTCM
Definition: bxcan.hpp:96
uavcan_stm32::bxcan::BTR_TSEG1_MAX
constexpr unsigned long BTR_TSEG1_MAX
Definition: bxcan.hpp:197
uavcan_stm32::bxcan::ESR_SWERROR
constexpr unsigned long ESR_SWERROR
Definition: bxcan.hpp:177
uavcan_stm32::bxcan::TIR_TXRQ
constexpr unsigned long TIR_TXRQ
Definition: bxcan.hpp:202
uavcan_stm32::bxcan::TSR_RQCP2
constexpr unsigned long TSR_RQCP2
Definition: bxcan.hpp:124
uavcan_stm32::bxcan::TxMailboxType
Definition: bxcan.hpp:27
uavcan_stm32::bxcan::TIR_STID_MASK
constexpr unsigned long TIR_STID_MASK
Definition: bxcan.hpp:208
uavcan_stm32::bxcan::TSR_TME0
constexpr unsigned long TSR_TME0
Definition: bxcan.hpp:131
uavcan_stm32::bxcan::TDHR_DATA4_SHIFT
constexpr unsigned long TDHR_DATA4_SHIFT
Definition: bxcan.hpp:231
uavcan_stm32::bxcan::FilterRegisterType::FR1
volatile uint32_t FR1
Definition: bxcan.hpp:45
uavcan_stm32::bxcan::RFR_FMP_MASK
constexpr unsigned long RFR_FMP_MASK
Definition: bxcan.hpp:141
uavcan_stm32::bxcan::CanType
Definition: bxcan.hpp:49
uavcan_stm32::bxcan::TDLR_DATA3_MASK
constexpr unsigned long TDLR_DATA3_MASK
Definition: bxcan.hpp:227
uavcan_stm32::bxcan::CanType::TxMailbox
TxMailboxType TxMailbox[3]
Definition: bxcan.hpp:60
uavcan_stm32::bxcan::ESR_REC_MASK
constexpr unsigned long ESR_REC_MASK
Definition: bxcan.hpp:181
uavcan_stm32::bxcan::TSR_ALST1
constexpr unsigned long TSR_ALST1
Definition: bxcan.hpp:121
uavcan_stm32::bxcan::MSR_SAMP
constexpr unsigned long MSR_SAMP
Definition: bxcan.hpp:109
uavcan_stm32::bxcan::IER_SLKIE
constexpr unsigned long IER_SLKIE
Definition: bxcan.hpp:161
uavcan_stm32::bxcan::BTR_SILM
constexpr unsigned long BTR_SILM
Definition: bxcan.hpp:194
uavcan_stm32::bxcan::CanType::RESERVED0
uint32_t RESERVED0[88]
Definition: bxcan.hpp:59
uavcan_stm32::bxcan::TSR_ABRQ2
constexpr unsigned long TSR_ABRQ2
Definition: bxcan.hpp:128
uavcan_stm32::bxcan::TSR_LOW1
constexpr unsigned long TSR_LOW1
Definition: bxcan.hpp:135
uavcan_stm32::bxcan::MCR_RFLM
constexpr unsigned long MCR_RFLM
Definition: bxcan.hpp:92
uavcan_stm32::bxcan::IER_LECIE
constexpr unsigned long IER_LECIE
Definition: bxcan.hpp:158
uavcan_stm32::bxcan::RDHR_DATA4_MASK
constexpr unsigned long RDHR_DATA4_MASK
Definition: bxcan.hpp:272
uavcan_stm32::bxcan::TxMailboxType::TDTR
volatile uint32_t TDTR
Definition: bxcan.hpp:30
uavcan_stm32::bxcan::BTR_SJW_MASK
constexpr unsigned long BTR_SJW_MASK
Definition: bxcan.hpp:192


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:02