diff --git a/arch/arm/src/stm32h7/stm32_tickless.c b/arch/arm/src/stm32h7/stm32_tickless.c index df3083cae2e..80518d2d87f 100644 --- a/arch/arm/src/stm32h7/stm32_tickless.c +++ b/arch/arm/src/stm32h7/stm32_tickless.c @@ -92,6 +92,11 @@ #define HAVE_32BIT_TICKLESS 1 #endif +#if (CONFIG_STM32H7_TICKLESS_TIMER == 6) || \ + (CONFIG_STM32H7_TICKLESS_TIMER == 7) +# error Basic timers not supported by the tickless driver +#endif + #if CONFIG_STM32H7_TICKLESS_CHANNEL == 1 #define DIER_CAPT_IE GTIM_DIER_CC1IE #elif CONFIG_STM32H7_TICKLESS_CHANNEL == 2 @@ -453,24 +458,6 @@ void up_timer_initialize(void) break; #endif -#ifdef CONFIG_STM32H7_TIM6 - case 6: - - /* Basic timers not supported by this implementation */ - - DEBUGASSERT(0); - break; -#endif - -#ifdef CONFIG_STM32H7_TIM7 - case 7: - - /* Basic timers not supported by this implementation */ - - DEBUGASSERT(0); - break; -#endif - #ifdef CONFIG_STM32H7_TIM8 case 8: g_tickless.base = STM32_TIM8_BASE;