You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2020/05/26 10:57:42 UTC
[incubator-nuttx] branch master updated: stm32h7:stm32h7x3xx_rcc
Select FDCAN clock source
This is an automated email from the ASF dual-hosted git repository.
davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new a4012bf stm32h7:stm32h7x3xx_rcc Select FDCAN clock source
a4012bf is described below
commit a4012bffa8ef741db622fd6dbc2d97b4f9ef7dd9
Author: JacobCrabill <ja...@flyvoly.com>
AuthorDate: Sat May 23 20:08:06 2020 -0700
stm32h7:stm32h7x3xx_rcc Select FDCAN clock source
---
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c b/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c
index d87a1fe..3646682 100644
--- a/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c
+++ b/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c
@@ -917,6 +917,15 @@ static void stm32_stdclockconfig(void)
putreg32(regval, STM32_RCC_D3CCIPR);
#endif
+ /* Configure FDCAN source clock */
+
+#if defined(STM32_RCC_D2CCIP1R_FDCANSEL)
+ regval = getreg32(STM32_RCC_D2CCIP1R);
+ regval &= ~RCC_D2CCIP1R_FDCANSEL_MASK;
+ regval |= STM32_RCC_D2CCIP1R_FDCANSEL;
+ putreg32(regval, STM32_RCC_D2CCIP1R);
+#endif
+
#if defined(CONFIG_STM32H7_IWDG) || defined(CONFIG_STM32H7_RTC_LSICLOCK)
/* Low speed internal clock source LSI */