Commit 7504035
committed
fix(motors): move DMA claim before DeInit/register touch
Local CodeRabbit review flagged: LL_EX_DMA_DeInit()/DMA_DeInit()
(resets the DMA stream's registers) ran before the dmaAllocate()
check in the OWNER_MOTOR path, and pwm_output_dshot.c had the same
ordering issue in the OWNER_TIMUP burst path too. A failed claim on
a stream already held by an unrelated owner would deinit it out from
under that owner instead of leaving it untouched.
Moved both claim checks (dshotDmaClaim() for OWNER_TIMUP,
dmaAllocate() for OWNER_MOTOR) to before any DMA register access in
both files, matching the ordering already established for LED strip
and transponder.1 parent c5a4958 commit 7504035
2 files changed
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
215 | 223 | | |
216 | 224 | | |
217 | 225 | | |
| |||
220 | 228 | | |
221 | 229 | | |
222 | 230 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
243 | 247 | | |
244 | 248 | | |
245 | 249 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
0 commit comments