Kashish Haresh Shah
/
HXCClientShield
HXC Client Shield Repository.
Driver/stm32l0xx_hal_conf.h@3:5e1a54378107, 2021-04-19 (annotated)
- Committer:
- kashish_mbed
- Date:
- Mon Apr 19 17:43:09 2021 +0000
- Revision:
- 3:5e1a54378107
- Parent:
- 0:bacc6e701fb4
Successful Build file with CmdProcess Functionality
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kashish_mbed | 0:bacc6e701fb4 | 1 | /** |
kashish_mbed | 0:bacc6e701fb4 | 2 | ****************************************************************************** |
kashish_mbed | 0:bacc6e701fb4 | 3 | * @file stm32l0xx_hal_conf.h |
kashish_mbed | 0:bacc6e701fb4 | 4 | * @brief HAL configuration file. |
kashish_mbed | 0:bacc6e701fb4 | 5 | ****************************************************************************** |
kashish_mbed | 0:bacc6e701fb4 | 6 | * @attention |
kashish_mbed | 0:bacc6e701fb4 | 7 | * |
kashish_mbed | 0:bacc6e701fb4 | 8 | * <h2><center>© COPYRIGHT(c) 2018 STMicroelectronics</center></h2> |
kashish_mbed | 0:bacc6e701fb4 | 9 | * |
kashish_mbed | 0:bacc6e701fb4 | 10 | * Redistribution and use in source and binary forms, with or without modification, |
kashish_mbed | 0:bacc6e701fb4 | 11 | * are permitted provided that the following conditions are met: |
kashish_mbed | 0:bacc6e701fb4 | 12 | * 1. Redistributions of source code must retain the above copyright notice, |
kashish_mbed | 0:bacc6e701fb4 | 13 | * this list of conditions and the following disclaimer. |
kashish_mbed | 0:bacc6e701fb4 | 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
kashish_mbed | 0:bacc6e701fb4 | 15 | * this list of conditions and the following disclaimer in the documentation |
kashish_mbed | 0:bacc6e701fb4 | 16 | * and/or other materials provided with the distribution. |
kashish_mbed | 0:bacc6e701fb4 | 17 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
kashish_mbed | 0:bacc6e701fb4 | 18 | * may be used to endorse or promote products derived from this software |
kashish_mbed | 0:bacc6e701fb4 | 19 | * without specific prior written permission. |
kashish_mbed | 0:bacc6e701fb4 | 20 | * |
kashish_mbed | 0:bacc6e701fb4 | 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
kashish_mbed | 0:bacc6e701fb4 | 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
kashish_mbed | 0:bacc6e701fb4 | 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
kashish_mbed | 0:bacc6e701fb4 | 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
kashish_mbed | 0:bacc6e701fb4 | 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
kashish_mbed | 0:bacc6e701fb4 | 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
kashish_mbed | 0:bacc6e701fb4 | 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
kashish_mbed | 0:bacc6e701fb4 | 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
kashish_mbed | 0:bacc6e701fb4 | 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
kashish_mbed | 0:bacc6e701fb4 | 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
kashish_mbed | 0:bacc6e701fb4 | 31 | * |
kashish_mbed | 0:bacc6e701fb4 | 32 | ****************************************************************************** |
kashish_mbed | 0:bacc6e701fb4 | 33 | */ |
kashish_mbed | 0:bacc6e701fb4 | 34 | |
kashish_mbed | 0:bacc6e701fb4 | 35 | /* Define to prevent recursive inclusion -------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 36 | #ifndef __STM32L0xx_HAL_CONF_H |
kashish_mbed | 0:bacc6e701fb4 | 37 | #define __STM32L0xx_HAL_CONF_H |
kashish_mbed | 0:bacc6e701fb4 | 38 | |
kashish_mbed | 0:bacc6e701fb4 | 39 | #ifdef __cplusplus |
kashish_mbed | 0:bacc6e701fb4 | 40 | extern "C" { |
kashish_mbed | 0:bacc6e701fb4 | 41 | #endif |
kashish_mbed | 0:bacc6e701fb4 | 42 | |
kashish_mbed | 0:bacc6e701fb4 | 43 | /* Exported types ------------------------------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 44 | /* Exported constants --------------------------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 45 | #define HAL_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 46 | #define HAL_RTC_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 47 | #define HAL_UART_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 48 | #define HAL_GPIO_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 49 | #define HAL_DMA_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 50 | #define HAL_RCC_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 51 | #define HAL_RNG_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 52 | #define HAL_FLASH_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 53 | #define HAL_PWR_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 54 | #define HAL_CORTEX_MODULE_ENABLED |
kashish_mbed | 0:bacc6e701fb4 | 55 | |
kashish_mbed | 0:bacc6e701fb4 | 56 | /* ########################## Oscillator Values adaptation ####################*/ |
kashish_mbed | 0:bacc6e701fb4 | 57 | /** |
kashish_mbed | 0:bacc6e701fb4 | 58 | * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. |
kashish_mbed | 0:bacc6e701fb4 | 59 | * This value is used by the RCC HAL module to compute the system frequency |
kashish_mbed | 0:bacc6e701fb4 | 60 | * (when HSE is used as system clock source, directly or through the PLL). |
kashish_mbed | 0:bacc6e701fb4 | 61 | */ |
kashish_mbed | 0:bacc6e701fb4 | 62 | #if !defined (HSE_VALUE) |
kashish_mbed | 0:bacc6e701fb4 | 63 | #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ |
kashish_mbed | 0:bacc6e701fb4 | 64 | #endif /* HSE_VALUE */ |
kashish_mbed | 0:bacc6e701fb4 | 65 | |
kashish_mbed | 0:bacc6e701fb4 | 66 | #if !defined (HSE_STARTUP_TIMEOUT) |
kashish_mbed | 0:bacc6e701fb4 | 67 | #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ |
kashish_mbed | 0:bacc6e701fb4 | 68 | #endif /* HSE_STARTUP_TIMEOUT */ |
kashish_mbed | 0:bacc6e701fb4 | 69 | |
kashish_mbed | 0:bacc6e701fb4 | 70 | /** |
kashish_mbed | 0:bacc6e701fb4 | 71 | * @brief Internal Multiple Speed oscillator (MSI) default value. |
kashish_mbed | 0:bacc6e701fb4 | 72 | * This value is the default MSI range value after Reset. |
kashish_mbed | 0:bacc6e701fb4 | 73 | */ |
kashish_mbed | 0:bacc6e701fb4 | 74 | #if !defined (MSI_VALUE) |
kashish_mbed | 0:bacc6e701fb4 | 75 | #define MSI_VALUE ((uint32_t)2097000U) /*!< Value of the Internal oscillator in Hz*/ |
kashish_mbed | 0:bacc6e701fb4 | 76 | #endif /* MSI_VALUE */ |
kashish_mbed | 0:bacc6e701fb4 | 77 | |
kashish_mbed | 0:bacc6e701fb4 | 78 | /** |
kashish_mbed | 0:bacc6e701fb4 | 79 | * @brief Internal High Speed oscillator (HSI) value. |
kashish_mbed | 0:bacc6e701fb4 | 80 | * This value is used by the RCC HAL module to compute the system frequency |
kashish_mbed | 0:bacc6e701fb4 | 81 | * (when HSI is used as system clock source, directly or through the PLL). |
kashish_mbed | 0:bacc6e701fb4 | 82 | */ |
kashish_mbed | 0:bacc6e701fb4 | 83 | #if !defined (HSI_VALUE) |
kashish_mbed | 0:bacc6e701fb4 | 84 | #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ |
kashish_mbed | 0:bacc6e701fb4 | 85 | #endif /* HSI_VALUE */ |
kashish_mbed | 0:bacc6e701fb4 | 86 | |
kashish_mbed | 0:bacc6e701fb4 | 87 | /** |
kashish_mbed | 0:bacc6e701fb4 | 88 | * @brief Internal High Speed oscillator for USB (HSI48) value. |
kashish_mbed | 0:bacc6e701fb4 | 89 | */ |
kashish_mbed | 0:bacc6e701fb4 | 90 | #if !defined (HSI48_VALUE) |
kashish_mbed | 0:bacc6e701fb4 | 91 | #define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB in Hz. |
kashish_mbed | 0:bacc6e701fb4 | 92 | The real value may vary depending on the variations |
kashish_mbed | 0:bacc6e701fb4 | 93 | in voltage and temperature. */ |
kashish_mbed | 0:bacc6e701fb4 | 94 | #endif /* HSI48_VALUE */ |
kashish_mbed | 0:bacc6e701fb4 | 95 | |
kashish_mbed | 0:bacc6e701fb4 | 96 | /** |
kashish_mbed | 0:bacc6e701fb4 | 97 | * @brief Internal Low Speed oscillator (LSI) value. |
kashish_mbed | 0:bacc6e701fb4 | 98 | */ |
kashish_mbed | 0:bacc6e701fb4 | 99 | #if !defined (LSI_VALUE) |
kashish_mbed | 0:bacc6e701fb4 | 100 | #define LSI_VALUE ((uint32_t)37000U) /*!< LSI Typical Value in Hz*/ |
kashish_mbed | 0:bacc6e701fb4 | 101 | #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz |
kashish_mbed | 0:bacc6e701fb4 | 102 | The real value may vary depending on the variations |
kashish_mbed | 0:bacc6e701fb4 | 103 | in voltage and temperature.*/ |
kashish_mbed | 0:bacc6e701fb4 | 104 | /** |
kashish_mbed | 0:bacc6e701fb4 | 105 | * @brief External Low Speed oscillator (LSE) value. |
kashish_mbed | 0:bacc6e701fb4 | 106 | * This value is used by the UART, RTC HAL module to compute the system frequency |
kashish_mbed | 0:bacc6e701fb4 | 107 | */ |
kashish_mbed | 0:bacc6e701fb4 | 108 | #if !defined (LSE_VALUE) |
kashish_mbed | 0:bacc6e701fb4 | 109 | #define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/ |
kashish_mbed | 0:bacc6e701fb4 | 110 | #endif /* LSE_VALUE */ |
kashish_mbed | 0:bacc6e701fb4 | 111 | |
kashish_mbed | 0:bacc6e701fb4 | 112 | #if !defined (LSE_STARTUP_TIMEOUT) |
kashish_mbed | 0:bacc6e701fb4 | 113 | #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ |
kashish_mbed | 0:bacc6e701fb4 | 114 | #endif /* LSE_STARTUP_TIMEOUT */ |
kashish_mbed | 0:bacc6e701fb4 | 115 | |
kashish_mbed | 0:bacc6e701fb4 | 116 | /* Tip: To avoid modifying this file each time you need to use different HSE, |
kashish_mbed | 0:bacc6e701fb4 | 117 | === you can define the HSE value in your toolchain compiler preprocessor. */ |
kashish_mbed | 0:bacc6e701fb4 | 118 | |
kashish_mbed | 0:bacc6e701fb4 | 119 | /* ########################### System Configuration ######################### */ |
kashish_mbed | 0:bacc6e701fb4 | 120 | /** |
kashish_mbed | 0:bacc6e701fb4 | 121 | * @brief This is the HAL system configuration section |
kashish_mbed | 0:bacc6e701fb4 | 122 | */ |
kashish_mbed | 0:bacc6e701fb4 | 123 | #define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ |
kashish_mbed | 0:bacc6e701fb4 | 124 | #define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ |
kashish_mbed | 0:bacc6e701fb4 | 125 | #define USE_RTOS 0U |
kashish_mbed | 0:bacc6e701fb4 | 126 | #define PREFETCH_ENABLE 0U |
kashish_mbed | 0:bacc6e701fb4 | 127 | #define PREREAD_ENABLE 1U |
kashish_mbed | 0:bacc6e701fb4 | 128 | #define BUFFER_CACHE_DISABLE 0U |
kashish_mbed | 0:bacc6e701fb4 | 129 | |
kashish_mbed | 0:bacc6e701fb4 | 130 | /* ########################## Assert Selection ############################## */ |
kashish_mbed | 0:bacc6e701fb4 | 131 | /** |
kashish_mbed | 0:bacc6e701fb4 | 132 | * @brief Uncomment the line below to expanse the "assert_param" macro in the |
kashish_mbed | 0:bacc6e701fb4 | 133 | * HAL drivers code |
kashish_mbed | 0:bacc6e701fb4 | 134 | */ |
kashish_mbed | 0:bacc6e701fb4 | 135 | /* #define USE_FULL_ASSERT 1 */ |
kashish_mbed | 0:bacc6e701fb4 | 136 | |
kashish_mbed | 0:bacc6e701fb4 | 137 | /* Includes ------------------------------------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 138 | #include "stm32l0xx_hal_rcc.h" |
kashish_mbed | 0:bacc6e701fb4 | 139 | #include "stm32l0xx_hal_gpio.h" |
kashish_mbed | 0:bacc6e701fb4 | 140 | #include "stm32l0xx_hal_dma.h" |
kashish_mbed | 0:bacc6e701fb4 | 141 | #include "stm32l0xx_hal_cortex.h" |
kashish_mbed | 0:bacc6e701fb4 | 142 | #include "stm32l0xx_hal_flash.h" |
kashish_mbed | 0:bacc6e701fb4 | 143 | #include "stm32l0xx_hal_pwr.h" |
kashish_mbed | 0:bacc6e701fb4 | 144 | #include "stm32l0xx_hal_rng.h" |
kashish_mbed | 0:bacc6e701fb4 | 145 | #include "stm32l0xx_hal_rtc.h" |
kashish_mbed | 0:bacc6e701fb4 | 146 | #include "stm32l0xx_hal_uart.h" |
kashish_mbed | 0:bacc6e701fb4 | 147 | |
kashish_mbed | 0:bacc6e701fb4 | 148 | /* Exported macro ------------------------------------------------------------*/ |
kashish_mbed | 0:bacc6e701fb4 | 149 | #ifdef USE_FULL_ASSERT |
kashish_mbed | 0:bacc6e701fb4 | 150 | /** |
kashish_mbed | 0:bacc6e701fb4 | 151 | * @brief The assert_param macro is used for function's parameters check. |
kashish_mbed | 0:bacc6e701fb4 | 152 | * @param expr: If expr is false, it calls assert_failed function |
kashish_mbed | 0:bacc6e701fb4 | 153 | * which reports the name of the source file and the source |
kashish_mbed | 0:bacc6e701fb4 | 154 | * line number of the call that failed. |
kashish_mbed | 0:bacc6e701fb4 | 155 | * If expr is true, it returns no value. |
kashish_mbed | 0:bacc6e701fb4 | 156 | * @retval None |
kashish_mbed | 0:bacc6e701fb4 | 157 | */ |
kashish_mbed | 0:bacc6e701fb4 | 158 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) |
kashish_mbed | 0:bacc6e701fb4 | 159 | /* Exported functions ------------------------------------------------------- */ |
kashish_mbed | 0:bacc6e701fb4 | 160 | void assert_failed(uint8_t* file, uint32_t line); |
kashish_mbed | 0:bacc6e701fb4 | 161 | #else |
kashish_mbed | 0:bacc6e701fb4 | 162 | #define assert_param(expr) ((void)0U) |
kashish_mbed | 0:bacc6e701fb4 | 163 | #endif /* USE_FULL_ASSERT */ |
kashish_mbed | 0:bacc6e701fb4 | 164 | |
kashish_mbed | 0:bacc6e701fb4 | 165 | #ifdef __cplusplus |
kashish_mbed | 0:bacc6e701fb4 | 166 | } |
kashish_mbed | 0:bacc6e701fb4 | 167 | #endif |
kashish_mbed | 0:bacc6e701fb4 | 168 | |
kashish_mbed | 0:bacc6e701fb4 | 169 | #endif /* __STM32L0xx_HAL_CONF_H */ |
kashish_mbed | 0:bacc6e701fb4 | 170 | |
kashish_mbed | 0:bacc6e701fb4 | 171 | |
kashish_mbed | 0:bacc6e701fb4 | 172 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
kashish_mbed | 0:bacc6e701fb4 | 173 |