diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2019-02-27 11:34:02 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-16 01:53:35 -0700 |
commit | 7b686a1f116d867c00516b6ceed91d5cb3e17398 (patch) | |
tree | ac5758c84b331caba161c1b6df736b01e291dc13 /chip/stm32/registers.h | |
parent | ed3b5e3a1fbf50c6e85e9e8e095b543fd6ebb78e (diff) | |
download | chrome-ec-7b686a1f116d867c00516b6ceed91d5cb3e17398.tar.gz |
chip: stm32: Fix Timers 9 through 11 for STM32F4
The timers 9 through 11 have different enable bits in the
STM32_RCC_APB2ENR on STM32F446/411/412 targets versus the
default (used by STM32F4/L4/STM32L) value set.
Break out the CHIP_FAMILY_STM32F4 case separately.
BRANCH=none
BUG=none
TEST=Observe PWM output on STM32412 EVM vs none before
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Change-Id: I9f00902afe58ef8ef141da39b2b912ecc592944b
Reviewed-on: https://chromium-review.googlesource.com/1493273
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'chip/stm32/registers.h')
-rw-r--r-- | chip/stm32/registers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/stm32/registers.h b/chip/stm32/registers.h index 7f86917b7e..8129549d6b 100644 --- a/chip/stm32/registers.h +++ b/chip/stm32/registers.h @@ -1401,11 +1401,17 @@ typedef volatile struct timer_ctlr timer_ctlr_t; #define STM32_RCC_CSR_LSION (1 << 0) #define STM32_RCC_CSR_LSIRDY (1 << 1) +#if defined(CHIP_FAMILY_STM32F4) +#define STM32_RCC_PB2_TIM9 (1 << 16) +#define STM32_RCC_PB2_TIM10 (1 << 17) +#define STM32_RCC_PB2_TIM11 (1 << 18) +#else /* !defined(CHIP_FAMILY_STM32F4) */ #define STM32_RCC_HB_DMA1 (1 << 24) #define STM32_RCC_PB2_TIM9 (1 << 2) #define STM32_RCC_PB2_TIM10 (1 << 3) #define STM32_RCC_PB2_TIM11 (1 << 4) #define STM32_RCC_PB1_USB (1 << 23) +#endif #define STM32_RCC_DCKCFGR2 REG32(STM32_RCC_BASE + 0x94) #define DCKCFGR2_FMPI2C1SEL(val) (((val) & 0x3) << 22) |