diff --git a/arch/arm/src/stm32/stm32_oneshot.c b/arch/arm/src/stm32/stm32_oneshot.c index ba76bf65b9..598eb7e6f5 100644 --- a/arch/arm/src/stm32/stm32_oneshot.c +++ b/arch/arm/src/stm32/stm32_oneshot.c @@ -100,9 +100,9 @@ static int stm32_oneshot_handler(int irg_num, void * context, void *arg) */ STM32_TIM_SETISR(oneshot->tch, NULL, NULL, 0); - STM32_TIM_DISABLEINT(oneshot->tch, 0); + STM32_TIM_DISABLEINT(oneshot->tch, ATIM_DIER_UIE); STM32_TIM_SETMODE(oneshot->tch, STM32_TIM_MODE_DISABLED); - STM32_TIM_ACKINT(oneshot->tch, 0); + STM32_TIM_ACKINT(oneshot->tch, ATIM_SR_UIF); /* The timer is no longer running */ @@ -326,8 +326,8 @@ int stm32_oneshot_start(struct stm32_oneshot_s *oneshot, STM32_TIM_SETMODE(oneshot->tch, STM32_TIM_MODE_PULSE); - STM32_TIM_ACKINT(oneshot->tch, 0); - STM32_TIM_ENABLEINT(oneshot->tch, 0); + STM32_TIM_ACKINT(oneshot->tch, ATIM_SR_UIF); + STM32_TIM_ENABLEINT(oneshot->tch, ATIM_DIER_UIE); /* Enable interrupts. We should get the callback when the interrupt * occurs. diff --git a/configs/maple/src/stm32_lcd.c b/configs/maple/src/stm32_lcd.c index ad2e879dbb..47bc86aef2 100644 --- a/configs/maple/src/stm32_lcd.c +++ b/configs/maple/src/stm32_lcd.c @@ -118,12 +118,12 @@ static void up_lcddispcontrol(bool on) if (on) { stm32_gpiowrite(GPIO_MEMLCD_DISP, 1); - STM32_TIM_ENABLEINT(tim, ATIM_SR_UIF); + STM32_TIM_ENABLEINT(tim, ATIM_DIER_UIE); } else { stm32_gpiowrite(GPIO_MEMLCD_DISP, 0); - STM32_TIM_DISABLEINT(tim, ATIM_SR_UIF); + STM32_TIM_DISABLEINT(tim, ATIM_DIER_UIE); } }