This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit b0c9a6133e4d83e1a6beeede28902320dc6580c8 Author: raiden00pl <[email protected]> AuthorDate: Tue Aug 10 10:01:28 2021 +0200 stm32/qenco: fix TIM2 width for STM32F3 which is 32-bit not 16-bit STM32F3 has timers of the same length as in STM32F4. --- arch/arm/src/stm32/stm32_qencoder.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/arch/arm/src/stm32/stm32_qencoder.c b/arch/arm/src/stm32/stm32_qencoder.c index fa81dee..92aee15 100644 --- a/arch/arm/src/stm32/stm32_qencoder.c +++ b/arch/arm/src/stm32/stm32_qencoder.c @@ -71,39 +71,12 @@ # define TIM5_BITWIDTH 16 # define TIM8_BITWIDTH 16 -/* On the F3 series, TIM5 is 32-bit. All of the rest are 16-bit */ - -#elif defined(CONFIG_STM32_STM32F30XX) - - /* If TIM5 is enabled, then we have 32-bit timers */ - -# if defined(CONFIG_STM32_TIM5_QE) -# define HAVE_32BIT_TIMERS 1 -# endif - - /* If TIM1,2,3,4, or 8 are enabled, then we have 16-bit timers */ - -# if defined(CONFIG_STM32_TIM1_QE) || defined(CONFIG_STM32_TIM2_QE) || \ - defined(CONFIG_STM32_TIM3_QE) || defined(CONFIG_STM32_TIM4_QE) || \ - defined(CONFIG_STM32_TIM8_QE) -# define HAVE_16BIT_TIMERS 1 -# endif - - /* The width in bits of each timer */ - -# define TIM1_BITWIDTH 16 -# define TIM2_BITWIDTH 16 -# define TIM3_BITWIDTH 16 -# define TIM4_BITWIDTH 16 -# define TIM5_BITWIDTH 32 -# define TIM8_BITWIDTH 16 - -/* On the F4, F2 and G4 series, TIM2 and TIM5 are 32-bit. +/* On the F2, F3, F4 and G4 series, TIM2 and TIM5 are 32-bit. * All of the rest are 16-bit */ #elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F4XXX) || \ - defined(CONFIG_STM32_STM32G4XXX) + defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32G4XXX) /* If TIM2 or TIM5 are enabled, then we have 32-bit timers */
