From 988bb1f7e9ddb6f1fe8734fdebc4b6d92fabad29 Mon Sep 17 00:00:00 2001 From: Rene Hopf Date: Thu, 9 Jan 2020 22:40:55 +0100 Subject: [PATCH] mask irq in smartabs --- src/comps/smartabs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/comps/smartabs.c b/src/comps/smartabs.c index 00329bd6..8793d60a 100644 --- a/src/comps/smartabs.c +++ b/src/comps/smartabs.c @@ -115,6 +115,7 @@ static void rt_func(float period, volatile void *ctx_ptr, volatile hal_pin_inst_ } //TODO: irq here will cause problems + __disable_irq(); GPIO_SetBits(GPIOD, GPIO_Pin_15); //tx enable USART_SendData(USART6, 0x02); while(USART_GetFlagStatus(USART6, USART_FLAG_TC) == RESET) @@ -124,6 +125,7 @@ static void rt_func(float period, volatile void *ctx_ptr, volatile hal_pin_inst_ DMA_Cmd(DMA2_Stream1, DISABLE); DMA_ClearFlag(DMA2_Stream1, DMA_FLAG_TCIF1); DMA_Cmd(DMA2_Stream1, ENABLE); + __enable_irq(); } hal_comp_t smartabs_comp_struct = {