mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-03 14:38:44 -04:00
AP_HAL_ChibiOS: update clock config for FDCAN and External Flash
This commit is contained in:
parent
35340bf7f2
commit
245f9d21b3
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@
|
||||
#define STM32_HSE_ENABLED FALSE
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_PLL1_DIVM_VALUE 4
|
||||
#define STM32_PLL2_DIVM_VALUE 4
|
||||
#define STM32_PLL2_DIVM_VALUE 8
|
||||
#define STM32_PLL3_DIVM_VALUE 4
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSI_CK
|
||||
#define STM32_MCO1SEL STM32_MCO1SEL_HSI_CK
|
||||
@ -125,7 +125,7 @@
|
||||
#define STM32_HSE_ENABLED TRUE
|
||||
#define STM32_HSI_ENABLED FALSE
|
||||
#define STM32_PLL1_DIVM_VALUE 3
|
||||
#define STM32_PLL2_DIVM_VALUE 3
|
||||
#define STM32_PLL2_DIVM_VALUE 2
|
||||
#define STM32_PLL3_DIVM_VALUE 6
|
||||
|
||||
#elif STM32_HSECLK == 25000000U
|
||||
@ -133,7 +133,7 @@
|
||||
#define STM32_HSE_ENABLED TRUE
|
||||
#define STM32_HSI_ENABLED FALSE
|
||||
#define STM32_PLL1_DIVM_VALUE 2
|
||||
#define STM32_PLL2_DIVM_VALUE 2
|
||||
#define STM32_PLL2_DIVM_VALUE 5
|
||||
#define STM32_PLL3_DIVM_VALUE 5
|
||||
#else
|
||||
#error "Unsupported HSE clock"
|
||||
@ -146,27 +146,43 @@
|
||||
#define STM32_PLL1_DIVQ_VALUE 8
|
||||
#define STM32_PLL1_DIVR_VALUE 2
|
||||
|
||||
#define STM32_PLL2_DIVN_VALUE 16
|
||||
#define STM32_PLL2_DIVP_VALUE 1
|
||||
#define STM32_PLL2_DIVQ_VALUE 4
|
||||
#define STM32_PLL2_DIVR_VALUE 2
|
||||
#define STM32_PLL2_DIVN_VALUE 45
|
||||
#define STM32_PLL2_DIVP_VALUE 2
|
||||
#define STM32_PLL2_DIVQ_VALUE 5
|
||||
#define STM32_PLL2_DIVR_VALUE 1
|
||||
|
||||
#define STM32_PLL3_DIVN_VALUE 15
|
||||
#define STM32_PLL3_DIVP_VALUE 3
|
||||
#define STM32_PLL3_DIVQ_VALUE 5
|
||||
#define STM32_PLL3_DIVR_VALUE 8
|
||||
|
||||
#elif (STM32_HSECLK == 8000000U) || (STM32_HSECLK == 16000000U) || (STM32_HSECLK == 24000000U)
|
||||
#elif (STM32_HSECLK == 8000000U) || (STM32_HSECLK == 16000000U)
|
||||
// common clock tree for multiples of 8MHz crystals
|
||||
#define STM32_PLL1_DIVN_VALUE 100
|
||||
#define STM32_PLL1_DIVP_VALUE 2
|
||||
#define STM32_PLL1_DIVQ_VALUE 8
|
||||
#define STM32_PLL1_DIVR_VALUE 2
|
||||
|
||||
#define STM32_PLL2_DIVN_VALUE 25
|
||||
#define STM32_PLL2_DIVN_VALUE 45
|
||||
#define STM32_PLL2_DIVP_VALUE 2
|
||||
#define STM32_PLL2_DIVQ_VALUE 4
|
||||
#define STM32_PLL2_DIVR_VALUE 4
|
||||
#define STM32_PLL2_DIVQ_VALUE 5
|
||||
#define STM32_PLL2_DIVR_VALUE 1
|
||||
|
||||
#define STM32_PLL3_DIVN_VALUE 72
|
||||
#define STM32_PLL3_DIVP_VALUE 3
|
||||
#define STM32_PLL3_DIVQ_VALUE 6
|
||||
#define STM32_PLL3_DIVR_VALUE 9
|
||||
|
||||
#elif STM32_HSECLK == 24000000U
|
||||
#define STM32_PLL1_DIVN_VALUE 100
|
||||
#define STM32_PLL1_DIVP_VALUE 2
|
||||
#define STM32_PLL1_DIVQ_VALUE 8
|
||||
#define STM32_PLL1_DIVR_VALUE 2
|
||||
|
||||
#define STM32_PLL2_DIVN_VALUE 30
|
||||
#define STM32_PLL2_DIVP_VALUE 2
|
||||
#define STM32_PLL2_DIVQ_VALUE 5
|
||||
#define STM32_PLL2_DIVR_VALUE 1
|
||||
|
||||
#define STM32_PLL3_DIVN_VALUE 72
|
||||
#define STM32_PLL3_DIVP_VALUE 3
|
||||
@ -179,10 +195,10 @@
|
||||
#define STM32_PLL1_DIVQ_VALUE 8
|
||||
#define STM32_PLL1_DIVR_VALUE 2
|
||||
|
||||
#define STM32_PLL2_DIVN_VALUE 12
|
||||
#define STM32_PLL2_DIVP_VALUE 1
|
||||
#define STM32_PLL2_DIVQ_VALUE 2
|
||||
#define STM32_PLL2_DIVR_VALUE 3
|
||||
#define STM32_PLL2_DIVN_VALUE 72
|
||||
#define STM32_PLL2_DIVP_VALUE 2
|
||||
#define STM32_PLL2_DIVQ_VALUE 5
|
||||
#define STM32_PLL2_DIVR_VALUE 1
|
||||
|
||||
#define STM32_PLL3_DIVN_VALUE 48
|
||||
#define STM32_PLL3_DIVP_VALUE 3
|
||||
@ -249,7 +265,7 @@
|
||||
#ifndef STM32_CKPERSEL
|
||||
#define STM32_CKPERSEL STM32_CKPERSEL_HSE_CK
|
||||
#endif
|
||||
#define STM32_SDMMCSEL STM32_SDMMCSEL_PLL2_R_CK
|
||||
#define STM32_SDMMCSEL STM32_SDMMCSEL_PLL1_Q_CK
|
||||
#define STM32_QSPISEL STM32_QSPISEL_HCLK
|
||||
#define STM32_FMCSEL STM32_QSPISEL_HCLK
|
||||
#define STM32_SWPSEL STM32_SWPSEL_PCLK1
|
||||
|
Loading…
Reference in New Issue
Block a user