Skip to content

Commit 4686383

Browse files
committed
[L0] Update HAL default configuration
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 100d972 commit 4686383

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

system/STM32L0xx/stm32l0xx_hal_conf_default.h

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ extern "C" {
4444
#define HAL_CRYP_MODULE_ENABLED
4545
#define HAL_DAC_MODULE_ENABLED
4646
#define HAL_DMA_MODULE_ENABLED
47+
#define HAL_EXTI_MODULE_ENABLED
4748
#define HAL_FIREWALL_MODULE_ENABLED
4849
#define HAL_FLASH_MODULE_ENABLED
4950
#define HAL_GPIO_MODULE_ENABLED
@@ -76,19 +77,19 @@ extern "C" {
7677
* (when HSE is used as system clock source, directly or through the PLL).
7778
*/
7879
#if !defined (HSE_VALUE)
79-
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
80+
#define HSE_VALUE (8000000U) /*!< Value of the External oscillator in Hz */
8081
#endif /* HSE_VALUE */
8182

8283
#if !defined (HSE_STARTUP_TIMEOUT)
83-
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
84+
#define HSE_STARTUP_TIMEOUT (100U) /*!< Time out for HSE start up, in ms */
8485
#endif /* HSE_STARTUP_TIMEOUT */
8586

8687
/**
8788
* @brief Internal Multiple Speed oscillator (MSI) default value.
8889
* This value is the default MSI range value after Reset.
8990
*/
9091
#if !defined (MSI_VALUE)
91-
#define MSI_VALUE ((uint32_t)2097152U) /*!< Value of the Internal oscillator in Hz*/
92+
#define MSI_VALUE (2097152U) /*!< Value of the Internal oscillator in Hz*/
9293
#endif /* MSI_VALUE */
9394

9495
/**
@@ -97,14 +98,14 @@ extern "C" {
9798
* (when HSI is used as system clock source, directly or through the PLL).
9899
*/
99100
#if !defined (HSI_VALUE)
100-
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
101+
#define HSI_VALUE (16000000U) /*!< Value of the Internal oscillator in Hz*/
101102
#endif /* HSI_VALUE */
102103

103104
/**
104105
* @brief Internal High Speed oscillator for USB (HSI48) value.
105106
*/
106107
#if !defined (HSI48_VALUE)
107-
#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB in Hz.
108+
#define HSI48_VALUE (48000000U) /*!< Value of the Internal High Speed oscillator for USB in Hz.
108109
The real value may vary depending on the variations
109110
in voltage and temperature. */
110111
#endif /* HSI48_VALUE */
@@ -113,25 +114,26 @@ extern "C" {
113114
* @brief Internal Low Speed oscillator (LSI) value.
114115
*/
115116
#if !defined (LSI_VALUE)
116-
#define LSI_VALUE ((uint32_t)37000U) /*!< LSI Typical Value in Hz*/
117+
#define LSI_VALUE (37000U) /*!< LSI Typical Value in Hz*/
117118
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
118-
The real value may vary depending on the variations
119-
in voltage and temperature.*/
119+
The real value may vary depending on the variations
120+
in voltage and temperature.*/
120121
/**
121122
* @brief External Low Speed oscillator (LSE) value.
122123
* This value is used by the UART, RTC HAL module to compute the system frequency
123124
*/
124125
#if !defined (LSE_VALUE)
125-
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/
126+
#define LSE_VALUE (32768U) /*!< Value of the External oscillator in Hz*/
126127
#endif /* LSE_VALUE */
127128

128129
/**
129130
* @brief Time out for LSE start up value in ms.
130131
*/
131132
#if !defined (LSE_STARTUP_TIMEOUT)
132-
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
133+
#define LSE_STARTUP_TIMEOUT (5000U) /*!< Time out for LSE start up, in ms */
133134
#endif /* LSE_STARTUP_TIMEOUT */
134135

136+
135137
/* Tip: To avoid modifying this file each time you need to use different HSE,
136138
=== you can define the HSE value in your toolchain compiler preprocessor. */
137139

@@ -223,6 +225,10 @@ in voltage and temperature.*/
223225
#include "stm32l0xx_hal_dma.h"
224226
#endif /* HAL_DMA_MODULE_ENABLED */
225227

228+
#ifdef HAL_EXTI_MODULE_ENABLED
229+
#include "stm32l0xx_hal_exti.h"
230+
#endif /* HAL_EXTI_MODULE_ENABLED */
231+
226232
#ifdef HAL_CORTEX_MODULE_ENABLED
227233
#include "stm32l0xx_hal_cortex.h"
228234
#endif /* HAL_CORTEX_MODULE_ENABLED */
@@ -285,7 +291,6 @@ in voltage and temperature.*/
285291

286292
#ifdef HAL_RTC_MODULE_ENABLED
287293
#include "stm32l0xx_hal_rtc.h"
288-
289294
#endif /* HAL_RTC_MODULE_ENABLED */
290295

291296
#ifdef HAL_SPI_MODULE_ENABLED

0 commit comments

Comments
 (0)