Commit 01b08b2
committed
Disable UART2 DMA when using DSHOT to avoid DMA conflict
CF21BL uses DSHOT for brushless motors, which requires DMA1_Stream6.
UART2 TX also needs DMA1_Stream6, creating a conflict during ESP32 flashing.
Changes:
- Guard uart2DmaInit() with #ifndef CONFIG_MOTORS_ESC_PROTOCOL_DSHOT
- Guard initialDMACount variable (only used with DMA)
- Add fallback in uart2SendDataDmaBlocking() to use interrupt-based
uart2SendData() instead when DSHOT is enabled
This allows UART2 (and thus ESP32 flashing) to work on CF21BL by avoiding the DMA conflict
entirely - UART2 uses interrupts instead of DMA when motors need the stream.1 parent a18e216 commit 01b08b2
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
| 149 | + | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
| |||
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
198 | 209 | | |
199 | 210 | | |
200 | 211 | | |
| |||
217 | 228 | | |
218 | 229 | | |
219 | 230 | | |
| 231 | + | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| |||
0 commit comments