Skip to content

Commit 7928b3e

Browse files
author
Krzysztof Blazewicz
committed
stmhal/boards: configure all F4 boards to work with new HAL
changes include: * use single GPIO.BSRR instead of BSRRH and BSRRL * change HSE_STARTUP_TIMEOUT to 100 ms * define LSE_STARTUP_TIMEOUT to 5 s
1 parent 6a8f6c1 commit 7928b3e

16 files changed

Lines changed: 80 additions & 16 deletions

File tree

stmhal/boards/CERB40/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/HYDRABUS/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/NETDUINO_PLUS_2/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/NUCLEO_F401RE/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#endif /* HSE_VALUE */
106106

107107
#if !defined (HSE_STARTUP_TIMEOUT)
108-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
108+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
109109
#endif /* HSE_STARTUP_TIMEOUT */
110110

111111
/**
@@ -132,6 +132,10 @@
132132
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
133133
#endif /* LSE_VALUE */
134134

135+
#if !defined (LSE_STARTUP_TIMEOUT)
136+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
137+
#endif /* LSE_STARTUP_TIMEOUT */
138+
135139
/**
136140
* @brief External clock source for I2S peripheral
137141
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/NUCLEO_F411RE/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#endif /* HSE_VALUE */
106106

107107
#if !defined (HSE_STARTUP_TIMEOUT)
108-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
108+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
109109
#endif /* HSE_STARTUP_TIMEOUT */
110110

111111
/**
@@ -132,6 +132,10 @@
132132
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
133133
#endif /* LSE_VALUE */
134134

135+
#if !defined (LSE_STARTUP_TIMEOUT)
136+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
137+
#endif /* LSE_STARTUP_TIMEOUT */
138+
135139
/**
136140
* @brief External clock source for I2S peripheral
137141
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/OLIMEX_E407/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)0x0500) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/PYBLITEV10/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/PYBV10/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

stmhal/boards/PYBV11/stm32f4xx_hal_conf.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
#endif /* HSE_VALUE */
104104

105105
#if !defined (HSE_STARTUP_TIMEOUT)
106-
#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */
106+
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
107107
#endif /* HSE_STARTUP_TIMEOUT */
108108

109109
/**
@@ -130,6 +130,10 @@
130130
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
131131
#endif /* LSE_VALUE */
132132

133+
#if !defined (LSE_STARTUP_TIMEOUT)
134+
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
135+
#endif /* LSE_STARTUP_TIMEOUT */
136+
133137
/**
134138
* @brief External clock source for I2S peripheral
135139
* This value is used by the I2S HAL module to compute the I2S clock source

0 commit comments

Comments
 (0)