Bug fix: Incorrect APBs used in HRT driver and tone alarm driver.

This commit is contained in:
ksschwabe
2015-08-25 17:24:11 +02:00
parent 9e1713eb9f
commit 5b659407a6
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -85,7 +85,7 @@
#elif HRT_TIMER == 2
# define HRT_TIMER_BASE STM32_TIM2_BASE
# define HRT_TIMER_POWER_REG STM32_RCC_APB1ENR
# define HRT_TIMER_POWER_BIT RCC_APB2ENR_TIM2EN
# define HRT_TIMER_POWER_BIT RCC_APB1ENR_TIM2EN
# define HRT_TIMER_VECTOR STM32_IRQ_TIM2
# define HRT_TIMER_CLOCK STM32_APB1_TIM2_CLKIN
# if CONFIG_STM32_TIM2
@@ -103,7 +103,7 @@
#elif HRT_TIMER == 4
# define HRT_TIMER_BASE STM32_TIM4_BASE
# define HRT_TIMER_POWER_REG STM32_RCC_APB1ENR
# define HRT_TIMER_POWER_BIT RCC_APB2ENR_TIM4EN
# define HRT_TIMER_POWER_BIT RCC_APB1ENR_TIM4EN
# define HRT_TIMER_VECTOR STM32_IRQ_TIM4
# define HRT_TIMER_CLOCK STM32_APB1_TIM4_CLKIN
# if CONFIG_STM32_TIM4
@@ -129,10 +129,10 @@
# endif
#elif HRT_TIMER == 9
# define HRT_TIMER_BASE STM32_TIM9_BASE
# define HRT_TIMER_POWER_REG STM32_RCC_APB1ENR
# define HRT_TIMER_POWER_REG STM32_RCC_APB2ENR
# define HRT_TIMER_POWER_BIT RCC_APB2ENR_TIM9EN
# define HRT_TIMER_VECTOR STM32_IRQ_TIM1BRK
# define HRT_TIMER_CLOCK STM32_APB1_TIM9_CLKIN
# define HRT_TIMER_CLOCK STM32_APB2_TIM9_CLKIN
# if CONFIG_STM32_TIM9
# error must not set CONFIG_STM32_TIM9=y and HRT_TIMER=9
# endif
+6 -6
View File
@@ -148,22 +148,22 @@
# endif
#elif TONE_ALARM_TIMER == 9
# define TONE_ALARM_BASE STM32_TIM9_BASE
# define TONE_ALARM_CLOCK STM32_APB1_TIM9_CLKIN
# define TONE_ALARM_CLOCK_ENABLE RCC_APB1ENR_TIM9EN
# define TONE_ALARM_CLOCK STM32_APB2_TIM9_CLKIN
# define TONE_ALARM_CLOCK_ENABLE RCC_APB2ENR_TIM9EN
# ifdef CONFIG_STM32_TIM9
# error Must not set CONFIG_STM32_TIM9 when TONE_ALARM_TIMER is 9
# endif
#elif TONE_ALARM_TIMER == 10
# define TONE_ALARM_BASE STM32_TIM10_BASE
# define TONE_ALARM_CLOCK STM32_APB1_TIM10_CLKIN
# define TONE_ALARM_CLOCK_ENABLE RCC_APB1ENR_TIM10EN
# define TONE_ALARM_CLOCK STM32_APB2_TIM10_CLKIN
# define TONE_ALARM_CLOCK_ENABLE RCC_APB2ENR_TIM10EN
# ifdef CONFIG_STM32_TIM10
# error Must not set CONFIG_STM32_TIM10 when TONE_ALARM_TIMER is 10
# endif
#elif TONE_ALARM_TIMER == 11
# define TONE_ALARM_BASE STM32_TIM11_BASE
# define TONE_ALARM_CLOCK STM32_APB1_TIM11_CLKIN
# define TONE_ALARM_CLOCK_ENABLE RCC_APB1ENR_TIM11EN
# define TONE_ALARM_CLOCK STM32_APB2_TIM11_CLKIN
# define TONE_ALARM_CLOCK_ENABLE RCC_APB2ENR_TIM11EN
# ifdef CONFIG_STM32_TIM11
# error Must not set CONFIG_STM32_TIM11 when TONE_ALARM_TIMER is 11
# endif