arch/arm/stm32: Updates to last timer-related changes.

This commit is contained in:
Maximilian Kriegleder 2019-03-22 11:02:12 -06:00 committed by Gregory Nutt
parent c266f53199
commit 75858219fb
3 changed files with 7 additions and 7 deletions

View File

@ -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_SETISR(oneshot->tch, NULL, NULL, 0);
STM32_TIM_DISABLEINT(oneshot->tch, ATIM_DIER_UIE); STM32_TIM_DISABLEINT(oneshot->tch, GTIM_DIER_UIE);
STM32_TIM_SETMODE(oneshot->tch, STM32_TIM_MODE_DISABLED); STM32_TIM_SETMODE(oneshot->tch, STM32_TIM_MODE_DISABLED);
STM32_TIM_ACKINT(oneshot->tch, ATIM_SR_UIF); STM32_TIM_ACKINT(oneshot->tch, GTIM_SR_UIF);
/* The timer is no longer running */ /* 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_SETMODE(oneshot->tch, STM32_TIM_MODE_PULSE);
STM32_TIM_ACKINT(oneshot->tch, ATIM_SR_UIF); STM32_TIM_ACKINT(oneshot->tch, GTIM_SR_UIF);
STM32_TIM_ENABLEINT(oneshot->tch, ATIM_DIER_UIE); STM32_TIM_ENABLEINT(oneshot->tch, GTIM_DIER_UIE);
/* Enable interrupts. We should get the callback when the interrupt /* Enable interrupts. We should get the callback when the interrupt
* occurs. * occurs.
@ -407,7 +407,7 @@ int stm32_oneshot_cancel(struct stm32_oneshot_s *oneshot,
/* Now we can disable the interrupt and stop the timer. */ /* Now we can disable the interrupt and stop the timer. */
STM32_TIM_DISABLEINT(oneshot->tch, 0); STM32_TIM_DISABLEINT(oneshot->tch, GTIM_DIER_UIE);
STM32_TIM_SETISR(oneshot->tch, NULL, NULL, 0); STM32_TIM_SETISR(oneshot->tch, NULL, NULL, 0);
STM32_TIM_SETMODE(oneshot->tch, STM32_TIM_MODE_DISABLED); STM32_TIM_SETMODE(oneshot->tch, STM32_TIM_MODE_DISABLED);

View File

@ -86,7 +86,7 @@ static int up_lcdextcominisr(int irq, void *context, void *arg)
if (g_isr == NULL) if (g_isr == NULL)
{ {
lcderr("ERROR: error, irq not attached, disabled\n"); lcderr("ERROR: error, irq not attached, disabled\n");
STM32_TIM_DISABLEINT(tim, 0); STM32_TIM_DISABLEINT(tim, ATIM_DIER_UIE);
return OK; return OK;
} }

View File

@ -218,7 +218,7 @@ int highpri_main(int argc, char *argv[])
/* Enable the timer interrupt at the NVIC and at TIM6 */ /* Enable the timer interrupt at the NVIC and at TIM6 */
up_enable_irq(STM32_IRQ_TIM6); up_enable_irq(STM32_IRQ_TIM6);
STM32_TIM_ENABLEINT(dev, ATIM_SR_UIF); STM32_TIM_ENABLEINT(dev, ATIM_DIER_UIE);
/* Monitor interrupts */ /* Monitor interrupts */