From 3fbe5cf8a643e59440fa661003d2a31993b91ffa Mon Sep 17 00:00:00 2001 From: blckmn Date: Wed, 9 Nov 2016 17:47:10 +1100 Subject: [PATCH] Fix NAZE LED hard fault --- src/main/drivers/light_ws2811strip_stm32f10x.c | 1 + src/main/drivers/light_ws2811strip_stm32f30x.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/drivers/light_ws2811strip_stm32f10x.c b/src/main/drivers/light_ws2811strip_stm32f10x.c index e0bb9656fc..bb191b226f 100644 --- a/src/main/drivers/light_ws2811strip_stm32f10x.c +++ b/src/main/drivers/light_ws2811strip_stm32f10x.c @@ -90,6 +90,7 @@ void ws2811LedStripHardwareInit(ioTag_t ioTag) /* configure DMA */ /* DMA1 Channel6 Config */ + dmaChannel = timerHardware->dmaChannel; DMA_DeInit(dmaChannel); DMA_StructInit(&DMA_InitStructure); diff --git a/src/main/drivers/light_ws2811strip_stm32f30x.c b/src/main/drivers/light_ws2811strip_stm32f30x.c index 0165241f53..5de0390dbf 100644 --- a/src/main/drivers/light_ws2811strip_stm32f30x.c +++ b/src/main/drivers/light_ws2811strip_stm32f30x.c @@ -97,10 +97,9 @@ void ws2811LedStripHardwareInit(ioTag_t ioTag) TIM_CtrlPWMOutputs(timer, ENABLE); - dmaChannel = timerHardware->dmaChannel; - /* configure DMA */ /* DMA1 Channel Config */ + dmaChannel = timerHardware->dmaChannel; DMA_DeInit(dmaChannel); DMA_StructInit(&DMA_InitStructure);