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