Skip to content

Commit 26d5b8b

Browse files
committed
system(c5): add STM32C5xx external default value
Available in stm32_external_env.h Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent c458c64 commit 26d5b8b

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

‎system/STM32C5xx/stm32c5xx_hal_conf_default.h‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,48 @@ extern "C" {
106106
* @}
107107
*/
108108

109+
/* ########################## VDD Value #######################################*/
110+
/**
111+
* @brief VDD Value.
112+
*/
113+
#if !defined (VDD_VALUE)
114+
#define VDD_VALUE 3300UL /*!< Value of VDD in mv */
115+
#endif /* VDD_VALUE */
116+
117+
/* ########################## Oscillator Values adaptation ####################*/
118+
/**
119+
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
120+
* This value is used by the RCC HAL module to compute the system frequency
121+
* (when HSE is used as system clock source, directly or through the PSI).
122+
*/
123+
#if !defined (HSE_VALUE)
124+
#if defined(RCC_CR1_HSIDIV4ON)
125+
#define HSE_VALUE 16000000UL /*!< Value of the External oscillator in Hz */
126+
#else
127+
#if defined(AHB4PERIPH_BASE)
128+
#define HSE_VALUE 48000000UL /*!< Value of the External oscillator in Hz */
129+
#else
130+
#define HSE_VALUE 24000000UL /*!< Value of the External oscillator in Hz */
131+
#endif /* AHB4PERIPH_BASE */
132+
#endif /* RCC_CR1_HSIDIV4ON */
133+
#endif /* HSE_VALUE */
134+
135+
#if !defined (HSE_STARTUP_TIMEOUT)
136+
#define HSE_STARTUP_TIMEOUT 100UL /*!< Time out for HSE start up, in ms */
137+
#endif /* HSE_STARTUP_TIMEOUT */
138+
139+
/**
140+
* @brief External Low Speed oscillator (LSE) value.
141+
* This value is used by the UART, RTC HAL module to compute the system frequency
142+
*/
143+
#if !defined (LSE_VALUE)
144+
#define LSE_VALUE 32768UL /*!< Value of the External oscillator in Hz*/
145+
#endif /* LSE_VALUE */
146+
147+
#if !defined (LSE_STARTUP_TIMEOUT)
148+
#define LSE_STARTUP_TIMEOUT 5000UL /*!< Time out for LSE start up, in ms */
149+
#endif /* HSE_STARTUP_TIMEOUT */
150+
109151
/* ########################## Peripheral configuration ######################### */
110152
/**
111153
* @brief Include the default list of modules to be used in the HAL driver

0 commit comments

Comments
 (0)