From 7928b3e347972f1c2144f7ca60c7eb84ff0dde7b Mon Sep 17 00:00:00 2001 From: Krzysztof Blazewicz Date: Tue, 6 Sep 2016 13:54:20 +0200 Subject: [PATCH] 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 --- stmhal/boards/CERB40/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/HYDRABUS/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/NETDUINO_PLUS_2/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/NUCLEO_F401RE/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/NUCLEO_F411RE/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/OLIMEX_E407/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/PYBLITEV10/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/PYBV10/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/PYBV11/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/PYBV3/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/PYBV4/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/STM32F411DISC/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/STM32F429DISC/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/STM32F439/stm32f4xx_hal_conf.h | 6 +++++- stmhal/boards/STM32F4DISC/stm32f4xx_hal_conf.h | 6 +++++- 16 files changed, 80 insertions(+), 16 deletions(-) diff --git a/stmhal/boards/CERB40/stm32f4xx_hal_conf.h b/stmhal/boards/CERB40/stm32f4xx_hal_conf.h index b3ffbe7b50..d6aca705cf 100644 --- a/stmhal/boards/CERB40/stm32f4xx_hal_conf.h +++ b/stmhal/boards/CERB40/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h b/stmhal/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h index c68c00d198..11a396b73e 100644 --- a/stmhal/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h +++ b/stmhal/boards/ESPRUINO_PICO/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/HYDRABUS/stm32f4xx_hal_conf.h b/stmhal/boards/HYDRABUS/stm32f4xx_hal_conf.h index dffaaa9062..8941e8290f 100644 --- a/stmhal/boards/HYDRABUS/stm32f4xx_hal_conf.h +++ b/stmhal/boards/HYDRABUS/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/NETDUINO_PLUS_2/stm32f4xx_hal_conf.h b/stmhal/boards/NETDUINO_PLUS_2/stm32f4xx_hal_conf.h index 46f7935c52..8b04c2845f 100644 --- a/stmhal/boards/NETDUINO_PLUS_2/stm32f4xx_hal_conf.h +++ b/stmhal/boards/NETDUINO_PLUS_2/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/NUCLEO_F401RE/stm32f4xx_hal_conf.h b/stmhal/boards/NUCLEO_F401RE/stm32f4xx_hal_conf.h index 672bcfbe57..c20421f0ff 100644 --- a/stmhal/boards/NUCLEO_F401RE/stm32f4xx_hal_conf.h +++ b/stmhal/boards/NUCLEO_F401RE/stm32f4xx_hal_conf.h @@ -105,7 +105,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -132,6 +132,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/NUCLEO_F411RE/stm32f4xx_hal_conf.h b/stmhal/boards/NUCLEO_F411RE/stm32f4xx_hal_conf.h index c653c82786..e16fba155c 100644 --- a/stmhal/boards/NUCLEO_F411RE/stm32f4xx_hal_conf.h +++ b/stmhal/boards/NUCLEO_F411RE/stm32f4xx_hal_conf.h @@ -105,7 +105,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -132,6 +132,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/OLIMEX_E407/stm32f4xx_hal_conf.h b/stmhal/boards/OLIMEX_E407/stm32f4xx_hal_conf.h index de2e5f7e7e..b84b0a8920 100644 --- a/stmhal/boards/OLIMEX_E407/stm32f4xx_hal_conf.h +++ b/stmhal/boards/OLIMEX_E407/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)0x0500) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/PYBLITEV10/stm32f4xx_hal_conf.h b/stmhal/boards/PYBLITEV10/stm32f4xx_hal_conf.h index 1cf3d113db..4ee8e72769 100644 --- a/stmhal/boards/PYBLITEV10/stm32f4xx_hal_conf.h +++ b/stmhal/boards/PYBLITEV10/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/PYBV10/stm32f4xx_hal_conf.h b/stmhal/boards/PYBV10/stm32f4xx_hal_conf.h index 5b5359667b..52518e196b 100644 --- a/stmhal/boards/PYBV10/stm32f4xx_hal_conf.h +++ b/stmhal/boards/PYBV10/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/PYBV11/stm32f4xx_hal_conf.h b/stmhal/boards/PYBV11/stm32f4xx_hal_conf.h index bdd7ef5634..b84b0a8920 100644 --- a/stmhal/boards/PYBV11/stm32f4xx_hal_conf.h +++ b/stmhal/boards/PYBV11/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/PYBV3/stm32f4xx_hal_conf.h b/stmhal/boards/PYBV3/stm32f4xx_hal_conf.h index dffaaa9062..8941e8290f 100644 --- a/stmhal/boards/PYBV3/stm32f4xx_hal_conf.h +++ b/stmhal/boards/PYBV3/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/PYBV4/stm32f4xx_hal_conf.h b/stmhal/boards/PYBV4/stm32f4xx_hal_conf.h index dffaaa9062..8941e8290f 100644 --- a/stmhal/boards/PYBV4/stm32f4xx_hal_conf.h +++ b/stmhal/boards/PYBV4/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/STM32F411DISC/stm32f4xx_hal_conf.h b/stmhal/boards/STM32F411DISC/stm32f4xx_hal_conf.h index b97497454d..921cbe5fe1 100644 --- a/stmhal/boards/STM32F411DISC/stm32f4xx_hal_conf.h +++ b/stmhal/boards/STM32F411DISC/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/STM32F429DISC/stm32f4xx_hal_conf.h b/stmhal/boards/STM32F429DISC/stm32f4xx_hal_conf.h index 7090db1112..4f5962dcbd 100644 --- a/stmhal/boards/STM32F429DISC/stm32f4xx_hal_conf.h +++ b/stmhal/boards/STM32F429DISC/stm32f4xx_hal_conf.h @@ -104,7 +104,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -131,6 +131,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/STM32F439/stm32f4xx_hal_conf.h b/stmhal/boards/STM32F439/stm32f4xx_hal_conf.h index 9963f7f9f5..d121b18c5e 100644 --- a/stmhal/boards/STM32F439/stm32f4xx_hal_conf.h +++ b/stmhal/boards/STM32F439/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source diff --git a/stmhal/boards/STM32F4DISC/stm32f4xx_hal_conf.h b/stmhal/boards/STM32F4DISC/stm32f4xx_hal_conf.h index dffaaa9062..8941e8290f 100644 --- a/stmhal/boards/STM32F4DISC/stm32f4xx_hal_conf.h +++ b/stmhal/boards/STM32F4DISC/stm32f4xx_hal_conf.h @@ -103,7 +103,7 @@ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ + #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** @@ -130,6 +130,10 @@ #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source