I have found that it's impossible to use TIM16 without fix becuase of missing STM32_TIM16_CHANNELS def.
There is a simple patch:
Code: Select all
diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
index fdec353fa..8a795ba00 100644
--- a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
@@ -1258,6 +1258,7 @@
#define STM32_HAS_TIM16 TRUE
#define STM32_TIM16_IS_32BITS FALSE
+#define STM32_TIM16_CHANNELS 1
#define STM32_HAS_TIM17 TRUE
#define STM32_TIM17_IS_32BITS FALSE
It had better to fix in further versions.
My version is 20.3.3 It's also missing in 20.3.4.