mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-06 07:53:57 -04:00
HAL_ChibiOS: fixed DMA lock in SoftSigReader
This commit is contained in:
parent
1aa6a0068a
commit
7e19f49e42
@ -36,11 +36,13 @@ bool SoftSigReader::attach_capture_timer(ICUDriver* icu_drv, icuchannel_t chan,
|
|||||||
_icu_drv = icu_drv;
|
_icu_drv = icu_drv;
|
||||||
//Setup Burst transfer of period and width measurement
|
//Setup Burst transfer of period and width measurement
|
||||||
dma = STM32_DMA_STREAM(dma_stream);
|
dma = STM32_DMA_STREAM(dma_stream);
|
||||||
|
chSysLock();
|
||||||
bool dma_allocated = dmaStreamAllocate(dma,
|
bool dma_allocated = dmaStreamAllocate(dma,
|
||||||
12, //IRQ Priority
|
12, //IRQ Priority
|
||||||
(stm32_dmaisr_t)_irq_handler,
|
(stm32_dmaisr_t)_irq_handler,
|
||||||
(void *)this);
|
(void *)this);
|
||||||
osalDbgAssert(!dma_allocated, "stream already allocated");
|
osalDbgAssert(!dma_allocated, "stream already allocated");
|
||||||
|
chSysUnlock();
|
||||||
//setup address for full word transfer from Timer
|
//setup address for full word transfer from Timer
|
||||||
dmaStreamSetPeripheral(dma, &icu_drv->tim->DMAR);
|
dmaStreamSetPeripheral(dma, &icu_drv->tim->DMAR);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user