Skip to content

Commit f09dadd

Browse files
committed
ports: stm32h723: fix CANFD clock
1 parent 6ad11fe commit f09dadd

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

firmware/hw_layer/ports/stm32/stm32h7/cfg/mcuconf_stm32h723.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
*/
3737
#define STM32_PLLSRC STM32_PLLSRC_HSE_CK
3838
#define STM32_PLLCFGR_MASK ~0
39+
40+
/* PLL1 output clock is 520MHz */
3941
#define STM32_PLL1_ENABLED TRUE
4042
#define STM32_PLL1_P_ENABLED TRUE
4143
#define STM32_PLL1_Q_ENABLED TRUE
@@ -46,6 +48,8 @@
4648
#define STM32_PLL1_DIVP_VALUE 1
4749
#define STM32_PLL1_DIVQ_VALUE 10
4850
#define STM32_PLL1_DIVR_VALUE 4
51+
52+
/* PLL2 output clock is 800 MHz */
4953
#define STM32_PLL2_ENABLED TRUE
5054
#define STM32_PLL2_P_ENABLED TRUE
5155
#define STM32_PLL2_Q_ENABLED TRUE
@@ -54,8 +58,10 @@
5458
#define STM32_PLL2_DIVN_VALUE 160
5559
#define STM32_PLL2_FRACN_VALUE 0
5660
#define STM32_PLL2_DIVP_VALUE 40
57-
#define STM32_PLL2_DIVQ_VALUE 8
61+
#define STM32_PLL2_DIVQ_VALUE 10
5862
#define STM32_PLL2_DIVR_VALUE 8
63+
64+
/* PLL3 output clock is 480MHz */
5965
#define STM32_PLL3_ENABLED TRUE
6066
#define STM32_PLL3_P_ENABLED TRUE
6167
#define STM32_PLL3_Q_ENABLED TRUE
@@ -98,7 +104,7 @@
98104
#define STM32_OCTOSPISEL STM32_OCTOSPISEL_HCLK
99105
#define STM32_FMCSEL STM32_FMCSEL_HCLK
100106
#define STM32_SWPSEL STM32_SWPSEL_PCLK1
101-
#define STM32_FDCANSEL STM32_FDCANSEL_HSE_CK
107+
#define STM32_FDCANSEL STM32_FDCANSEL_PLL2_Q_CK
102108
#define STM32_DFSDM1SEL STM32_DFSDM1SEL_PCLK2
103109
#define STM32_SPDIFSEL STM32_SPDIFSEL_PLL1_Q_CK
104110
#define STM32_SPI45SEL STM32_SPI45SEL_PCLK2

firmware/hw_layer/ports/stm32/stm32h7/cfg/mcuconf_stm32h743.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
*/
4444
#define STM32_PLLSRC STM32_PLLSRC_HSI_CK
4545
#define STM32_PLLCFGR_MASK ~0
46+
47+
/* PLL1 output clock is 800 MHz */
4648
#define STM32_PLL1_ENABLED TRUE
4749
#define STM32_PLL1_P_ENABLED TRUE
4850
#define STM32_PLL1_Q_ENABLED TRUE
@@ -53,6 +55,8 @@
5355
#define STM32_PLL1_DIVP_VALUE 2
5456
#define STM32_PLL1_DIVQ_VALUE 4
5557
#define STM32_PLL1_DIVR_VALUE 2
58+
59+
/* PLL2 output clock is 960 MHz */
5660
#define STM32_PLL2_ENABLED TRUE
5761
#define STM32_PLL2_P_ENABLED TRUE
5862
#define STM32_PLL2_Q_ENABLED TRUE
@@ -63,6 +67,8 @@
6367
#define STM32_PLL2_DIVP_VALUE 10
6468
#define STM32_PLL2_DIVQ_VALUE 12
6569
#define STM32_PLL2_DIVR_VALUE 20
70+
71+
/* PLL3 output clock is 960 MHz */
6672
#define STM32_PLL3_ENABLED TRUE
6773
#define STM32_PLL3_P_ENABLED TRUE
6874
#define STM32_PLL3_Q_ENABLED TRUE

0 commit comments

Comments
 (0)