cc y / mbed

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Mar 02 09:58:28 2016 +0100
Revision:
115:87f2f5183dfb
Child:
116:c0f6e94411f5
Release 115 of the mbed library

Changes:
- new targets - NUCLEO_F746ZG
- Bugfix - STM32F7 + STM32L4 - RTC init fix
- Bugfix - STM32L4 Set NVIC_RAM_VECTOR_ADDRESS to 0x10000000
- B96B_F446VE - CAN addition
- Changed target name from NZ32SC151 to NZ32_SC151

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 115:87f2f5183dfb 1 /**
Kojto 115:87f2f5183dfb 2 ******************************************************************************
Kojto 115:87f2f5183dfb 3 * @file stm32f7xx_hal_rcc_ex.h
Kojto 115:87f2f5183dfb 4 * @author MCD Application Team
Kojto 115:87f2f5183dfb 5 * @version V1.0.1
Kojto 115:87f2f5183dfb 6 * @date 25-June-2015
Kojto 115:87f2f5183dfb 7 * @brief Header file of RCC HAL Extension module.
Kojto 115:87f2f5183dfb 8 ******************************************************************************
Kojto 115:87f2f5183dfb 9 * @attention
Kojto 115:87f2f5183dfb 10 *
Kojto 115:87f2f5183dfb 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 115:87f2f5183dfb 12 *
Kojto 115:87f2f5183dfb 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 115:87f2f5183dfb 14 * are permitted provided that the following conditions are met:
Kojto 115:87f2f5183dfb 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 115:87f2f5183dfb 16 * this list of conditions and the following disclaimer.
Kojto 115:87f2f5183dfb 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 115:87f2f5183dfb 18 * this list of conditions and the following disclaimer in the documentation
Kojto 115:87f2f5183dfb 19 * and/or other materials provided with the distribution.
Kojto 115:87f2f5183dfb 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 115:87f2f5183dfb 21 * may be used to endorse or promote products derived from this software
Kojto 115:87f2f5183dfb 22 * without specific prior written permission.
Kojto 115:87f2f5183dfb 23 *
Kojto 115:87f2f5183dfb 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 115:87f2f5183dfb 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 115:87f2f5183dfb 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 115:87f2f5183dfb 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 115:87f2f5183dfb 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 115:87f2f5183dfb 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 115:87f2f5183dfb 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 115:87f2f5183dfb 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 115:87f2f5183dfb 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 115:87f2f5183dfb 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 115:87f2f5183dfb 34 *
Kojto 115:87f2f5183dfb 35 ******************************************************************************
Kojto 115:87f2f5183dfb 36 */
Kojto 115:87f2f5183dfb 37
Kojto 115:87f2f5183dfb 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 115:87f2f5183dfb 39 #ifndef __STM32F7xx_HAL_RCC_EX_H
Kojto 115:87f2f5183dfb 40 #define __STM32F7xx_HAL_RCC_EX_H
Kojto 115:87f2f5183dfb 41
Kojto 115:87f2f5183dfb 42 #ifdef __cplusplus
Kojto 115:87f2f5183dfb 43 extern "C" {
Kojto 115:87f2f5183dfb 44 #endif
Kojto 115:87f2f5183dfb 45
Kojto 115:87f2f5183dfb 46 /* Includes ------------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 47 #include "stm32f7xx_hal_def.h"
Kojto 115:87f2f5183dfb 48
Kojto 115:87f2f5183dfb 49 /** @addtogroup STM32F7xx_HAL_Driver
Kojto 115:87f2f5183dfb 50 * @{
Kojto 115:87f2f5183dfb 51 */
Kojto 115:87f2f5183dfb 52
Kojto 115:87f2f5183dfb 53 /** @addtogroup RCCEx
Kojto 115:87f2f5183dfb 54 * @{
Kojto 115:87f2f5183dfb 55 */
Kojto 115:87f2f5183dfb 56
Kojto 115:87f2f5183dfb 57 /* Exported types ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 58 /** @defgroup RCCEx_Exported_Types RCCEx Exported Types
Kojto 115:87f2f5183dfb 59 * @{
Kojto 115:87f2f5183dfb 60 */
Kojto 115:87f2f5183dfb 61
Kojto 115:87f2f5183dfb 62 /**
Kojto 115:87f2f5183dfb 63 * @brief PLLI2S Clock structure definition
Kojto 115:87f2f5183dfb 64 */
Kojto 115:87f2f5183dfb 65 typedef struct
Kojto 115:87f2f5183dfb 66 {
Kojto 115:87f2f5183dfb 67 uint32_t PLLI2SN; /*!< Specifies the multiplication factor for PLLI2S VCO output clock.
Kojto 115:87f2f5183dfb 68 This parameter must be a number between Min_Data = 49 and Max_Data = 432.
Kojto 115:87f2f5183dfb 69 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
Kojto 115:87f2f5183dfb 70
Kojto 115:87f2f5183dfb 71 uint32_t PLLI2SR; /*!< Specifies the division factor for I2S clock.
Kojto 115:87f2f5183dfb 72 This parameter must be a number between Min_Data = 2 and Max_Data = 7.
Kojto 115:87f2f5183dfb 73 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
Kojto 115:87f2f5183dfb 74
Kojto 115:87f2f5183dfb 75 uint32_t PLLI2SQ; /*!< Specifies the division factor for SAI1 clock.
Kojto 115:87f2f5183dfb 76 This parameter must be a number between Min_Data = 2 and Max_Data = 15.
Kojto 115:87f2f5183dfb 77 This parameter will be used only when PLLI2S is selected as Clock Source SAI */
Kojto 115:87f2f5183dfb 78
Kojto 115:87f2f5183dfb 79 uint32_t PLLI2SP; /*!< Specifies the division factor for SPDIF-RX clock.
Kojto 115:87f2f5183dfb 80 This parameter must be a number between 0 and 3 for respective values 2, 4, 6 and 8.
Kojto 115:87f2f5183dfb 81 This parameter will be used only when PLLI2S is selected as Clock Source SPDDIF-RX */
Kojto 115:87f2f5183dfb 82 }RCC_PLLI2SInitTypeDef;
Kojto 115:87f2f5183dfb 83
Kojto 115:87f2f5183dfb 84 /**
Kojto 115:87f2f5183dfb 85 * @brief PLLSAI Clock structure definition
Kojto 115:87f2f5183dfb 86 */
Kojto 115:87f2f5183dfb 87 typedef struct
Kojto 115:87f2f5183dfb 88 {
Kojto 115:87f2f5183dfb 89 uint32_t PLLSAIN; /*!< Specifies the multiplication factor for PLLI2S VCO output clock.
Kojto 115:87f2f5183dfb 90 This parameter must be a number between Min_Data = 49 and Max_Data = 432.
Kojto 115:87f2f5183dfb 91 This parameter will be used only when PLLSAI is selected as Clock Source SAI or LTDC */
Kojto 115:87f2f5183dfb 92
Kojto 115:87f2f5183dfb 93 uint32_t PLLSAIQ; /*!< Specifies the division factor for SAI1 clock.
Kojto 115:87f2f5183dfb 94 This parameter must be a number between Min_Data = 2 and Max_Data = 15.
Kojto 115:87f2f5183dfb 95 This parameter will be used only when PLLSAI is selected as Clock Source SAI or LTDC */
Kojto 115:87f2f5183dfb 96
Kojto 115:87f2f5183dfb 97 uint32_t PLLSAIR; /*!< specifies the division factor for LTDC clock
Kojto 115:87f2f5183dfb 98 This parameter must be a number between Min_Data = 2 and Max_Data = 7.
Kojto 115:87f2f5183dfb 99 This parameter will be used only when PLLSAI is selected as Clock Source LTDC */
Kojto 115:87f2f5183dfb 100
Kojto 115:87f2f5183dfb 101 uint32_t PLLSAIP; /*!< Specifies the division factor for 48MHz clock.
Kojto 115:87f2f5183dfb 102 This parameter can be a value of @ref RCCEx_PLLSAIP_Clock_Divider
Kojto 115:87f2f5183dfb 103 This parameter will be used only when PLLSAI is disabled */
Kojto 115:87f2f5183dfb 104 }RCC_PLLSAIInitTypeDef;
Kojto 115:87f2f5183dfb 105
Kojto 115:87f2f5183dfb 106 /**
Kojto 115:87f2f5183dfb 107 * @brief RCC extended clocks structure definition
Kojto 115:87f2f5183dfb 108 */
Kojto 115:87f2f5183dfb 109 typedef struct
Kojto 115:87f2f5183dfb 110 {
Kojto 115:87f2f5183dfb 111 uint32_t PeriphClockSelection; /*!< The Extended Clock to be configured.
Kojto 115:87f2f5183dfb 112 This parameter can be a value of @ref RCCEx_Periph_Clock_Selection */
Kojto 115:87f2f5183dfb 113
Kojto 115:87f2f5183dfb 114 RCC_PLLI2SInitTypeDef PLLI2S; /*!< PLL I2S structure parameters.
Kojto 115:87f2f5183dfb 115 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
Kojto 115:87f2f5183dfb 116
Kojto 115:87f2f5183dfb 117 RCC_PLLSAIInitTypeDef PLLSAI; /*!< PLL SAI structure parameters.
Kojto 115:87f2f5183dfb 118 This parameter will be used only when PLLI2S is selected as Clock Source SAI or LTDC */
Kojto 115:87f2f5183dfb 119
Kojto 115:87f2f5183dfb 120 uint32_t PLLI2SDivQ; /*!< Specifies the PLLI2S division factor for SAI1 clock.
Kojto 115:87f2f5183dfb 121 This parameter must be a number between Min_Data = 1 and Max_Data = 32
Kojto 115:87f2f5183dfb 122 This parameter will be used only when PLLI2S is selected as Clock Source SAI */
Kojto 115:87f2f5183dfb 123
Kojto 115:87f2f5183dfb 124 uint32_t PLLSAIDivQ; /*!< Specifies the PLLI2S division factor for SAI1 clock.
Kojto 115:87f2f5183dfb 125 This parameter must be a number between Min_Data = 1 and Max_Data = 32
Kojto 115:87f2f5183dfb 126 This parameter will be used only when PLLSAI is selected as Clock Source SAI */
Kojto 115:87f2f5183dfb 127
Kojto 115:87f2f5183dfb 128 uint32_t PLLSAIDivR; /*!< Specifies the PLLSAI division factor for LTDC clock.
Kojto 115:87f2f5183dfb 129 This parameter must be one value of @ref RCCEx_PLLSAI_DIVR */
Kojto 115:87f2f5183dfb 130
Kojto 115:87f2f5183dfb 131 uint32_t RTCClockSelection; /*!< Specifies RTC Clock source Selection.
Kojto 115:87f2f5183dfb 132 This parameter can be a value of @ref RCC_RTC_Clock_Source */
Kojto 115:87f2f5183dfb 133
Kojto 115:87f2f5183dfb 134 uint32_t I2sClockSelection; /*!< Specifies I2S Clock source Selection.
Kojto 115:87f2f5183dfb 135 This parameter can be a value of @ref RCCEx_I2S_Clock_Source */
Kojto 115:87f2f5183dfb 136
Kojto 115:87f2f5183dfb 137 uint32_t TIMPresSelection; /*!< Specifies TIM Clock Prescalers Selection.
Kojto 115:87f2f5183dfb 138 This parameter can be a value of @ref RCCEx_TIM_Prescaler_Selection */
Kojto 115:87f2f5183dfb 139
Kojto 115:87f2f5183dfb 140 uint32_t Sai1ClockSelection; /*!< Specifies SAI1 Clock Prescalers Selection
Kojto 115:87f2f5183dfb 141 This parameter can be a value of @ref RCCEx_SAI1_Clock_Source */
Kojto 115:87f2f5183dfb 142
Kojto 115:87f2f5183dfb 143 uint32_t Sai2ClockSelection; /*!< Specifies SAI2 Clock Prescalers Selection
Kojto 115:87f2f5183dfb 144 This parameter can be a value of @ref RCCEx_SAI2_Clock_Source */
Kojto 115:87f2f5183dfb 145
Kojto 115:87f2f5183dfb 146 uint32_t Usart1ClockSelection; /*!< USART1 clock source
Kojto 115:87f2f5183dfb 147 This parameter can be a value of @ref RCCEx_USART1_Clock_Source */
Kojto 115:87f2f5183dfb 148
Kojto 115:87f2f5183dfb 149 uint32_t Usart2ClockSelection; /*!< USART2 clock source
Kojto 115:87f2f5183dfb 150 This parameter can be a value of @ref RCCEx_USART2_Clock_Source */
Kojto 115:87f2f5183dfb 151
Kojto 115:87f2f5183dfb 152 uint32_t Usart3ClockSelection; /*!< USART3 clock source
Kojto 115:87f2f5183dfb 153 This parameter can be a value of @ref RCCEx_USART3_Clock_Source */
Kojto 115:87f2f5183dfb 154
Kojto 115:87f2f5183dfb 155 uint32_t Uart4ClockSelection; /*!< UART4 clock source
Kojto 115:87f2f5183dfb 156 This parameter can be a value of @ref RCCEx_UART4_Clock_Source */
Kojto 115:87f2f5183dfb 157
Kojto 115:87f2f5183dfb 158 uint32_t Uart5ClockSelection; /*!< UART5 clock source
Kojto 115:87f2f5183dfb 159 This parameter can be a value of @ref RCCEx_UART5_Clock_Source */
Kojto 115:87f2f5183dfb 160
Kojto 115:87f2f5183dfb 161 uint32_t Usart6ClockSelection; /*!< USART6 clock source
Kojto 115:87f2f5183dfb 162 This parameter can be a value of @ref RCCEx_USART6_Clock_Source */
Kojto 115:87f2f5183dfb 163
Kojto 115:87f2f5183dfb 164 uint32_t Uart7ClockSelection; /*!< UART7 clock source
Kojto 115:87f2f5183dfb 165 This parameter can be a value of @ref RCCEx_UART7_Clock_Source */
Kojto 115:87f2f5183dfb 166
Kojto 115:87f2f5183dfb 167 uint32_t Uart8ClockSelection; /*!< UART8 clock source
Kojto 115:87f2f5183dfb 168 This parameter can be a value of @ref RCCEx_UART8_Clock_Source */
Kojto 115:87f2f5183dfb 169
Kojto 115:87f2f5183dfb 170 uint32_t I2c1ClockSelection; /*!< I2C1 clock source
Kojto 115:87f2f5183dfb 171 This parameter can be a value of @ref RCCEx_I2C1_Clock_Source */
Kojto 115:87f2f5183dfb 172
Kojto 115:87f2f5183dfb 173 uint32_t I2c2ClockSelection; /*!< I2C2 clock source
Kojto 115:87f2f5183dfb 174 This parameter can be a value of @ref RCCEx_I2C2_Clock_Source */
Kojto 115:87f2f5183dfb 175
Kojto 115:87f2f5183dfb 176 uint32_t I2c3ClockSelection; /*!< I2C3 clock source
Kojto 115:87f2f5183dfb 177 This parameter can be a value of @ref RCCEx_I2C3_Clock_Source */
Kojto 115:87f2f5183dfb 178
Kojto 115:87f2f5183dfb 179 uint32_t I2c4ClockSelection; /*!< I2C4 clock source
Kojto 115:87f2f5183dfb 180 This parameter can be a value of @ref RCCEx_I2C4_Clock_Source */
Kojto 115:87f2f5183dfb 181
Kojto 115:87f2f5183dfb 182 uint32_t Lptim1ClockSelection; /*!< Specifies LPTIM1 clock source
Kojto 115:87f2f5183dfb 183 This parameter can be a value of @ref RCCEx_LPTIM1_Clock_Source */
Kojto 115:87f2f5183dfb 184
Kojto 115:87f2f5183dfb 185 uint32_t CecClockSelection; /*!< CEC clock source
Kojto 115:87f2f5183dfb 186 This parameter can be a value of @ref RCCEx_CEC_Clock_Source */
Kojto 115:87f2f5183dfb 187
Kojto 115:87f2f5183dfb 188 uint32_t Clk48ClockSelection; /*!< Specifies 48Mhz clock source used by USB OTG FS, RNG and SDMMC
Kojto 115:87f2f5183dfb 189 This parameter can be a value of @ref RCCEx_CLK48_Clock_Source */
Kojto 115:87f2f5183dfb 190
Kojto 115:87f2f5183dfb 191 uint32_t Sdmmc1ClockSelection; /*!< SDMMC1 clock source
Kojto 115:87f2f5183dfb 192 This parameter can be a value of @ref RCCEx_SDMMC1_Clock_Source */
Kojto 115:87f2f5183dfb 193
Kojto 115:87f2f5183dfb 194 }RCC_PeriphCLKInitTypeDef;
Kojto 115:87f2f5183dfb 195 /**
Kojto 115:87f2f5183dfb 196 * @}
Kojto 115:87f2f5183dfb 197 */
Kojto 115:87f2f5183dfb 198
Kojto 115:87f2f5183dfb 199 /* Exported constants --------------------------------------------------------*/
Kojto 115:87f2f5183dfb 200 /** @defgroup RCCEx_Exported_Constants RCCEx Exported Constants
Kojto 115:87f2f5183dfb 201 * @{
Kojto 115:87f2f5183dfb 202 */
Kojto 115:87f2f5183dfb 203
Kojto 115:87f2f5183dfb 204 /** @defgroup RCCEx_Periph_Clock_Selection RCC Periph Clock Selection
Kojto 115:87f2f5183dfb 205 * @{
Kojto 115:87f2f5183dfb 206 */
Kojto 115:87f2f5183dfb 207 #define RCC_PERIPHCLK_I2S ((uint32_t)0x00000001)
Kojto 115:87f2f5183dfb 208 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 209 #define RCC_PERIPHCLK_LTDC ((uint32_t)0x00000008)
Kojto 115:87f2f5183dfb 210 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 211 #define RCC_PERIPHCLK_TIM ((uint32_t)0x00000010)
Kojto 115:87f2f5183dfb 212 #define RCC_PERIPHCLK_RTC ((uint32_t)0x00000020)
Kojto 115:87f2f5183dfb 213 #define RCC_PERIPHCLK_USART1 ((uint32_t)0x00000040)
Kojto 115:87f2f5183dfb 214 #define RCC_PERIPHCLK_USART2 ((uint32_t)0x00000080)
Kojto 115:87f2f5183dfb 215 #define RCC_PERIPHCLK_USART3 ((uint32_t)0x00000100)
Kojto 115:87f2f5183dfb 216 #define RCC_PERIPHCLK_UART4 ((uint32_t)0x00000200)
Kojto 115:87f2f5183dfb 217 #define RCC_PERIPHCLK_UART5 ((uint32_t)0x00000400)
Kojto 115:87f2f5183dfb 218 #define RCC_PERIPHCLK_USART6 ((uint32_t)0x00000800)
Kojto 115:87f2f5183dfb 219 #define RCC_PERIPHCLK_UART7 ((uint32_t)0x00001000)
Kojto 115:87f2f5183dfb 220 #define RCC_PERIPHCLK_UART8 ((uint32_t)0x00002000)
Kojto 115:87f2f5183dfb 221 #define RCC_PERIPHCLK_I2C1 ((uint32_t)0x00004000)
Kojto 115:87f2f5183dfb 222 #define RCC_PERIPHCLK_I2C2 ((uint32_t)0x00008000)
Kojto 115:87f2f5183dfb 223 #define RCC_PERIPHCLK_I2C3 ((uint32_t)0x00010000)
Kojto 115:87f2f5183dfb 224 #define RCC_PERIPHCLK_I2C4 ((uint32_t)0x00020000)
Kojto 115:87f2f5183dfb 225 #define RCC_PERIPHCLK_LPTIM1 ((uint32_t)0x00040000)
Kojto 115:87f2f5183dfb 226 #define RCC_PERIPHCLK_SAI1 ((uint32_t)0x00080000)
Kojto 115:87f2f5183dfb 227 #define RCC_PERIPHCLK_SAI2 ((uint32_t)0x00100000)
Kojto 115:87f2f5183dfb 228 #define RCC_PERIPHCLK_CLK48 ((uint32_t)0x00200000)
Kojto 115:87f2f5183dfb 229 #define RCC_PERIPHCLK_CEC ((uint32_t)0x00400000)
Kojto 115:87f2f5183dfb 230 #define RCC_PERIPHCLK_SDMMC1 ((uint32_t)0x00800000)
Kojto 115:87f2f5183dfb 231 #define RCC_PERIPHCLK_SPDIFRX ((uint32_t)0x01000000)
Kojto 115:87f2f5183dfb 232 #define RCC_PERIPHCLK_PLLI2S ((uint32_t)0x02000000)
Kojto 115:87f2f5183dfb 233
Kojto 115:87f2f5183dfb 234
Kojto 115:87f2f5183dfb 235 /**
Kojto 115:87f2f5183dfb 236 * @}
Kojto 115:87f2f5183dfb 237 */
Kojto 115:87f2f5183dfb 238
Kojto 115:87f2f5183dfb 239 /** @defgroup RCCEx_PLLSAIP_Clock_Divider RCCEx PLLSAIP Clock Divider
Kojto 115:87f2f5183dfb 240 * @{
Kojto 115:87f2f5183dfb 241 */
Kojto 115:87f2f5183dfb 242 #define RCC_PLLSAIP_DIV2 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 243 #define RCC_PLLSAIP_DIV4 ((uint32_t)0x00000001)
Kojto 115:87f2f5183dfb 244 #define RCC_PLLSAIP_DIV6 ((uint32_t)0x00000002)
Kojto 115:87f2f5183dfb 245 #define RCC_PLLSAIP_DIV8 ((uint32_t)0x00000003)
Kojto 115:87f2f5183dfb 246 /**
Kojto 115:87f2f5183dfb 247 * @}
Kojto 115:87f2f5183dfb 248 */
Kojto 115:87f2f5183dfb 249
Kojto 115:87f2f5183dfb 250 /** @defgroup RCCEx_PLLSAI_DIVR RCCEx PLLSAI DIVR
Kojto 115:87f2f5183dfb 251 * @{
Kojto 115:87f2f5183dfb 252 */
Kojto 115:87f2f5183dfb 253 #define RCC_PLLSAIDIVR_2 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 254 #define RCC_PLLSAIDIVR_4 RCC_DCKCFGR1_PLLSAIDIVR_0
Kojto 115:87f2f5183dfb 255 #define RCC_PLLSAIDIVR_8 RCC_DCKCFGR1_PLLSAIDIVR_1
Kojto 115:87f2f5183dfb 256 #define RCC_PLLSAIDIVR_16 RCC_DCKCFGR1_PLLSAIDIVR
Kojto 115:87f2f5183dfb 257 /**
Kojto 115:87f2f5183dfb 258 * @}
Kojto 115:87f2f5183dfb 259 */
Kojto 115:87f2f5183dfb 260
Kojto 115:87f2f5183dfb 261 /** @defgroup RCCEx_I2S_Clock_Source RCCEx I2S Clock Source
Kojto 115:87f2f5183dfb 262 * @{
Kojto 115:87f2f5183dfb 263 */
Kojto 115:87f2f5183dfb 264 #define RCC_I2SCLKSOURCE_PLLI2S ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 265 #define RCC_I2SCLKSOURCE_EXT RCC_CFGR_I2SSRC
Kojto 115:87f2f5183dfb 266
Kojto 115:87f2f5183dfb 267 /**
Kojto 115:87f2f5183dfb 268 * @}
Kojto 115:87f2f5183dfb 269 */
Kojto 115:87f2f5183dfb 270
Kojto 115:87f2f5183dfb 271
Kojto 115:87f2f5183dfb 272 /** @defgroup RCCEx_SAI1_Clock_Source RCCEx SAI1 Clock Source
Kojto 115:87f2f5183dfb 273 * @{
Kojto 115:87f2f5183dfb 274 */
Kojto 115:87f2f5183dfb 275 #define RCC_SAI1CLKSOURCE_PLLSAI ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 276 #define RCC_SAI1CLKSOURCE_PLLI2S RCC_DCKCFGR1_SAI1SEL_0
Kojto 115:87f2f5183dfb 277 #define RCC_SAI1CLKSOURCE_PIN RCC_DCKCFGR1_SAI1SEL_1
Kojto 115:87f2f5183dfb 278
Kojto 115:87f2f5183dfb 279 /**
Kojto 115:87f2f5183dfb 280 * @}
Kojto 115:87f2f5183dfb 281 */
Kojto 115:87f2f5183dfb 282
Kojto 115:87f2f5183dfb 283 /** @defgroup RCCEx_SAI2_Clock_Source RCCEx SAI2 Clock Source
Kojto 115:87f2f5183dfb 284 * @{
Kojto 115:87f2f5183dfb 285 */
Kojto 115:87f2f5183dfb 286 #define RCC_SAI2CLKSOURCE_PLLSAI ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 287 #define RCC_SAI2CLKSOURCE_PLLI2S RCC_DCKCFGR1_SAI2SEL_0
Kojto 115:87f2f5183dfb 288 #define RCC_SAI2CLKSOURCE_PIN RCC_DCKCFGR1_SAI2SEL_1
Kojto 115:87f2f5183dfb 289 /**
Kojto 115:87f2f5183dfb 290 * @}
Kojto 115:87f2f5183dfb 291 */
Kojto 115:87f2f5183dfb 292
Kojto 115:87f2f5183dfb 293 /** @defgroup RCCEx_SDMMC1_Clock_Source RCCEx SDMMC1 Clock Source
Kojto 115:87f2f5183dfb 294 * @{
Kojto 115:87f2f5183dfb 295 */
Kojto 115:87f2f5183dfb 296 #define RCC_SDMMC1CLKSOURCE_CLK48 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 297 #define RCC_SDMMC1CLKSOURCE_SYSCLK RCC_DCKCFGR2_SDMMC1SEL
Kojto 115:87f2f5183dfb 298 /**
Kojto 115:87f2f5183dfb 299 * @}
Kojto 115:87f2f5183dfb 300 */
Kojto 115:87f2f5183dfb 301
Kojto 115:87f2f5183dfb 302 /** @defgroup RCCEx_CEC_Clock_Source RCCEx CEC Clock Source
Kojto 115:87f2f5183dfb 303 * @{
Kojto 115:87f2f5183dfb 304 */
Kojto 115:87f2f5183dfb 305 #define RCC_CECCLKSOURCE_LSE ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 306 #define RCC_CECCLKSOURCE_HSI RCC_DCKCFGR2_CECSEL /* CEC clock is HSI/488*/
Kojto 115:87f2f5183dfb 307 /**
Kojto 115:87f2f5183dfb 308 * @}
Kojto 115:87f2f5183dfb 309 */
Kojto 115:87f2f5183dfb 310
Kojto 115:87f2f5183dfb 311 /** @defgroup RCCEx_USART1_Clock_Source RCCEx USART1 Clock Source
Kojto 115:87f2f5183dfb 312 * @{
Kojto 115:87f2f5183dfb 313 */
Kojto 115:87f2f5183dfb 314 #define RCC_USART1CLKSOURCE_PCLK2 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 315 #define RCC_USART1CLKSOURCE_SYSCLK RCC_DCKCFGR2_USART1SEL_0
Kojto 115:87f2f5183dfb 316 #define RCC_USART1CLKSOURCE_HSI RCC_DCKCFGR2_USART1SEL_1
Kojto 115:87f2f5183dfb 317 #define RCC_USART1CLKSOURCE_LSE RCC_DCKCFGR2_USART1SEL
Kojto 115:87f2f5183dfb 318 /**
Kojto 115:87f2f5183dfb 319 * @}
Kojto 115:87f2f5183dfb 320 */
Kojto 115:87f2f5183dfb 321
Kojto 115:87f2f5183dfb 322 /** @defgroup RCCEx_USART2_Clock_Source RCCEx USART2 Clock Source
Kojto 115:87f2f5183dfb 323 * @{
Kojto 115:87f2f5183dfb 324 */
Kojto 115:87f2f5183dfb 325 #define RCC_USART2CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 326 #define RCC_USART2CLKSOURCE_SYSCLK RCC_DCKCFGR2_USART2SEL_0
Kojto 115:87f2f5183dfb 327 #define RCC_USART2CLKSOURCE_HSI RCC_DCKCFGR2_USART2SEL_1
Kojto 115:87f2f5183dfb 328 #define RCC_USART2CLKSOURCE_LSE RCC_DCKCFGR2_USART2SEL
Kojto 115:87f2f5183dfb 329 /**
Kojto 115:87f2f5183dfb 330 * @}
Kojto 115:87f2f5183dfb 331 */
Kojto 115:87f2f5183dfb 332
Kojto 115:87f2f5183dfb 333 /** @defgroup RCCEx_USART3_Clock_Source RCCEx USART3 Clock Source
Kojto 115:87f2f5183dfb 334 * @{
Kojto 115:87f2f5183dfb 335 */
Kojto 115:87f2f5183dfb 336 #define RCC_USART3CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 337 #define RCC_USART3CLKSOURCE_SYSCLK RCC_DCKCFGR2_USART3SEL_0
Kojto 115:87f2f5183dfb 338 #define RCC_USART3CLKSOURCE_HSI RCC_DCKCFGR2_USART3SEL_1
Kojto 115:87f2f5183dfb 339 #define RCC_USART3CLKSOURCE_LSE RCC_DCKCFGR2_USART3SEL
Kojto 115:87f2f5183dfb 340 /**
Kojto 115:87f2f5183dfb 341 * @}
Kojto 115:87f2f5183dfb 342 */
Kojto 115:87f2f5183dfb 343
Kojto 115:87f2f5183dfb 344 /** @defgroup RCCEx_UART4_Clock_Source RCCEx UART4 Clock Source
Kojto 115:87f2f5183dfb 345 * @{
Kojto 115:87f2f5183dfb 346 */
Kojto 115:87f2f5183dfb 347 #define RCC_UART4CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 348 #define RCC_UART4CLKSOURCE_SYSCLK RCC_DCKCFGR2_UART4SEL_0
Kojto 115:87f2f5183dfb 349 #define RCC_UART4CLKSOURCE_HSI RCC_DCKCFGR2_UART4SEL_1
Kojto 115:87f2f5183dfb 350 #define RCC_UART4CLKSOURCE_LSE RCC_DCKCFGR2_UART4SEL
Kojto 115:87f2f5183dfb 351 /**
Kojto 115:87f2f5183dfb 352 * @}
Kojto 115:87f2f5183dfb 353 */
Kojto 115:87f2f5183dfb 354
Kojto 115:87f2f5183dfb 355 /** @defgroup RCCEx_UART5_Clock_Source RCCEx UART5 Clock Source
Kojto 115:87f2f5183dfb 356 * @{
Kojto 115:87f2f5183dfb 357 */
Kojto 115:87f2f5183dfb 358 #define RCC_UART5CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 359 #define RCC_UART5CLKSOURCE_SYSCLK RCC_DCKCFGR2_UART5SEL_0
Kojto 115:87f2f5183dfb 360 #define RCC_UART5CLKSOURCE_HSI RCC_DCKCFGR2_UART5SEL_1
Kojto 115:87f2f5183dfb 361 #define RCC_UART5CLKSOURCE_LSE RCC_DCKCFGR2_UART5SEL
Kojto 115:87f2f5183dfb 362 /**
Kojto 115:87f2f5183dfb 363 * @}
Kojto 115:87f2f5183dfb 364 */
Kojto 115:87f2f5183dfb 365
Kojto 115:87f2f5183dfb 366 /** @defgroup RCCEx_USART6_Clock_Source RCCEx USART6 Clock Source
Kojto 115:87f2f5183dfb 367 * @{
Kojto 115:87f2f5183dfb 368 */
Kojto 115:87f2f5183dfb 369 #define RCC_USART6CLKSOURCE_PCLK2 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 370 #define RCC_USART6CLKSOURCE_SYSCLK RCC_DCKCFGR2_USART6SEL_0
Kojto 115:87f2f5183dfb 371 #define RCC_USART6CLKSOURCE_HSI RCC_DCKCFGR2_USART6SEL_1
Kojto 115:87f2f5183dfb 372 #define RCC_USART6CLKSOURCE_LSE RCC_DCKCFGR2_USART6SEL
Kojto 115:87f2f5183dfb 373 /**
Kojto 115:87f2f5183dfb 374 * @}
Kojto 115:87f2f5183dfb 375 */
Kojto 115:87f2f5183dfb 376
Kojto 115:87f2f5183dfb 377 /** @defgroup RCCEx_UART7_Clock_Source RCCEx UART7 Clock Source
Kojto 115:87f2f5183dfb 378 * @{
Kojto 115:87f2f5183dfb 379 */
Kojto 115:87f2f5183dfb 380 #define RCC_UART7CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 381 #define RCC_UART7CLKSOURCE_SYSCLK RCC_DCKCFGR2_UART7SEL_0
Kojto 115:87f2f5183dfb 382 #define RCC_UART7CLKSOURCE_HSI RCC_DCKCFGR2_UART7SEL_1
Kojto 115:87f2f5183dfb 383 #define RCC_UART7CLKSOURCE_LSE RCC_DCKCFGR2_UART7SEL
Kojto 115:87f2f5183dfb 384 /**
Kojto 115:87f2f5183dfb 385 * @}
Kojto 115:87f2f5183dfb 386 */
Kojto 115:87f2f5183dfb 387
Kojto 115:87f2f5183dfb 388 /** @defgroup RCCEx_UART8_Clock_Source RCCEx UART8 Clock Source
Kojto 115:87f2f5183dfb 389 * @{
Kojto 115:87f2f5183dfb 390 */
Kojto 115:87f2f5183dfb 391 #define RCC_UART8CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 392 #define RCC_UART8CLKSOURCE_SYSCLK RCC_DCKCFGR2_UART8SEL_0
Kojto 115:87f2f5183dfb 393 #define RCC_UART8CLKSOURCE_HSI RCC_DCKCFGR2_UART8SEL_1
Kojto 115:87f2f5183dfb 394 #define RCC_UART8CLKSOURCE_LSE RCC_DCKCFGR2_UART8SEL
Kojto 115:87f2f5183dfb 395 /**
Kojto 115:87f2f5183dfb 396 * @}
Kojto 115:87f2f5183dfb 397 */
Kojto 115:87f2f5183dfb 398
Kojto 115:87f2f5183dfb 399 /** @defgroup RCCEx_I2C1_Clock_Source RCCEx I2C1 Clock Source
Kojto 115:87f2f5183dfb 400 * @{
Kojto 115:87f2f5183dfb 401 */
Kojto 115:87f2f5183dfb 402 #define RCC_I2C1CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 403 #define RCC_I2C1CLKSOURCE_SYSCLK RCC_DCKCFGR2_I2C1SEL_0
Kojto 115:87f2f5183dfb 404 #define RCC_I2C1CLKSOURCE_HSI RCC_DCKCFGR2_I2C1SEL_1
Kojto 115:87f2f5183dfb 405 /**
Kojto 115:87f2f5183dfb 406 * @}
Kojto 115:87f2f5183dfb 407 */
Kojto 115:87f2f5183dfb 408
Kojto 115:87f2f5183dfb 409 /** @defgroup RCCEx_I2C2_Clock_Source RCCEx I2C2 Clock Source
Kojto 115:87f2f5183dfb 410 * @{
Kojto 115:87f2f5183dfb 411 */
Kojto 115:87f2f5183dfb 412 #define RCC_I2C2CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 413 #define RCC_I2C2CLKSOURCE_SYSCLK RCC_DCKCFGR2_I2C2SEL_0
Kojto 115:87f2f5183dfb 414 #define RCC_I2C2CLKSOURCE_HSI RCC_DCKCFGR2_I2C2SEL_1
Kojto 115:87f2f5183dfb 415
Kojto 115:87f2f5183dfb 416 /**
Kojto 115:87f2f5183dfb 417 * @}
Kojto 115:87f2f5183dfb 418 */
Kojto 115:87f2f5183dfb 419
Kojto 115:87f2f5183dfb 420 /** @defgroup RCCEx_I2C3_Clock_Source RCCEx I2C3 Clock Source
Kojto 115:87f2f5183dfb 421 * @{
Kojto 115:87f2f5183dfb 422 */
Kojto 115:87f2f5183dfb 423 #define RCC_I2C3CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 424 #define RCC_I2C3CLKSOURCE_SYSCLK RCC_DCKCFGR2_I2C3SEL_0
Kojto 115:87f2f5183dfb 425 #define RCC_I2C3CLKSOURCE_HSI RCC_DCKCFGR2_I2C3SEL_1
Kojto 115:87f2f5183dfb 426 /**
Kojto 115:87f2f5183dfb 427 * @}
Kojto 115:87f2f5183dfb 428 */
Kojto 115:87f2f5183dfb 429
Kojto 115:87f2f5183dfb 430 /** @defgroup RCCEx_I2C4_Clock_Source RCCEx I2C4 Clock Source
Kojto 115:87f2f5183dfb 431 * @{
Kojto 115:87f2f5183dfb 432 */
Kojto 115:87f2f5183dfb 433 #define RCC_I2C4CLKSOURCE_PCLK1 ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 434 #define RCC_I2C4CLKSOURCE_SYSCLK RCC_DCKCFGR2_I2C4SEL_0
Kojto 115:87f2f5183dfb 435 #define RCC_I2C4CLKSOURCE_HSI RCC_DCKCFGR2_I2C4SEL_1
Kojto 115:87f2f5183dfb 436 /**
Kojto 115:87f2f5183dfb 437 * @}
Kojto 115:87f2f5183dfb 438 */
Kojto 115:87f2f5183dfb 439
Kojto 115:87f2f5183dfb 440
Kojto 115:87f2f5183dfb 441 /** @defgroup RCCEx_LPTIM1_Clock_Source RCCEx LPTIM1 Clock Source
Kojto 115:87f2f5183dfb 442 * @{
Kojto 115:87f2f5183dfb 443 */
Kojto 115:87f2f5183dfb 444 #define RCC_LPTIM1CLKSOURCE_PCLK ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 445 #define RCC_LPTIM1CLKSOURCE_LSI RCC_DCKCFGR2_LPTIM1SEL_0
Kojto 115:87f2f5183dfb 446 #define RCC_LPTIM1CLKSOURCE_HSI RCC_DCKCFGR2_LPTIM1SEL_1
Kojto 115:87f2f5183dfb 447 #define RCC_LPTIM1CLKSOURCE_LSE RCC_DCKCFGR2_LPTIM1SEL
Kojto 115:87f2f5183dfb 448
Kojto 115:87f2f5183dfb 449 /**
Kojto 115:87f2f5183dfb 450 * @}
Kojto 115:87f2f5183dfb 451 */
Kojto 115:87f2f5183dfb 452
Kojto 115:87f2f5183dfb 453 /** @defgroup RCCEx_CLK48_Clock_Source RCCEx CLK48 Clock Source
Kojto 115:87f2f5183dfb 454 * @{
Kojto 115:87f2f5183dfb 455 */
Kojto 115:87f2f5183dfb 456 #define RCC_CLK48SOURCE_PLL ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 457 #define RCC_CLK48SOURCE_PLLSAIP RCC_DCKCFGR2_CK48MSEL
Kojto 115:87f2f5183dfb 458 /**
Kojto 115:87f2f5183dfb 459 * @}
Kojto 115:87f2f5183dfb 460 */
Kojto 115:87f2f5183dfb 461
Kojto 115:87f2f5183dfb 462 /** @defgroup RCCEx_TIM_Prescaler_Selection RCCEx TIM Prescaler Selection
Kojto 115:87f2f5183dfb 463 * @{
Kojto 115:87f2f5183dfb 464 */
Kojto 115:87f2f5183dfb 465 #define RCC_TIMPRES_DESACTIVATED ((uint32_t)0x00000000)
Kojto 115:87f2f5183dfb 466 #define RCC_TIMPRES_ACTIVATED RCC_DCKCFGR1_TIMPRE
Kojto 115:87f2f5183dfb 467
Kojto 115:87f2f5183dfb 468
Kojto 115:87f2f5183dfb 469 /**
Kojto 115:87f2f5183dfb 470 * @}
Kojto 115:87f2f5183dfb 471 */
Kojto 115:87f2f5183dfb 472
Kojto 115:87f2f5183dfb 473 /**
Kojto 115:87f2f5183dfb 474 * @}
Kojto 115:87f2f5183dfb 475 */
Kojto 115:87f2f5183dfb 476
Kojto 115:87f2f5183dfb 477 /* Exported macro ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 478 /** @defgroup RCCEx_Exported_Macros RCCEx Exported Macros
Kojto 115:87f2f5183dfb 479 * @{
Kojto 115:87f2f5183dfb 480 */
Kojto 115:87f2f5183dfb 481 /** @defgroup RCCEx_Peripheral_Clock_Enable_Disable RCCEx_Peripheral_Clock_Enable_Disable
Kojto 115:87f2f5183dfb 482 * @brief Enables or disables the AHB/APB peripheral clock.
Kojto 115:87f2f5183dfb 483 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 484 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 485 * using it.
Kojto 115:87f2f5183dfb 486 * @{
Kojto 115:87f2f5183dfb 487 */
Kojto 115:87f2f5183dfb 488
Kojto 115:87f2f5183dfb 489 /** @brief Enables or disables the AHB1 peripheral clock.
Kojto 115:87f2f5183dfb 490 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 491 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 492 * using it.
Kojto 115:87f2f5183dfb 493 */
Kojto 115:87f2f5183dfb 494 #define __HAL_RCC_BKPSRAM_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 495 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 496 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_BKPSRAMEN);\
Kojto 115:87f2f5183dfb 497 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 498 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_BKPSRAMEN);\
Kojto 115:87f2f5183dfb 499 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 500 } while(0)
Kojto 115:87f2f5183dfb 501
Kojto 115:87f2f5183dfb 502 #define __HAL_RCC_DTCMRAMEN_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 503 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 504 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DTCMRAMEN);\
Kojto 115:87f2f5183dfb 505 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 506 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DTCMRAMEN);\
Kojto 115:87f2f5183dfb 507 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 508 } while(0)
Kojto 115:87f2f5183dfb 509
Kojto 115:87f2f5183dfb 510 #define __HAL_RCC_DMA2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 511 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 512 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2EN);\
Kojto 115:87f2f5183dfb 513 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 514 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2EN);\
Kojto 115:87f2f5183dfb 515 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 516 } while(0)
Kojto 115:87f2f5183dfb 517
Kojto 115:87f2f5183dfb 518 #define __HAL_RCC_DMA2D_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 519 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 520 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2DEN);\
Kojto 115:87f2f5183dfb 521 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 522 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2DEN);\
Kojto 115:87f2f5183dfb 523 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 524 } while(0)
Kojto 115:87f2f5183dfb 525
Kojto 115:87f2f5183dfb 526 #define __HAL_RCC_USB_OTG_HS_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 527 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 528 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSEN);\
Kojto 115:87f2f5183dfb 529 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 530 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSEN);\
Kojto 115:87f2f5183dfb 531 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 532 } while(0)
Kojto 115:87f2f5183dfb 533
Kojto 115:87f2f5183dfb 534 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 535 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 536 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSULPIEN);\
Kojto 115:87f2f5183dfb 537 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 538 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSULPIEN);\
Kojto 115:87f2f5183dfb 539 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 540 } while(0)
Kojto 115:87f2f5183dfb 541
Kojto 115:87f2f5183dfb 542 #define __HAL_RCC_GPIOA_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 543 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 544 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOAEN);\
Kojto 115:87f2f5183dfb 545 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 546 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOAEN);\
Kojto 115:87f2f5183dfb 547 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 548 } while(0)
Kojto 115:87f2f5183dfb 549
Kojto 115:87f2f5183dfb 550 #define __HAL_RCC_GPIOB_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 551 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 552 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOBEN);\
Kojto 115:87f2f5183dfb 553 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 554 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOBEN);\
Kojto 115:87f2f5183dfb 555 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 556 } while(0)
Kojto 115:87f2f5183dfb 557
Kojto 115:87f2f5183dfb 558 #define __HAL_RCC_GPIOC_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 559 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 560 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);\
Kojto 115:87f2f5183dfb 561 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 562 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);\
Kojto 115:87f2f5183dfb 563 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 564 } while(0)
Kojto 115:87f2f5183dfb 565
Kojto 115:87f2f5183dfb 566 #define __HAL_RCC_GPIOD_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 567 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 568 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);\
Kojto 115:87f2f5183dfb 569 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 570 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);\
Kojto 115:87f2f5183dfb 571 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 572 } while(0)
Kojto 115:87f2f5183dfb 573
Kojto 115:87f2f5183dfb 574 #define __HAL_RCC_GPIOE_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 575 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 576 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOEEN);\
Kojto 115:87f2f5183dfb 577 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 578 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOEEN);\
Kojto 115:87f2f5183dfb 579 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 580 } while(0)
Kojto 115:87f2f5183dfb 581
Kojto 115:87f2f5183dfb 582 #define __HAL_RCC_GPIOF_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 583 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 584 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOFEN);\
Kojto 115:87f2f5183dfb 585 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 586 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOFEN);\
Kojto 115:87f2f5183dfb 587 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 588 } while(0)
Kojto 115:87f2f5183dfb 589
Kojto 115:87f2f5183dfb 590 #define __HAL_RCC_GPIOG_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 591 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 592 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOGEN);\
Kojto 115:87f2f5183dfb 593 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 594 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOGEN);\
Kojto 115:87f2f5183dfb 595 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 596 } while(0)
Kojto 115:87f2f5183dfb 597
Kojto 115:87f2f5183dfb 598 #define __HAL_RCC_GPIOH_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 599 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 600 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOHEN);\
Kojto 115:87f2f5183dfb 601 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 602 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOHEN);\
Kojto 115:87f2f5183dfb 603 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 604 } while(0)
Kojto 115:87f2f5183dfb 605
Kojto 115:87f2f5183dfb 606 #define __HAL_RCC_GPIOI_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 607 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 608 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOIEN);\
Kojto 115:87f2f5183dfb 609 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 610 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOIEN);\
Kojto 115:87f2f5183dfb 611 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 612 } while(0)
Kojto 115:87f2f5183dfb 613
Kojto 115:87f2f5183dfb 614 #define __HAL_RCC_GPIOJ_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 615 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 616 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOJEN);\
Kojto 115:87f2f5183dfb 617 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 618 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOJEN);\
Kojto 115:87f2f5183dfb 619 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 620 } while(0)
Kojto 115:87f2f5183dfb 621
Kojto 115:87f2f5183dfb 622 #define __HAL_RCC_GPIOK_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 623 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 624 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOKEN);\
Kojto 115:87f2f5183dfb 625 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 626 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOKEN);\
Kojto 115:87f2f5183dfb 627 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 628 } while(0)
Kojto 115:87f2f5183dfb 629
Kojto 115:87f2f5183dfb 630 #define __HAL_RCC_BKPSRAM_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_BKPSRAMEN))
Kojto 115:87f2f5183dfb 631 #define __HAL_RCC_DTCMRAMEN_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DTCMRAMEN))
Kojto 115:87f2f5183dfb 632 #define __HAL_RCC_DMA2_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA2EN))
Kojto 115:87f2f5183dfb 633 #define __HAL_RCC_DMA2D_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA2DEN))
Kojto 115:87f2f5183dfb 634 #define __HAL_RCC_USB_OTG_HS_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSEN))
Kojto 115:87f2f5183dfb 635 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSULPIEN))
Kojto 115:87f2f5183dfb 636 #define __HAL_RCC_GPIOA_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOAEN))
Kojto 115:87f2f5183dfb 637 #define __HAL_RCC_GPIOB_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOBEN))
Kojto 115:87f2f5183dfb 638 #define __HAL_RCC_GPIOC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOCEN))
Kojto 115:87f2f5183dfb 639 #define __HAL_RCC_GPIOD_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIODEN))
Kojto 115:87f2f5183dfb 640 #define __HAL_RCC_GPIOE_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOEEN))
Kojto 115:87f2f5183dfb 641 #define __HAL_RCC_GPIOF_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOFEN))
Kojto 115:87f2f5183dfb 642 #define __HAL_RCC_GPIOG_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOGEN))
Kojto 115:87f2f5183dfb 643 #define __HAL_RCC_GPIOH_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOHEN))
Kojto 115:87f2f5183dfb 644 #define __HAL_RCC_GPIOI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOIEN))
Kojto 115:87f2f5183dfb 645 #define __HAL_RCC_GPIOJ_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOJEN))
Kojto 115:87f2f5183dfb 646 #define __HAL_RCC_GPIOK_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOKEN))
Kojto 115:87f2f5183dfb 647 /**
Kojto 115:87f2f5183dfb 648 * @brief Enable ETHERNET clock.
Kojto 115:87f2f5183dfb 649 */
Kojto 115:87f2f5183dfb 650 #define __HAL_RCC_ETHMAC_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 651 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 652 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACEN);\
Kojto 115:87f2f5183dfb 653 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 654 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACEN);\
Kojto 115:87f2f5183dfb 655 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 656 } while(0)
Kojto 115:87f2f5183dfb 657
Kojto 115:87f2f5183dfb 658 #define __HAL_RCC_ETHMACTX_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 659 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 660 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACTXEN);\
Kojto 115:87f2f5183dfb 661 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 662 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACTXEN);\
Kojto 115:87f2f5183dfb 663 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 664 } while(0)
Kojto 115:87f2f5183dfb 665
Kojto 115:87f2f5183dfb 666 #define __HAL_RCC_ETHMACRX_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 667 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 668 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACRXEN);\
Kojto 115:87f2f5183dfb 669 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 670 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACRXEN);\
Kojto 115:87f2f5183dfb 671 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 672 } while(0)
Kojto 115:87f2f5183dfb 673
Kojto 115:87f2f5183dfb 674 #define __HAL_RCC_ETHMACPTP_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 675 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 676 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACPTPEN);\
Kojto 115:87f2f5183dfb 677 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 678 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACPTPEN);\
Kojto 115:87f2f5183dfb 679 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 680 } while(0)
Kojto 115:87f2f5183dfb 681
Kojto 115:87f2f5183dfb 682 #define __HAL_RCC_ETH_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 683 __HAL_RCC_ETHMAC_CLK_ENABLE(); \
Kojto 115:87f2f5183dfb 684 __HAL_RCC_ETHMACTX_CLK_ENABLE(); \
Kojto 115:87f2f5183dfb 685 __HAL_RCC_ETHMACRX_CLK_ENABLE(); \
Kojto 115:87f2f5183dfb 686 } while(0)
Kojto 115:87f2f5183dfb 687 /**
Kojto 115:87f2f5183dfb 688 * @brief Disable ETHERNET clock.
Kojto 115:87f2f5183dfb 689 */
Kojto 115:87f2f5183dfb 690 #define __HAL_RCC_ETHMAC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACEN))
Kojto 115:87f2f5183dfb 691 #define __HAL_RCC_ETHMACTX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACTXEN))
Kojto 115:87f2f5183dfb 692 #define __HAL_RCC_ETHMACRX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACRXEN))
Kojto 115:87f2f5183dfb 693 #define __HAL_RCC_ETHMACPTP_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACPTPEN))
Kojto 115:87f2f5183dfb 694 #define __HAL_RCC_ETH_CLK_DISABLE() do { \
Kojto 115:87f2f5183dfb 695 __HAL_RCC_ETHMACTX_CLK_DISABLE(); \
Kojto 115:87f2f5183dfb 696 __HAL_RCC_ETHMACRX_CLK_DISABLE(); \
Kojto 115:87f2f5183dfb 697 __HAL_RCC_ETHMAC_CLK_DISABLE(); \
Kojto 115:87f2f5183dfb 698 } while(0)
Kojto 115:87f2f5183dfb 699
Kojto 115:87f2f5183dfb 700 /** @brief Enable or disable the AHB2 peripheral clock.
Kojto 115:87f2f5183dfb 701 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 702 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 703 * using it.
Kojto 115:87f2f5183dfb 704 */
Kojto 115:87f2f5183dfb 705 #define __HAL_RCC_DCMI_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 706 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 707 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\
Kojto 115:87f2f5183dfb 708 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 709 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\
Kojto 115:87f2f5183dfb 710 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 711 } while(0)
Kojto 115:87f2f5183dfb 712
Kojto 115:87f2f5183dfb 713 #define __HAL_RCC_RNG_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 714 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 715 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\
Kojto 115:87f2f5183dfb 716 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 717 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\
Kojto 115:87f2f5183dfb 718 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 719 } while(0)
Kojto 115:87f2f5183dfb 720
Kojto 115:87f2f5183dfb 721 #define __HAL_RCC_USB_OTG_FS_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 722 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 723 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_OTGFSEN);\
Kojto 115:87f2f5183dfb 724 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 725 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_OTGFSEN);\
Kojto 115:87f2f5183dfb 726 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 727 __HAL_RCC_SYSCFG_CLK_ENABLE();\
Kojto 115:87f2f5183dfb 728 } while(0)
Kojto 115:87f2f5183dfb 729
Kojto 115:87f2f5183dfb 730 #define __HAL_RCC_DCMI_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_DCMIEN))
Kojto 115:87f2f5183dfb 731 #define __HAL_RCC_RNG_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_RNGEN))
Kojto 115:87f2f5183dfb 732
Kojto 115:87f2f5183dfb 733 #define __HAL_RCC_USB_OTG_FS_CLK_DISABLE() do { (RCC->AHB2ENR &= ~(RCC_AHB2ENR_OTGFSEN));\
Kojto 115:87f2f5183dfb 734 __HAL_RCC_SYSCFG_CLK_DISABLE();\
Kojto 115:87f2f5183dfb 735 }while(0)
Kojto 115:87f2f5183dfb 736 #if defined(STM32F756xx)
Kojto 115:87f2f5183dfb 737 #define __HAL_RCC_CRYP_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 738 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 739 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\
Kojto 115:87f2f5183dfb 740 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 741 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\
Kojto 115:87f2f5183dfb 742 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 743 } while(0)
Kojto 115:87f2f5183dfb 744
Kojto 115:87f2f5183dfb 745 #define __HAL_RCC_HASH_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 746 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 747 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\
Kojto 115:87f2f5183dfb 748 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 749 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\
Kojto 115:87f2f5183dfb 750 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 751 } while(0)
Kojto 115:87f2f5183dfb 752
Kojto 115:87f2f5183dfb 753 #define __HAL_RCC_CRYP_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_CRYPEN))
Kojto 115:87f2f5183dfb 754 #define __HAL_RCC_HASH_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_HASHEN))
Kojto 115:87f2f5183dfb 755 #endif /* STM32F756x */
Kojto 115:87f2f5183dfb 756 /** @brief Enables or disables the AHB3 peripheral clock.
Kojto 115:87f2f5183dfb 757 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 758 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 759 * using it.
Kojto 115:87f2f5183dfb 760 */
Kojto 115:87f2f5183dfb 761 #define __HAL_RCC_FMC_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 762 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 763 SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);\
Kojto 115:87f2f5183dfb 764 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 765 tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);\
Kojto 115:87f2f5183dfb 766 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 767 } while(0)
Kojto 115:87f2f5183dfb 768
Kojto 115:87f2f5183dfb 769 #define __HAL_RCC_QSPI_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 770 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 771 SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_QSPIEN);\
Kojto 115:87f2f5183dfb 772 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 773 tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_QSPIEN);\
Kojto 115:87f2f5183dfb 774 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 775 } while(0)
Kojto 115:87f2f5183dfb 776
Kojto 115:87f2f5183dfb 777 #define __HAL_RCC_FMC_CLK_DISABLE() (RCC->AHB3ENR &= ~(RCC_AHB3ENR_FMCEN))
Kojto 115:87f2f5183dfb 778 #define __HAL_RCC_QSPI_CLK_DISABLE() (RCC->AHB3ENR &= ~(RCC_AHB3ENR_QSPIEN))
Kojto 115:87f2f5183dfb 779
Kojto 115:87f2f5183dfb 780 /** @brief Enable or disable the Low Speed APB (APB1) peripheral clock.
Kojto 115:87f2f5183dfb 781 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 782 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 783 * using it.
Kojto 115:87f2f5183dfb 784 */
Kojto 115:87f2f5183dfb 785 #define __HAL_RCC_TIM2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 786 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 787 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM2EN);\
Kojto 115:87f2f5183dfb 788 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 789 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM2EN);\
Kojto 115:87f2f5183dfb 790 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 791 } while(0)
Kojto 115:87f2f5183dfb 792
Kojto 115:87f2f5183dfb 793 #define __HAL_RCC_TIM3_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 794 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 795 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM3EN);\
Kojto 115:87f2f5183dfb 796 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 797 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM3EN);\
Kojto 115:87f2f5183dfb 798 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 799 } while(0)
Kojto 115:87f2f5183dfb 800
Kojto 115:87f2f5183dfb 801 #define __HAL_RCC_TIM4_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 802 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 803 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM4EN);\
Kojto 115:87f2f5183dfb 804 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 805 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM4EN);\
Kojto 115:87f2f5183dfb 806 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 807 } while(0)
Kojto 115:87f2f5183dfb 808
Kojto 115:87f2f5183dfb 809 #define __HAL_RCC_TIM5_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 810 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 811 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM5EN);\
Kojto 115:87f2f5183dfb 812 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 813 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM5EN);\
Kojto 115:87f2f5183dfb 814 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 815 } while(0)
Kojto 115:87f2f5183dfb 816
Kojto 115:87f2f5183dfb 817 #define __HAL_RCC_TIM6_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 818 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 819 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM6EN);\
Kojto 115:87f2f5183dfb 820 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 821 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM6EN);\
Kojto 115:87f2f5183dfb 822 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 823 } while(0)
Kojto 115:87f2f5183dfb 824
Kojto 115:87f2f5183dfb 825 #define __HAL_RCC_TIM7_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 826 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 827 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM7EN);\
Kojto 115:87f2f5183dfb 828 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 829 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM7EN);\
Kojto 115:87f2f5183dfb 830 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 831 } while(0)
Kojto 115:87f2f5183dfb 832
Kojto 115:87f2f5183dfb 833 #define __HAL_RCC_TIM12_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 834 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 835 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM12EN);\
Kojto 115:87f2f5183dfb 836 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 837 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM12EN);\
Kojto 115:87f2f5183dfb 838 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 839 } while(0)
Kojto 115:87f2f5183dfb 840
Kojto 115:87f2f5183dfb 841 #define __HAL_RCC_TIM13_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 842 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 843 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM13EN);\
Kojto 115:87f2f5183dfb 844 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 845 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM13EN);\
Kojto 115:87f2f5183dfb 846 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 847 } while(0)
Kojto 115:87f2f5183dfb 848
Kojto 115:87f2f5183dfb 849 #define __HAL_RCC_TIM14_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 850 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 851 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM14EN);\
Kojto 115:87f2f5183dfb 852 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 853 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM14EN);\
Kojto 115:87f2f5183dfb 854 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 855 } while(0)
Kojto 115:87f2f5183dfb 856
Kojto 115:87f2f5183dfb 857 #define __HAL_RCC_LPTIM1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 858 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 859 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_LPTIM1EN);\
Kojto 115:87f2f5183dfb 860 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 861 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_LPTIM1EN);\
Kojto 115:87f2f5183dfb 862 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 863 } while(0)
Kojto 115:87f2f5183dfb 864
Kojto 115:87f2f5183dfb 865 #define __HAL_RCC_SPI2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 866 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 867 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI2EN);\
Kojto 115:87f2f5183dfb 868 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 869 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI2EN);\
Kojto 115:87f2f5183dfb 870 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 871 } while(0)
Kojto 115:87f2f5183dfb 872
Kojto 115:87f2f5183dfb 873 #define __HAL_RCC_SPI3_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 874 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 875 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI3EN);\
Kojto 115:87f2f5183dfb 876 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 877 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI3EN);\
Kojto 115:87f2f5183dfb 878 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 879 } while(0)
Kojto 115:87f2f5183dfb 880
Kojto 115:87f2f5183dfb 881 #define __HAL_RCC_SPDIFRX_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 882 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 883 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_SPDIFRXEN);\
Kojto 115:87f2f5183dfb 884 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 885 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_SPDIFRXEN);\
Kojto 115:87f2f5183dfb 886 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 887 } while(0)
Kojto 115:87f2f5183dfb 888
Kojto 115:87f2f5183dfb 889 #define __HAL_RCC_USART2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 890 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 891 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_USART2EN);\
Kojto 115:87f2f5183dfb 892 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 893 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_USART2EN);\
Kojto 115:87f2f5183dfb 894 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 895 } while(0)
Kojto 115:87f2f5183dfb 896
Kojto 115:87f2f5183dfb 897 #define __HAL_RCC_USART3_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 898 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 899 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_USART3EN);\
Kojto 115:87f2f5183dfb 900 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 901 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_USART3EN);\
Kojto 115:87f2f5183dfb 902 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 903 } while(0)
Kojto 115:87f2f5183dfb 904
Kojto 115:87f2f5183dfb 905 #define __HAL_RCC_UART4_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 906 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 907 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART4EN);\
Kojto 115:87f2f5183dfb 908 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 909 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART4EN);\
Kojto 115:87f2f5183dfb 910 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 911 } while(0)
Kojto 115:87f2f5183dfb 912
Kojto 115:87f2f5183dfb 913 #define __HAL_RCC_UART5_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 914 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 915 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART5EN);\
Kojto 115:87f2f5183dfb 916 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 917 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART5EN);\
Kojto 115:87f2f5183dfb 918 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 919 } while(0)
Kojto 115:87f2f5183dfb 920
Kojto 115:87f2f5183dfb 921 #define __HAL_RCC_I2C1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 922 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 923 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C1EN);\
Kojto 115:87f2f5183dfb 924 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 925 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C1EN);\
Kojto 115:87f2f5183dfb 926 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 927 } while(0)
Kojto 115:87f2f5183dfb 928
Kojto 115:87f2f5183dfb 929 #define __HAL_RCC_I2C2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 930 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 931 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C2EN);\
Kojto 115:87f2f5183dfb 932 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 933 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C2EN);\
Kojto 115:87f2f5183dfb 934 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 935 } while(0)
Kojto 115:87f2f5183dfb 936
Kojto 115:87f2f5183dfb 937 #define __HAL_RCC_I2C3_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 938 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 939 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C3EN);\
Kojto 115:87f2f5183dfb 940 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 941 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C3EN);\
Kojto 115:87f2f5183dfb 942 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 943 } while(0)
Kojto 115:87f2f5183dfb 944
Kojto 115:87f2f5183dfb 945 #define __HAL_RCC_I2C4_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 946 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 947 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C4EN);\
Kojto 115:87f2f5183dfb 948 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 949 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C4EN);\
Kojto 115:87f2f5183dfb 950 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 951 } while(0)
Kojto 115:87f2f5183dfb 952
Kojto 115:87f2f5183dfb 953 #define __HAL_RCC_CAN1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 954 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 955 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN1EN);\
Kojto 115:87f2f5183dfb 956 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 957 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN1EN);\
Kojto 115:87f2f5183dfb 958 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 959 } while(0)
Kojto 115:87f2f5183dfb 960
Kojto 115:87f2f5183dfb 961 #define __HAL_RCC_CAN2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 962 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 963 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN2EN);\
Kojto 115:87f2f5183dfb 964 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 965 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN2EN);\
Kojto 115:87f2f5183dfb 966 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 967 } while(0)
Kojto 115:87f2f5183dfb 968
Kojto 115:87f2f5183dfb 969 #define __HAL_RCC_CEC_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 970 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 971 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CECEN);\
Kojto 115:87f2f5183dfb 972 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 973 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CECEN);\
Kojto 115:87f2f5183dfb 974 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 975 } while(0)
Kojto 115:87f2f5183dfb 976
Kojto 115:87f2f5183dfb 977 #define __HAL_RCC_DAC_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 978 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 979 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_DACEN);\
Kojto 115:87f2f5183dfb 980 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 981 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_DACEN);\
Kojto 115:87f2f5183dfb 982 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 983 } while(0)
Kojto 115:87f2f5183dfb 984
Kojto 115:87f2f5183dfb 985 #define __HAL_RCC_UART7_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 986 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 987 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART7EN);\
Kojto 115:87f2f5183dfb 988 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 989 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART7EN);\
Kojto 115:87f2f5183dfb 990 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 991 } while(0)
Kojto 115:87f2f5183dfb 992
Kojto 115:87f2f5183dfb 993 #define __HAL_RCC_UART8_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 994 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 995 SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART8EN);\
Kojto 115:87f2f5183dfb 996 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 997 tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART8EN);\
Kojto 115:87f2f5183dfb 998 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 999 } while(0)
Kojto 115:87f2f5183dfb 1000
Kojto 115:87f2f5183dfb 1001 #define __HAL_RCC_TIM2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM2EN))
Kojto 115:87f2f5183dfb 1002 #define __HAL_RCC_TIM3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM3EN))
Kojto 115:87f2f5183dfb 1003 #define __HAL_RCC_TIM4_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM4EN))
Kojto 115:87f2f5183dfb 1004 #define __HAL_RCC_TIM5_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM5EN))
Kojto 115:87f2f5183dfb 1005 #define __HAL_RCC_TIM6_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM6EN))
Kojto 115:87f2f5183dfb 1006 #define __HAL_RCC_TIM7_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM7EN))
Kojto 115:87f2f5183dfb 1007 #define __HAL_RCC_TIM12_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM12EN))
Kojto 115:87f2f5183dfb 1008 #define __HAL_RCC_TIM13_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM13EN))
Kojto 115:87f2f5183dfb 1009 #define __HAL_RCC_TIM14_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM14EN))
Kojto 115:87f2f5183dfb 1010 #define __HAL_RCC_LPTIM1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_LPTIM1EN))
Kojto 115:87f2f5183dfb 1011 #define __HAL_RCC_SPI2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_SPI2EN))
Kojto 115:87f2f5183dfb 1012 #define __HAL_RCC_SPI3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_SPI3EN))
Kojto 115:87f2f5183dfb 1013 #define __HAL_RCC_SPDIFRX_CLK_DISABLE()(RCC->APB1ENR &= ~(RCC_APB1ENR_SPDIFRXEN))
Kojto 115:87f2f5183dfb 1014 #define __HAL_RCC_USART2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART2EN))
Kojto 115:87f2f5183dfb 1015 #define __HAL_RCC_USART3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART3EN))
Kojto 115:87f2f5183dfb 1016 #define __HAL_RCC_UART4_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART4EN))
Kojto 115:87f2f5183dfb 1017 #define __HAL_RCC_UART5_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART5EN))
Kojto 115:87f2f5183dfb 1018 #define __HAL_RCC_I2C1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C1EN))
Kojto 115:87f2f5183dfb 1019 #define __HAL_RCC_I2C2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C2EN))
Kojto 115:87f2f5183dfb 1020 #define __HAL_RCC_I2C3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C3EN))
Kojto 115:87f2f5183dfb 1021 #define __HAL_RCC_I2C4_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C4EN))
Kojto 115:87f2f5183dfb 1022 #define __HAL_RCC_CAN1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN1EN))
Kojto 115:87f2f5183dfb 1023 #define __HAL_RCC_CAN2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN2EN))
Kojto 115:87f2f5183dfb 1024 #define __HAL_RCC_CEC_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CECEN))
Kojto 115:87f2f5183dfb 1025 #define __HAL_RCC_DAC_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_DACEN))
Kojto 115:87f2f5183dfb 1026 #define __HAL_RCC_UART7_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART7EN))
Kojto 115:87f2f5183dfb 1027 #define __HAL_RCC_UART8_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART8EN))
Kojto 115:87f2f5183dfb 1028
Kojto 115:87f2f5183dfb 1029 /** @brief Enable or disable the High Speed APB (APB2) peripheral clock.
Kojto 115:87f2f5183dfb 1030 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1031 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1032 * using it.
Kojto 115:87f2f5183dfb 1033 */
Kojto 115:87f2f5183dfb 1034 #define __HAL_RCC_TIM1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1035 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1036 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM1EN);\
Kojto 115:87f2f5183dfb 1037 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1038 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM1EN);\
Kojto 115:87f2f5183dfb 1039 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1040 } while(0)
Kojto 115:87f2f5183dfb 1041
Kojto 115:87f2f5183dfb 1042 #define __HAL_RCC_TIM8_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1043 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1044 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\
Kojto 115:87f2f5183dfb 1045 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1046 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\
Kojto 115:87f2f5183dfb 1047 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1048 } while(0)
Kojto 115:87f2f5183dfb 1049
Kojto 115:87f2f5183dfb 1050 #define __HAL_RCC_USART1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1051 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1052 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_USART1EN);\
Kojto 115:87f2f5183dfb 1053 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1054 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_USART1EN);\
Kojto 115:87f2f5183dfb 1055 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1056 } while(0)
Kojto 115:87f2f5183dfb 1057
Kojto 115:87f2f5183dfb 1058 #define __HAL_RCC_USART6_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1059 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1060 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_USART6EN);\
Kojto 115:87f2f5183dfb 1061 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1062 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_USART6EN);\
Kojto 115:87f2f5183dfb 1063 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1064 } while(0)
Kojto 115:87f2f5183dfb 1065
Kojto 115:87f2f5183dfb 1066 #define __HAL_RCC_ADC1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1067 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1068 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC1EN);\
Kojto 115:87f2f5183dfb 1069 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1070 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC1EN);\
Kojto 115:87f2f5183dfb 1071 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1072 } while(0)
Kojto 115:87f2f5183dfb 1073
Kojto 115:87f2f5183dfb 1074 #define __HAL_RCC_ADC2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1075 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1076 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC2EN);\
Kojto 115:87f2f5183dfb 1077 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1078 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC2EN);\
Kojto 115:87f2f5183dfb 1079 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1080 } while(0)
Kojto 115:87f2f5183dfb 1081
Kojto 115:87f2f5183dfb 1082 #define __HAL_RCC_ADC3_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1083 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1084 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC3EN);\
Kojto 115:87f2f5183dfb 1085 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1086 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC3EN);\
Kojto 115:87f2f5183dfb 1087 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1088 } while(0)
Kojto 115:87f2f5183dfb 1089
Kojto 115:87f2f5183dfb 1090 #define __HAL_RCC_SDMMC1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1091 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1092 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SDMMC1EN);\
Kojto 115:87f2f5183dfb 1093 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1094 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SDMMC1EN);\
Kojto 115:87f2f5183dfb 1095 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1096 } while(0)
Kojto 115:87f2f5183dfb 1097
Kojto 115:87f2f5183dfb 1098 #define __HAL_RCC_SPI1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1099 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1100 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI1EN);\
Kojto 115:87f2f5183dfb 1101 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1102 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI1EN);\
Kojto 115:87f2f5183dfb 1103 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1104 } while(0)
Kojto 115:87f2f5183dfb 1105
Kojto 115:87f2f5183dfb 1106 #define __HAL_RCC_SPI4_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1107 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1108 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI4EN);\
Kojto 115:87f2f5183dfb 1109 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1110 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI4EN);\
Kojto 115:87f2f5183dfb 1111 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1112 } while(0)
Kojto 115:87f2f5183dfb 1113
Kojto 115:87f2f5183dfb 1114 #define __HAL_RCC_TIM9_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1115 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1116 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM9EN);\
Kojto 115:87f2f5183dfb 1117 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1118 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM9EN);\
Kojto 115:87f2f5183dfb 1119 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1120 } while(0)
Kojto 115:87f2f5183dfb 1121
Kojto 115:87f2f5183dfb 1122 #define __HAL_RCC_TIM10_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1123 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1124 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM10EN);\
Kojto 115:87f2f5183dfb 1125 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1126 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM10EN);\
Kojto 115:87f2f5183dfb 1127 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1128 } while(0)
Kojto 115:87f2f5183dfb 1129
Kojto 115:87f2f5183dfb 1130 #define __HAL_RCC_TIM11_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1131 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1132 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM11EN);\
Kojto 115:87f2f5183dfb 1133 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1134 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM11EN);\
Kojto 115:87f2f5183dfb 1135 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1136 } while(0)
Kojto 115:87f2f5183dfb 1137
Kojto 115:87f2f5183dfb 1138 #define __HAL_RCC_SPI5_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1139 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1140 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI5EN);\
Kojto 115:87f2f5183dfb 1141 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1142 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI5EN);\
Kojto 115:87f2f5183dfb 1143 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1144 } while(0)
Kojto 115:87f2f5183dfb 1145
Kojto 115:87f2f5183dfb 1146 #define __HAL_RCC_SPI6_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1147 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1148 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI6EN);\
Kojto 115:87f2f5183dfb 1149 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1150 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI6EN);\
Kojto 115:87f2f5183dfb 1151 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1152 } while(0)
Kojto 115:87f2f5183dfb 1153
Kojto 115:87f2f5183dfb 1154 #define __HAL_RCC_SAI1_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1155 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1156 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI1EN);\
Kojto 115:87f2f5183dfb 1157 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1158 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI1EN);\
Kojto 115:87f2f5183dfb 1159 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1160 } while(0)
Kojto 115:87f2f5183dfb 1161
Kojto 115:87f2f5183dfb 1162 #define __HAL_RCC_SAI2_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1163 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1164 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\
Kojto 115:87f2f5183dfb 1165 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1166 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\
Kojto 115:87f2f5183dfb 1167 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1168 } while(0)
Kojto 115:87f2f5183dfb 1169
Kojto 115:87f2f5183dfb 1170 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1171 #define __HAL_RCC_LTDC_CLK_ENABLE() do { \
Kojto 115:87f2f5183dfb 1172 __IO uint32_t tmpreg; \
Kojto 115:87f2f5183dfb 1173 SET_BIT(RCC->APB2ENR, RCC_APB2ENR_LTDCEN);\
Kojto 115:87f2f5183dfb 1174 /* Delay after an RCC peripheral clock enabling */ \
Kojto 115:87f2f5183dfb 1175 tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_LTDCEN);\
Kojto 115:87f2f5183dfb 1176 UNUSED(tmpreg); \
Kojto 115:87f2f5183dfb 1177 } while(0)
Kojto 115:87f2f5183dfb 1178 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1179
Kojto 115:87f2f5183dfb 1180 #define __HAL_RCC_TIM1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM1EN))
Kojto 115:87f2f5183dfb 1181 #define __HAL_RCC_TIM8_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM8EN))
Kojto 115:87f2f5183dfb 1182 #define __HAL_RCC_USART1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_USART1EN))
Kojto 115:87f2f5183dfb 1183 #define __HAL_RCC_USART6_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_USART6EN))
Kojto 115:87f2f5183dfb 1184 #define __HAL_RCC_ADC1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC1EN))
Kojto 115:87f2f5183dfb 1185 #define __HAL_RCC_ADC2_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC2EN))
Kojto 115:87f2f5183dfb 1186 #define __HAL_RCC_ADC3_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC3EN))
Kojto 115:87f2f5183dfb 1187 #define __HAL_RCC_SDMMC1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SDMMC1EN))
Kojto 115:87f2f5183dfb 1188 #define __HAL_RCC_SPI1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI1EN))
Kojto 115:87f2f5183dfb 1189 #define __HAL_RCC_SPI4_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI4EN))
Kojto 115:87f2f5183dfb 1190 #define __HAL_RCC_TIM9_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM9EN))
Kojto 115:87f2f5183dfb 1191 #define __HAL_RCC_TIM10_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM10EN))
Kojto 115:87f2f5183dfb 1192 #define __HAL_RCC_TIM11_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM11EN))
Kojto 115:87f2f5183dfb 1193 #define __HAL_RCC_SPI5_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI5EN))
Kojto 115:87f2f5183dfb 1194 #define __HAL_RCC_SPI6_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI6EN))
Kojto 115:87f2f5183dfb 1195 #define __HAL_RCC_SAI1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SAI1EN))
Kojto 115:87f2f5183dfb 1196 #define __HAL_RCC_SAI2_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SAI2EN))
Kojto 115:87f2f5183dfb 1197 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1198 #define __HAL_RCC_LTDC_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_LTDCEN))
Kojto 115:87f2f5183dfb 1199 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1200 /**
Kojto 115:87f2f5183dfb 1201 * @}
Kojto 115:87f2f5183dfb 1202 */
Kojto 115:87f2f5183dfb 1203
Kojto 115:87f2f5183dfb 1204
Kojto 115:87f2f5183dfb 1205 /** @defgroup RCCEx_Peripheral_Clock_Enable_Disable_Status Peripheral Clock Enable Disable Status
Kojto 115:87f2f5183dfb 1206 * @brief Get the enable or disable status of the AHB/APB peripheral clock.
Kojto 115:87f2f5183dfb 1207 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1208 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1209 * using it.
Kojto 115:87f2f5183dfb 1210 * @{
Kojto 115:87f2f5183dfb 1211 */
Kojto 115:87f2f5183dfb 1212
Kojto 115:87f2f5183dfb 1213 /** @brief Get the enable or disable status of the AHB1 peripheral clock.
Kojto 115:87f2f5183dfb 1214 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1215 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1216 * using it.
Kojto 115:87f2f5183dfb 1217 */
Kojto 115:87f2f5183dfb 1218 #define __HAL_RCC_BKPSRAM_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_BKPSRAMEN)) != RESET)
Kojto 115:87f2f5183dfb 1219 #define __HAL_RCC_DTCMRAMEN_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_DTCMRAMEN)) != RESET)
Kojto 115:87f2f5183dfb 1220 #define __HAL_RCC_DMA2_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2EN)) != RESET)
Kojto 115:87f2f5183dfb 1221 #define __HAL_RCC_DMA2D_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2DEN)) != RESET)
Kojto 115:87f2f5183dfb 1222 #define __HAL_RCC_USB_OTG_HS_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSEN)) != RESET)
Kojto 115:87f2f5183dfb 1223 #define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSULPIEN)) != RESET)
Kojto 115:87f2f5183dfb 1224 #define __HAL_RCC_GPIOA_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOAEN)) != RESET)
Kojto 115:87f2f5183dfb 1225 #define __HAL_RCC_GPIOB_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOBEN)) != RESET)
Kojto 115:87f2f5183dfb 1226 #define __HAL_RCC_GPIOC_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOCEN)) != RESET)
Kojto 115:87f2f5183dfb 1227 #define __HAL_RCC_GPIOD_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIODEN)) != RESET)
Kojto 115:87f2f5183dfb 1228 #define __HAL_RCC_GPIOE_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOEEN)) != RESET)
Kojto 115:87f2f5183dfb 1229 #define __HAL_RCC_GPIOF_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOFEN)) != RESET)
Kojto 115:87f2f5183dfb 1230 #define __HAL_RCC_GPIOG_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOGEN)) != RESET)
Kojto 115:87f2f5183dfb 1231 #define __HAL_RCC_GPIOH_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOHEN)) != RESET)
Kojto 115:87f2f5183dfb 1232 #define __HAL_RCC_GPIOI_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOIEN)) != RESET)
Kojto 115:87f2f5183dfb 1233 #define __HAL_RCC_GPIOJ_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOJEN)) != RESET)
Kojto 115:87f2f5183dfb 1234 #define __HAL_RCC_GPIOK_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOKEN)) != RESET)
Kojto 115:87f2f5183dfb 1235
Kojto 115:87f2f5183dfb 1236 #define __HAL_RCC_BKPSRAM_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_BKPSRAMEN)) == RESET)
Kojto 115:87f2f5183dfb 1237 #define __HAL_RCC_DTCMRAMEN_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_DTCMRAMEN)) == RESET)
Kojto 115:87f2f5183dfb 1238 #define __HAL_RCC_DMA2_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2EN)) == RESET)
Kojto 115:87f2f5183dfb 1239 #define __HAL_RCC_DMA2D_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2DEN)) == RESET)
Kojto 115:87f2f5183dfb 1240 #define __HAL_RCC_USB_OTG_HS_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSEN)) == RESET)
Kojto 115:87f2f5183dfb 1241 #define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSULPIEN)) == RESET)
Kojto 115:87f2f5183dfb 1242 #define __HAL_RCC_GPIOA_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOAEN)) == RESET)
Kojto 115:87f2f5183dfb 1243 #define __HAL_RCC_GPIOB_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOBEN)) == RESET)
Kojto 115:87f2f5183dfb 1244 #define __HAL_RCC_GPIOC_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOCEN)) == RESET)
Kojto 115:87f2f5183dfb 1245 #define __HAL_RCC_GPIOD_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIODEN)) == RESET)
Kojto 115:87f2f5183dfb 1246 #define __HAL_RCC_GPIOE_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOEEN)) == RESET)
Kojto 115:87f2f5183dfb 1247 #define __HAL_RCC_GPIOF_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOFEN)) == RESET)
Kojto 115:87f2f5183dfb 1248 #define __HAL_RCC_GPIOG_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOGEN)) == RESET)
Kojto 115:87f2f5183dfb 1249 #define __HAL_RCC_GPIOH_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOHEN)) == RESET)
Kojto 115:87f2f5183dfb 1250 #define __HAL_RCC_GPIOI_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOIEN)) == RESET)
Kojto 115:87f2f5183dfb 1251 #define __HAL_RCC_GPIOJ_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOJEN)) == RESET)
Kojto 115:87f2f5183dfb 1252 #define __HAL_RCC_GPIOK_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOKEN)) == RESET)
Kojto 115:87f2f5183dfb 1253 /**
Kojto 115:87f2f5183dfb 1254 * @brief Enable ETHERNET clock.
Kojto 115:87f2f5183dfb 1255 */
Kojto 115:87f2f5183dfb 1256 #define __HAL_RCC_ETHMAC_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACEN)) != RESET)
Kojto 115:87f2f5183dfb 1257 #define __HAL_RCC_ETHMACTX_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACTXEN)) != RESET)
Kojto 115:87f2f5183dfb 1258 #define __HAL_RCC_ETHMACRX_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACRXEN)) != RESET)
Kojto 115:87f2f5183dfb 1259 #define __HAL_RCC_ETHMACPTP_IS_CLK_ENABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACPTPEN)) != RESET)
Kojto 115:87f2f5183dfb 1260 #define __HAL_RCC_ETH_IS_CLK_ENABLED() (__HAL_RCC_ETHMAC_IS_CLK_ENABLED() && \
Kojto 115:87f2f5183dfb 1261 __HAL_RCC_ETHMACTX_IS_CLK_ENABLED() && \
Kojto 115:87f2f5183dfb 1262 __HAL_RCC_ETHMACRX_IS_CLK_ENABLED())
Kojto 115:87f2f5183dfb 1263
Kojto 115:87f2f5183dfb 1264 /**
Kojto 115:87f2f5183dfb 1265 * @brief Disable ETHERNET clock.
Kojto 115:87f2f5183dfb 1266 */
Kojto 115:87f2f5183dfb 1267 #define __HAL_RCC_ETHMAC_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACEN)) == RESET)
Kojto 115:87f2f5183dfb 1268 #define __HAL_RCC_ETHMACTX_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACTXEN)) == RESET)
Kojto 115:87f2f5183dfb 1269 #define __HAL_RCC_ETHMACRX_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACRXEN)) == RESET)
Kojto 115:87f2f5183dfb 1270 #define __HAL_RCC_ETHMACPTP_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACPTPEN)) == RESET)
Kojto 115:87f2f5183dfb 1271 #define __HAL_RCC_ETH_IS_CLK_DISABLED() (__HAL_RCC_ETHMAC_IS_CLK_DISABLED() && \
Kojto 115:87f2f5183dfb 1272 __HAL_RCC_ETHMACTX_IS_CLK_DISABLED() && \
Kojto 115:87f2f5183dfb 1273 __HAL_RCC_ETHMACRX_IS_CLK_DISABLED())
Kojto 115:87f2f5183dfb 1274
Kojto 115:87f2f5183dfb 1275 /** @brief Get the enable or disable status of the AHB2 peripheral clock.
Kojto 115:87f2f5183dfb 1276 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1277 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1278 * using it.
Kojto 115:87f2f5183dfb 1279 */
Kojto 115:87f2f5183dfb 1280 #define __HAL_RCC_DCMI_IS_CLK_ENABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_DCMIEN)) != RESET)
Kojto 115:87f2f5183dfb 1281 #define __HAL_RCC_RNG_IS_CLK_ENABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_RNGEN)) != RESET)
Kojto 115:87f2f5183dfb 1282 #define __HAL_RCC_USB_OTG_FS_IS_CLK_ENABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_OTGFSEN)) != RESET)
Kojto 115:87f2f5183dfb 1283
Kojto 115:87f2f5183dfb 1284
Kojto 115:87f2f5183dfb 1285 #define __HAL_RCC_DCMI_IS_CLK_DISABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_DCMIEN)) == RESET)
Kojto 115:87f2f5183dfb 1286 #define __HAL_RCC_RNG_IS_CLK_DISABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_RNGEN)) == RESET)
Kojto 115:87f2f5183dfb 1287 #define __HAL_RCC_USB_IS_OTG_FS_CLK_DISABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_OTGFSEN)) == RESET)
Kojto 115:87f2f5183dfb 1288
Kojto 115:87f2f5183dfb 1289 #if defined(STM32F756xx)
Kojto 115:87f2f5183dfb 1290 #define __HAL_RCC_CRYP_IS_CLK_ENABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_CRYPEN)) != RESET)
Kojto 115:87f2f5183dfb 1291 #define __HAL_RCC_HASH_IS_CLK_ENABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_HASHEN)) != RESET)
Kojto 115:87f2f5183dfb 1292 #define __HAL_RCC_CRYP_IS_CLK_DISABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_CRYPEN)) == RESET)
Kojto 115:87f2f5183dfb 1293 #define __HAL_RCC_HASH_IS_CLK_DISABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_HASHEN)) == RESET)
Kojto 115:87f2f5183dfb 1294 #endif /* STM32F756x */
Kojto 115:87f2f5183dfb 1295
Kojto 115:87f2f5183dfb 1296 /** @brief Get the enable or disable status of the AHB3 peripheral clock.
Kojto 115:87f2f5183dfb 1297 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1298 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1299 * using it.
Kojto 115:87f2f5183dfb 1300 */
Kojto 115:87f2f5183dfb 1301 #define __HAL_RCC_FMC_IS_CLK_ENABLED() ((RCC->AHB3ENR & (RCC_AHB3ENR_FMCEN)) != RESET)
Kojto 115:87f2f5183dfb 1302 #define __HAL_RCC_QSPI_IS_CLK_ENABLED() ((RCC->AHB3ENR & (RCC_AHB3ENR_QSPIEN)) != RESET)
Kojto 115:87f2f5183dfb 1303
Kojto 115:87f2f5183dfb 1304 #define __HAL_RCC_FMC_IS_CLK_DISABLED() ((RCC->AHB3ENR & (RCC_AHB3ENR_FMCEN)) == RESET)
Kojto 115:87f2f5183dfb 1305 #define __HAL_RCC_QSPI_IS_CLK_DISABLED() ((RCC->AHB3ENR & (RCC_AHB3ENR_QSPIEN)) == RESET)
Kojto 115:87f2f5183dfb 1306
Kojto 115:87f2f5183dfb 1307 /** @brief Get the enable or disable status of the APB1 peripheral clock.
Kojto 115:87f2f5183dfb 1308 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1309 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1310 * using it.
Kojto 115:87f2f5183dfb 1311 */
Kojto 115:87f2f5183dfb 1312 #define __HAL_RCC_TIM2_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM2EN)) != RESET)
Kojto 115:87f2f5183dfb 1313 #define __HAL_RCC_TIM3_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM3EN)) != RESET)
Kojto 115:87f2f5183dfb 1314 #define __HAL_RCC_TIM4_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM4EN)) != RESET)
Kojto 115:87f2f5183dfb 1315 #define __HAL_RCC_TIM5_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM5EN)) != RESET)
Kojto 115:87f2f5183dfb 1316 #define __HAL_RCC_TIM6_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM6EN)) != RESET)
Kojto 115:87f2f5183dfb 1317 #define __HAL_RCC_TIM7_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM7EN)) != RESET)
Kojto 115:87f2f5183dfb 1318 #define __HAL_RCC_TIM12_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM12EN)) != RESET)
Kojto 115:87f2f5183dfb 1319 #define __HAL_RCC_TIM13_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM13EN)) != RESET)
Kojto 115:87f2f5183dfb 1320 #define __HAL_RCC_TIM14_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM14EN)) != RESET)
Kojto 115:87f2f5183dfb 1321 #define __HAL_RCC_LPTIM1_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_LPTIM1EN)) != RESET)
Kojto 115:87f2f5183dfb 1322 #define __HAL_RCC_SPI2_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_SPI2EN)) != RESET)
Kojto 115:87f2f5183dfb 1323 #define __HAL_RCC_SPI3_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_SPI3EN)) != RESET)
Kojto 115:87f2f5183dfb 1324 #define __HAL_RCC_SPDIFRX_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_SPDIFRXEN)) != RESET)
Kojto 115:87f2f5183dfb 1325 #define __HAL_RCC_USART2_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_USART2EN)) != RESET)
Kojto 115:87f2f5183dfb 1326 #define __HAL_RCC_USART3_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_USART3EN)) != RESET)
Kojto 115:87f2f5183dfb 1327 #define __HAL_RCC_UART4_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART4EN)) != RESET)
Kojto 115:87f2f5183dfb 1328 #define __HAL_RCC_UART5_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART5EN)) != RESET)
Kojto 115:87f2f5183dfb 1329 #define __HAL_RCC_I2C1_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C1EN)) != RESET)
Kojto 115:87f2f5183dfb 1330 #define __HAL_RCC_I2C2_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C2EN)) != RESET)
Kojto 115:87f2f5183dfb 1331 #define __HAL_RCC_I2C3_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C3EN)) != RESET)
Kojto 115:87f2f5183dfb 1332 #define __HAL_RCC_I2C4_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C4EN)) != RESET)
Kojto 115:87f2f5183dfb 1333 #define __HAL_RCC_CAN1_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_CAN1EN)) != RESET)
Kojto 115:87f2f5183dfb 1334 #define __HAL_RCC_CAN2_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_CAN2EN)) != RESET)
Kojto 115:87f2f5183dfb 1335 #define __HAL_RCC_CEC_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_CECEN)) != RESET)
Kojto 115:87f2f5183dfb 1336 #define __HAL_RCC_DAC_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_DACEN)) != RESET)
Kojto 115:87f2f5183dfb 1337 #define __HAL_RCC_UART7_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART7EN)) != RESET)
Kojto 115:87f2f5183dfb 1338 #define __HAL_RCC_UART8_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART8EN)) != RESET)
Kojto 115:87f2f5183dfb 1339
Kojto 115:87f2f5183dfb 1340 #define __HAL_RCC_TIM2_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM2EN)) == RESET)
Kojto 115:87f2f5183dfb 1341 #define __HAL_RCC_TIM3_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM3EN)) == RESET)
Kojto 115:87f2f5183dfb 1342 #define __HAL_RCC_TIM4_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM4EN)) == RESET)
Kojto 115:87f2f5183dfb 1343 #define __HAL_RCC_TIM5_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM5EN)) == RESET)
Kojto 115:87f2f5183dfb 1344 #define __HAL_RCC_TIM6_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM6EN)) == RESET)
Kojto 115:87f2f5183dfb 1345 #define __HAL_RCC_TIM7_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM7EN)) == RESET)
Kojto 115:87f2f5183dfb 1346 #define __HAL_RCC_TIM12_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM12EN)) == RESET)
Kojto 115:87f2f5183dfb 1347 #define __HAL_RCC_TIM13_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM13EN)) == RESET)
Kojto 115:87f2f5183dfb 1348 #define __HAL_RCC_TIM14_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_TIM14EN)) == RESET)
Kojto 115:87f2f5183dfb 1349 #define __HAL_RCC_LPTIM1_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_LPTIM1EN)) == RESET)
Kojto 115:87f2f5183dfb 1350 #define __HAL_RCC_SPI2_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_SPI2EN)) == RESET)
Kojto 115:87f2f5183dfb 1351 #define __HAL_RCC_SPI3_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_SPI3EN)) == RESET)
Kojto 115:87f2f5183dfb 1352 #define __HAL_RCC_SPDIFRX_IS_CLK_DISABLED()((RCC->APB1ENR & (RCC_APB1ENR_SPDIFRXEN)) == RESET)
Kojto 115:87f2f5183dfb 1353 #define __HAL_RCC_USART2_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_USART2EN)) == RESET)
Kojto 115:87f2f5183dfb 1354 #define __HAL_RCC_USART3_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_USART3EN)) == RESET)
Kojto 115:87f2f5183dfb 1355 #define __HAL_RCC_UART4_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART4EN)) == RESET)
Kojto 115:87f2f5183dfb 1356 #define __HAL_RCC_UART5_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART5EN)) == RESET)
Kojto 115:87f2f5183dfb 1357 #define __HAL_RCC_I2C1_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C1EN)) == RESET)
Kojto 115:87f2f5183dfb 1358 #define __HAL_RCC_I2C2_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C2EN)) == RESET)
Kojto 115:87f2f5183dfb 1359 #define __HAL_RCC_I2C3_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C3EN)) == RESET)
Kojto 115:87f2f5183dfb 1360 #define __HAL_RCC_I2C4_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_I2C4EN)) == RESET)
Kojto 115:87f2f5183dfb 1361 #define __HAL_RCC_CAN1_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_CAN1EN)) == RESET)
Kojto 115:87f2f5183dfb 1362 #define __HAL_RCC_CAN2_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_CAN2EN)) == RESET)
Kojto 115:87f2f5183dfb 1363 #define __HAL_RCC_CEC_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_CECEN)) == RESET)
Kojto 115:87f2f5183dfb 1364 #define __HAL_RCC_DAC_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_DACEN)) == RESET)
Kojto 115:87f2f5183dfb 1365 #define __HAL_RCC_UART7_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART7EN)) == RESET)
Kojto 115:87f2f5183dfb 1366 #define __HAL_RCC_UART8_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_UART8EN)) == RESET)
Kojto 115:87f2f5183dfb 1367
Kojto 115:87f2f5183dfb 1368 /** @brief Get the enable or disable status of the APB2 peripheral clock.
Kojto 115:87f2f5183dfb 1369 * @note After reset, the peripheral clock (used for registers read/write access)
Kojto 115:87f2f5183dfb 1370 * is disabled and the application software has to enable this clock before
Kojto 115:87f2f5183dfb 1371 * using it.
Kojto 115:87f2f5183dfb 1372 */
Kojto 115:87f2f5183dfb 1373 #define __HAL_RCC_TIM1_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM1EN)) != RESET)
Kojto 115:87f2f5183dfb 1374 #define __HAL_RCC_TIM8_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM8EN)) != RESET)
Kojto 115:87f2f5183dfb 1375 #define __HAL_RCC_USART1_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_USART1EN)) != RESET)
Kojto 115:87f2f5183dfb 1376 #define __HAL_RCC_USART6_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_USART6EN)) != RESET)
Kojto 115:87f2f5183dfb 1377 #define __HAL_RCC_ADC1_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_ADC1EN)) != RESET)
Kojto 115:87f2f5183dfb 1378 #define __HAL_RCC_ADC2_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_ADC2EN)) != RESET)
Kojto 115:87f2f5183dfb 1379 #define __HAL_RCC_ADC3_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_ADC3EN)) != RESET)
Kojto 115:87f2f5183dfb 1380 #define __HAL_RCC_SDMMC1_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SDMMC1EN)) != RESET)
Kojto 115:87f2f5183dfb 1381 #define __HAL_RCC_SPI1_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI1EN)) != RESET)
Kojto 115:87f2f5183dfb 1382 #define __HAL_RCC_SPI4_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI4EN)) != RESET)
Kojto 115:87f2f5183dfb 1383 #define __HAL_RCC_TIM9_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM9EN)) != RESET)
Kojto 115:87f2f5183dfb 1384 #define __HAL_RCC_TIM10_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM10EN)) != RESET)
Kojto 115:87f2f5183dfb 1385 #define __HAL_RCC_TIM11_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM11EN)) != RESET)
Kojto 115:87f2f5183dfb 1386 #define __HAL_RCC_SPI5_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI5EN)) != RESET)
Kojto 115:87f2f5183dfb 1387 #define __HAL_RCC_SPI6_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI6EN)) != RESET)
Kojto 115:87f2f5183dfb 1388 #define __HAL_RCC_SAI1_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SAI1EN)) != RESET)
Kojto 115:87f2f5183dfb 1389 #define __HAL_RCC_SAI2_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SAI2EN)) != RESET)
Kojto 115:87f2f5183dfb 1390 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1391 #define __HAL_RCC_LTDC_IS_CLK_ENABLED() ((RCC->APB2ENR & (RCC_APB2ENR_LTDCEN)) != RESET)
Kojto 115:87f2f5183dfb 1392 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1393 #define __HAL_RCC_TIM1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM1EN)) == RESET)
Kojto 115:87f2f5183dfb 1394 #define __HAL_RCC_TIM8_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM8EN)) == RESET)
Kojto 115:87f2f5183dfb 1395 #define __HAL_RCC_USART1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_USART1EN)) == RESET)
Kojto 115:87f2f5183dfb 1396 #define __HAL_RCC_USART6_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_USART6EN)) == RESET)
Kojto 115:87f2f5183dfb 1397 #define __HAL_RCC_ADC1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_ADC1EN)) == RESET)
Kojto 115:87f2f5183dfb 1398 #define __HAL_RCC_ADC2_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_ADC2EN)) == RESET)
Kojto 115:87f2f5183dfb 1399 #define __HAL_RCC_ADC3_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_ADC3EN)) == RESET)
Kojto 115:87f2f5183dfb 1400 #define __HAL_RCC_SDMMC1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SDMMC1EN)) == RESET)
Kojto 115:87f2f5183dfb 1401 #define __HAL_RCC_SPI1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI1EN)) == RESET)
Kojto 115:87f2f5183dfb 1402 #define __HAL_RCC_SPI4_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI4EN)) == RESET)
Kojto 115:87f2f5183dfb 1403 #define __HAL_RCC_TIM9_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM9EN)) == RESET)
Kojto 115:87f2f5183dfb 1404 #define __HAL_RCC_TIM10_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM10EN)) == RESET)
Kojto 115:87f2f5183dfb 1405 #define __HAL_RCC_TIM11_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_TIM11EN)) == RESET)
Kojto 115:87f2f5183dfb 1406 #define __HAL_RCC_SPI5_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI5EN)) == RESET)
Kojto 115:87f2f5183dfb 1407 #define __HAL_RCC_SPI6_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SPI6EN)) == RESET)
Kojto 115:87f2f5183dfb 1408 #define __HAL_RCC_SAI1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SAI1EN)) == RESET)
Kojto 115:87f2f5183dfb 1409 #define __HAL_RCC_SAI2_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SAI2EN)) == RESET)
Kojto 115:87f2f5183dfb 1410 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1411 #define __HAL_RCC_LTDC_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_LTDCEN)) == RESET)
Kojto 115:87f2f5183dfb 1412 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1413 /**
Kojto 115:87f2f5183dfb 1414 * @}
Kojto 115:87f2f5183dfb 1415 */
Kojto 115:87f2f5183dfb 1416
Kojto 115:87f2f5183dfb 1417 /** @defgroup RCCEx_Force_Release_Peripheral_Reset RCCEx Force Release Peripheral Reset
Kojto 115:87f2f5183dfb 1418 * @brief Forces or releases AHB/APB peripheral reset.
Kojto 115:87f2f5183dfb 1419 * @{
Kojto 115:87f2f5183dfb 1420 */
Kojto 115:87f2f5183dfb 1421
Kojto 115:87f2f5183dfb 1422 /** @brief Force or release AHB1 peripheral reset.
Kojto 115:87f2f5183dfb 1423 */
Kojto 115:87f2f5183dfb 1424 #define __HAL_RCC_DMA2_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2RST))
Kojto 115:87f2f5183dfb 1425 #define __HAL_RCC_DMA2D_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2DRST))
Kojto 115:87f2f5183dfb 1426 #define __HAL_RCC_ETHMAC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ETHMACRST))
Kojto 115:87f2f5183dfb 1427 #define __HAL_RCC_USB_OTG_HS_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_OTGHRST))
Kojto 115:87f2f5183dfb 1428 #define __HAL_RCC_GPIOA_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOARST))
Kojto 115:87f2f5183dfb 1429 #define __HAL_RCC_GPIOB_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOBRST))
Kojto 115:87f2f5183dfb 1430 #define __HAL_RCC_GPIOC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOCRST))
Kojto 115:87f2f5183dfb 1431 #define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
Kojto 115:87f2f5183dfb 1432 #define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
Kojto 115:87f2f5183dfb 1433 #define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
Kojto 115:87f2f5183dfb 1434 #define __HAL_RCC_GPIOG_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOGRST))
Kojto 115:87f2f5183dfb 1435 #define __HAL_RCC_GPIOH_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOHRST))
Kojto 115:87f2f5183dfb 1436 #define __HAL_RCC_GPIOI_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOIRST))
Kojto 115:87f2f5183dfb 1437 #define __HAL_RCC_GPIOJ_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOJRST))
Kojto 115:87f2f5183dfb 1438 #define __HAL_RCC_GPIOK_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOKRST))
Kojto 115:87f2f5183dfb 1439
Kojto 115:87f2f5183dfb 1440 #define __HAL_RCC_DMA2_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA2RST))
Kojto 115:87f2f5183dfb 1441 #define __HAL_RCC_DMA2D_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA2DRST))
Kojto 115:87f2f5183dfb 1442 #define __HAL_RCC_ETHMAC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_ETHMACRST))
Kojto 115:87f2f5183dfb 1443 #define __HAL_RCC_USB_OTG_HS_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_OTGHRST))
Kojto 115:87f2f5183dfb 1444 #define __HAL_RCC_GPIOA_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOARST))
Kojto 115:87f2f5183dfb 1445 #define __HAL_RCC_GPIOB_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOBRST))
Kojto 115:87f2f5183dfb 1446 #define __HAL_RCC_GPIOC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOCRST))
Kojto 115:87f2f5183dfb 1447 #define __HAL_RCC_GPIOD_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIODRST))
Kojto 115:87f2f5183dfb 1448 #define __HAL_RCC_GPIOE_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOERST))
Kojto 115:87f2f5183dfb 1449 #define __HAL_RCC_GPIOF_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOFRST))
Kojto 115:87f2f5183dfb 1450 #define __HAL_RCC_GPIOG_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOGRST))
Kojto 115:87f2f5183dfb 1451 #define __HAL_RCC_GPIOH_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOHRST))
Kojto 115:87f2f5183dfb 1452 #define __HAL_RCC_GPIOI_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOIRST))
Kojto 115:87f2f5183dfb 1453 #define __HAL_RCC_GPIOJ_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOJRST))
Kojto 115:87f2f5183dfb 1454 #define __HAL_RCC_GPIOK_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOKRST))
Kojto 115:87f2f5183dfb 1455
Kojto 115:87f2f5183dfb 1456 /** @brief Force or release AHB2 peripheral reset.
Kojto 115:87f2f5183dfb 1457 */
Kojto 115:87f2f5183dfb 1458 #define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFF)
Kojto 115:87f2f5183dfb 1459 #define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
Kojto 115:87f2f5183dfb 1460
Kojto 115:87f2f5183dfb 1461 #define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))
Kojto 115:87f2f5183dfb 1462 #define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
Kojto 115:87f2f5183dfb 1463
Kojto 115:87f2f5183dfb 1464 #define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00)
Kojto 115:87f2f5183dfb 1465 #define __HAL_RCC_DCMI_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_DCMIRST))
Kojto 115:87f2f5183dfb 1466 #define __HAL_RCC_RNG_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_RNGRST))
Kojto 115:87f2f5183dfb 1467 #define __HAL_RCC_USB_OTG_FS_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_OTGFSRST))
Kojto 115:87f2f5183dfb 1468
Kojto 115:87f2f5183dfb 1469 #if defined(STM32F756xx)
Kojto 115:87f2f5183dfb 1470 #define __HAL_RCC_CRYP_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CRYPRST))
Kojto 115:87f2f5183dfb 1471 #define __HAL_RCC_HASH_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HASHRST))
Kojto 115:87f2f5183dfb 1472 #define __HAL_RCC_CRYP_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_CRYPRST))
Kojto 115:87f2f5183dfb 1473 #define __HAL_RCC_HASH_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_HASHRST))
Kojto 115:87f2f5183dfb 1474 #endif /* STM32F756xx */
Kojto 115:87f2f5183dfb 1475
Kojto 115:87f2f5183dfb 1476 /** @brief Force or release AHB3 peripheral reset
Kojto 115:87f2f5183dfb 1477 */
Kojto 115:87f2f5183dfb 1478 #define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0xFFFFFFFF)
Kojto 115:87f2f5183dfb 1479 #define __HAL_RCC_FMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))
Kojto 115:87f2f5183dfb 1480 #define __HAL_RCC_QSPI_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_QSPIRST))
Kojto 115:87f2f5183dfb 1481
Kojto 115:87f2f5183dfb 1482 #define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00)
Kojto 115:87f2f5183dfb 1483 #define __HAL_RCC_FMC_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_FMCRST))
Kojto 115:87f2f5183dfb 1484 #define __HAL_RCC_QSPI_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_QSPIRST))
Kojto 115:87f2f5183dfb 1485
Kojto 115:87f2f5183dfb 1486 /** @brief Force or release APB1 peripheral reset.
Kojto 115:87f2f5183dfb 1487 */
Kojto 115:87f2f5183dfb 1488 #define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
Kojto 115:87f2f5183dfb 1489 #define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
Kojto 115:87f2f5183dfb 1490 #define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
Kojto 115:87f2f5183dfb 1491 #define __HAL_RCC_TIM5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM5RST))
Kojto 115:87f2f5183dfb 1492 #define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
Kojto 115:87f2f5183dfb 1493 #define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
Kojto 115:87f2f5183dfb 1494 #define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
Kojto 115:87f2f5183dfb 1495 #define __HAL_RCC_TIM13_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM13RST))
Kojto 115:87f2f5183dfb 1496 #define __HAL_RCC_TIM14_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM14RST))
Kojto 115:87f2f5183dfb 1497 #define __HAL_RCC_LPTIM1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_LPTIM1RST))
Kojto 115:87f2f5183dfb 1498 #define __HAL_RCC_SPI2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI2RST))
Kojto 115:87f2f5183dfb 1499 #define __HAL_RCC_SPI3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI3RST))
Kojto 115:87f2f5183dfb 1500 #define __HAL_RCC_SPDIFRX_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPDIFRXRST))
Kojto 115:87f2f5183dfb 1501 #define __HAL_RCC_USART2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_USART2RST))
Kojto 115:87f2f5183dfb 1502 #define __HAL_RCC_USART3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_USART3RST))
Kojto 115:87f2f5183dfb 1503 #define __HAL_RCC_UART4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART4RST))
Kojto 115:87f2f5183dfb 1504 #define __HAL_RCC_UART5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART5RST))
Kojto 115:87f2f5183dfb 1505 #define __HAL_RCC_I2C1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C1RST))
Kojto 115:87f2f5183dfb 1506 #define __HAL_RCC_I2C2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C2RST))
Kojto 115:87f2f5183dfb 1507 #define __HAL_RCC_I2C3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C3RST))
Kojto 115:87f2f5183dfb 1508 #define __HAL_RCC_I2C4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C4RST))
Kojto 115:87f2f5183dfb 1509 #define __HAL_RCC_CAN1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN1RST))
Kojto 115:87f2f5183dfb 1510 #define __HAL_RCC_CAN2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN2RST))
Kojto 115:87f2f5183dfb 1511 #define __HAL_RCC_CEC_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CECRST))
Kojto 115:87f2f5183dfb 1512 #define __HAL_RCC_DAC_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_DACRST))
Kojto 115:87f2f5183dfb 1513 #define __HAL_RCC_UART7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART7RST))
Kojto 115:87f2f5183dfb 1514 #define __HAL_RCC_UART8_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART8RST))
Kojto 115:87f2f5183dfb 1515
Kojto 115:87f2f5183dfb 1516 #define __HAL_RCC_TIM2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM2RST))
Kojto 115:87f2f5183dfb 1517 #define __HAL_RCC_TIM3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM3RST))
Kojto 115:87f2f5183dfb 1518 #define __HAL_RCC_TIM4_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM4RST))
Kojto 115:87f2f5183dfb 1519 #define __HAL_RCC_TIM5_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM5RST))
Kojto 115:87f2f5183dfb 1520 #define __HAL_RCC_TIM6_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM6RST))
Kojto 115:87f2f5183dfb 1521 #define __HAL_RCC_TIM7_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM7RST))
Kojto 115:87f2f5183dfb 1522 #define __HAL_RCC_TIM12_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM12RST))
Kojto 115:87f2f5183dfb 1523 #define __HAL_RCC_TIM13_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM13RST))
Kojto 115:87f2f5183dfb 1524 #define __HAL_RCC_TIM14_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM14RST))
Kojto 115:87f2f5183dfb 1525 #define __HAL_RCC_LPTIM1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_LPTIM1RST))
Kojto 115:87f2f5183dfb 1526 #define __HAL_RCC_SPI2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPI2RST))
Kojto 115:87f2f5183dfb 1527 #define __HAL_RCC_SPI3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPI3RST))
Kojto 115:87f2f5183dfb 1528 #define __HAL_RCC_SPDIFRX_RELEASE_RESET()(RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPDIFRXRST))
Kojto 115:87f2f5183dfb 1529 #define __HAL_RCC_USART2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART2RST))
Kojto 115:87f2f5183dfb 1530 #define __HAL_RCC_USART3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART3RST))
Kojto 115:87f2f5183dfb 1531 #define __HAL_RCC_UART4_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART4RST))
Kojto 115:87f2f5183dfb 1532 #define __HAL_RCC_UART5_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART5RST))
Kojto 115:87f2f5183dfb 1533 #define __HAL_RCC_I2C1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C1RST))
Kojto 115:87f2f5183dfb 1534 #define __HAL_RCC_I2C2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C2RST))
Kojto 115:87f2f5183dfb 1535 #define __HAL_RCC_I2C3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C3RST))
Kojto 115:87f2f5183dfb 1536 #define __HAL_RCC_I2C4_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C4RST))
Kojto 115:87f2f5183dfb 1537 #define __HAL_RCC_CAN1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN1RST))
Kojto 115:87f2f5183dfb 1538 #define __HAL_RCC_CAN2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN2RST))
Kojto 115:87f2f5183dfb 1539 #define __HAL_RCC_CEC_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CECRST))
Kojto 115:87f2f5183dfb 1540 #define __HAL_RCC_DAC_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_DACRST))
Kojto 115:87f2f5183dfb 1541 #define __HAL_RCC_UART7_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART7RST))
Kojto 115:87f2f5183dfb 1542 #define __HAL_RCC_UART8_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART8RST))
Kojto 115:87f2f5183dfb 1543
Kojto 115:87f2f5183dfb 1544 /** @brief Force or release APB2 peripheral reset.
Kojto 115:87f2f5183dfb 1545 */
Kojto 115:87f2f5183dfb 1546 #define __HAL_RCC_TIM1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM1RST))
Kojto 115:87f2f5183dfb 1547 #define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
Kojto 115:87f2f5183dfb 1548 #define __HAL_RCC_USART1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART1RST))
Kojto 115:87f2f5183dfb 1549 #define __HAL_RCC_USART6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART6RST))
Kojto 115:87f2f5183dfb 1550 #define __HAL_RCC_ADC_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_ADCRST))
Kojto 115:87f2f5183dfb 1551 #define __HAL_RCC_SDMMC1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDMMC1RST))
Kojto 115:87f2f5183dfb 1552 #define __HAL_RCC_SPI1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI1RST))
Kojto 115:87f2f5183dfb 1553 #define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
Kojto 115:87f2f5183dfb 1554 #define __HAL_RCC_TIM9_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM9RST))
Kojto 115:87f2f5183dfb 1555 #define __HAL_RCC_TIM10_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM10RST))
Kojto 115:87f2f5183dfb 1556 #define __HAL_RCC_TIM11_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM11RST))
Kojto 115:87f2f5183dfb 1557 #define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
Kojto 115:87f2f5183dfb 1558 #define __HAL_RCC_SPI6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI6RST))
Kojto 115:87f2f5183dfb 1559 #define __HAL_RCC_SAI1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI1RST))
Kojto 115:87f2f5183dfb 1560 #define __HAL_RCC_SAI2_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI2RST))
Kojto 115:87f2f5183dfb 1561 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1562 #define __HAL_RCC_LTDC_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_LTDCRST))
Kojto 115:87f2f5183dfb 1563 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1564
Kojto 115:87f2f5183dfb 1565 #define __HAL_RCC_TIM1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM1RST))
Kojto 115:87f2f5183dfb 1566 #define __HAL_RCC_TIM8_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM8RST))
Kojto 115:87f2f5183dfb 1567 #define __HAL_RCC_USART1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_USART1RST))
Kojto 115:87f2f5183dfb 1568 #define __HAL_RCC_USART6_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_USART6RST))
Kojto 115:87f2f5183dfb 1569 #define __HAL_RCC_ADC_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_ADCRST))
Kojto 115:87f2f5183dfb 1570 #define __HAL_RCC_SDMMC1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SDMMC1RST))
Kojto 115:87f2f5183dfb 1571 #define __HAL_RCC_SPI1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI1RST))
Kojto 115:87f2f5183dfb 1572 #define __HAL_RCC_SPI4_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI4RST))
Kojto 115:87f2f5183dfb 1573 #define __HAL_RCC_TIM9_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM9RST))
Kojto 115:87f2f5183dfb 1574 #define __HAL_RCC_TIM10_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM10RST))
Kojto 115:87f2f5183dfb 1575 #define __HAL_RCC_TIM11_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM11RST))
Kojto 115:87f2f5183dfb 1576 #define __HAL_RCC_SPI5_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI5RST))
Kojto 115:87f2f5183dfb 1577 #define __HAL_RCC_SPI6_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI6RST))
Kojto 115:87f2f5183dfb 1578 #define __HAL_RCC_SAI1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SAI1RST))
Kojto 115:87f2f5183dfb 1579 #define __HAL_RCC_SAI2_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SAI2RST))
Kojto 115:87f2f5183dfb 1580 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1581 #define __HAL_RCC_LTDC_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_LTDCRST))
Kojto 115:87f2f5183dfb 1582 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1583 /**
Kojto 115:87f2f5183dfb 1584 * @}
Kojto 115:87f2f5183dfb 1585 */
Kojto 115:87f2f5183dfb 1586
Kojto 115:87f2f5183dfb 1587 /** @defgroup RCCEx_Peripheral_Clock_Sleep_Enable_Disable RCCEx Peripheral Clock Sleep Enable Disable
Kojto 115:87f2f5183dfb 1588 * @brief Enables or disables the AHB/APB peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1589 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1590 * power consumption.
Kojto 115:87f2f5183dfb 1591 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1592 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1593 * @{
Kojto 115:87f2f5183dfb 1594 */
Kojto 115:87f2f5183dfb 1595
Kojto 115:87f2f5183dfb 1596 /** @brief Enable or disable the AHB1 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1597 */
Kojto 115:87f2f5183dfb 1598 #define __HAL_RCC_FLITF_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_FLITFLPEN))
Kojto 115:87f2f5183dfb 1599 #define __HAL_RCC_AXI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_AXILPEN))
Kojto 115:87f2f5183dfb 1600 #define __HAL_RCC_SRAM1_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM1LPEN))
Kojto 115:87f2f5183dfb 1601 #define __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM2LPEN))
Kojto 115:87f2f5183dfb 1602 #define __HAL_RCC_BKPSRAM_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_BKPSRAMLPEN))
Kojto 115:87f2f5183dfb 1603 #define __HAL_RCC_DTCM_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DTCMLPEN))
Kojto 115:87f2f5183dfb 1604 #define __HAL_RCC_DMA2_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2LPEN))
Kojto 115:87f2f5183dfb 1605 #define __HAL_RCC_DMA2D_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2DLPEN))
Kojto 115:87f2f5183dfb 1606 #define __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACLPEN))
Kojto 115:87f2f5183dfb 1607 #define __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACTXLPEN))
Kojto 115:87f2f5183dfb 1608 #define __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACRXLPEN))
Kojto 115:87f2f5183dfb 1609 #define __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACPTPLPEN))
Kojto 115:87f2f5183dfb 1610 #define __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSLPEN))
Kojto 115:87f2f5183dfb 1611 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSULPILPEN))
Kojto 115:87f2f5183dfb 1612 #define __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOALPEN))
Kojto 115:87f2f5183dfb 1613 #define __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOBLPEN))
Kojto 115:87f2f5183dfb 1614 #define __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOCLPEN))
Kojto 115:87f2f5183dfb 1615 #define __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIODLPEN))
Kojto 115:87f2f5183dfb 1616 #define __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOELPEN))
Kojto 115:87f2f5183dfb 1617 #define __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOFLPEN))
Kojto 115:87f2f5183dfb 1618 #define __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOGLPEN))
Kojto 115:87f2f5183dfb 1619 #define __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOHLPEN))
Kojto 115:87f2f5183dfb 1620 #define __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOILPEN))
Kojto 115:87f2f5183dfb 1621 #define __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOJLPEN))
Kojto 115:87f2f5183dfb 1622 #define __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOKLPEN))
Kojto 115:87f2f5183dfb 1623
Kojto 115:87f2f5183dfb 1624 #define __HAL_RCC_FLITF_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_FLITFLPEN))
Kojto 115:87f2f5183dfb 1625 #define __HAL_RCC_AXI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_AXILPEN))
Kojto 115:87f2f5183dfb 1626 #define __HAL_RCC_SRAM1_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM1LPEN))
Kojto 115:87f2f5183dfb 1627 #define __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM2LPEN))
Kojto 115:87f2f5183dfb 1628 #define __HAL_RCC_BKPSRAM_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_BKPSRAMLPEN))
Kojto 115:87f2f5183dfb 1629 #define __HAL_RCC_DTCM_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DTCMLPEN))
Kojto 115:87f2f5183dfb 1630 #define __HAL_RCC_DMA2_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA2LPEN))
Kojto 115:87f2f5183dfb 1631 #define __HAL_RCC_DMA2D_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA2DLPEN))
Kojto 115:87f2f5183dfb 1632 #define __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACLPEN))
Kojto 115:87f2f5183dfb 1633 #define __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACTXLPEN))
Kojto 115:87f2f5183dfb 1634 #define __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACRXLPEN))
Kojto 115:87f2f5183dfb 1635 #define __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACPTPLPEN))
Kojto 115:87f2f5183dfb 1636 #define __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSLPEN))
Kojto 115:87f2f5183dfb 1637 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSULPILPEN))
Kojto 115:87f2f5183dfb 1638 #define __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOALPEN))
Kojto 115:87f2f5183dfb 1639 #define __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOBLPEN))
Kojto 115:87f2f5183dfb 1640 #define __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOCLPEN))
Kojto 115:87f2f5183dfb 1641 #define __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIODLPEN))
Kojto 115:87f2f5183dfb 1642 #define __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOELPEN))
Kojto 115:87f2f5183dfb 1643 #define __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOFLPEN))
Kojto 115:87f2f5183dfb 1644 #define __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOGLPEN))
Kojto 115:87f2f5183dfb 1645 #define __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOHLPEN))
Kojto 115:87f2f5183dfb 1646 #define __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOILPEN))
Kojto 115:87f2f5183dfb 1647 #define __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOJLPEN))
Kojto 115:87f2f5183dfb 1648 #define __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOKLPEN))
Kojto 115:87f2f5183dfb 1649
Kojto 115:87f2f5183dfb 1650 /** @brief Enable or disable the AHB2 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1651 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1652 * power consumption.
Kojto 115:87f2f5183dfb 1653 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1654 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1655 */
Kojto 115:87f2f5183dfb 1656 #define __HAL_RCC_DCMI_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))
Kojto 115:87f2f5183dfb 1657 #define __HAL_RCC_DCMI_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_DCMILPEN))
Kojto 115:87f2f5183dfb 1658
Kojto 115:87f2f5183dfb 1659 #define __HAL_RCC_RNG_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_RNGLPEN))
Kojto 115:87f2f5183dfb 1660 #define __HAL_RCC_RNG_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_RNGLPEN))
Kojto 115:87f2f5183dfb 1661
Kojto 115:87f2f5183dfb 1662 #define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_OTGFSLPEN))
Kojto 115:87f2f5183dfb 1663 #define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_OTGFSLPEN))
Kojto 115:87f2f5183dfb 1664
Kojto 115:87f2f5183dfb 1665 #if defined(STM32F756xx)
Kojto 115:87f2f5183dfb 1666 #define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))
Kojto 115:87f2f5183dfb 1667 #define __HAL_RCC_HASH_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))
Kojto 115:87f2f5183dfb 1668
Kojto 115:87f2f5183dfb 1669 #define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_CRYPLPEN))
Kojto 115:87f2f5183dfb 1670 #define __HAL_RCC_HASH_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_HASHLPEN))
Kojto 115:87f2f5183dfb 1671 #endif /* STM32F756xx */
Kojto 115:87f2f5183dfb 1672
Kojto 115:87f2f5183dfb 1673 /** @brief Enable or disable the AHB3 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1674 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1675 * power consumption.
Kojto 115:87f2f5183dfb 1676 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1677 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1678 */
Kojto 115:87f2f5183dfb 1679 #define __HAL_RCC_FMC_CLK_SLEEP_ENABLE() (RCC->AHB3LPENR |= (RCC_AHB3LPENR_FMCLPEN))
Kojto 115:87f2f5183dfb 1680 #define __HAL_RCC_FMC_CLK_SLEEP_DISABLE() (RCC->AHB3LPENR &= ~(RCC_AHB3LPENR_FMCLPEN))
Kojto 115:87f2f5183dfb 1681
Kojto 115:87f2f5183dfb 1682 #define __HAL_RCC_QSPI_CLK_SLEEP_ENABLE() (RCC->AHB3LPENR |= (RCC_AHB3LPENR_QSPILPEN))
Kojto 115:87f2f5183dfb 1683 #define __HAL_RCC_QSPI_CLK_SLEEP_DISABLE() (RCC->AHB3LPENR &= ~(RCC_AHB3LPENR_QSPILPEN))
Kojto 115:87f2f5183dfb 1684
Kojto 115:87f2f5183dfb 1685 /** @brief Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1686 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1687 * power consumption.
Kojto 115:87f2f5183dfb 1688 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1689 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1690 */
Kojto 115:87f2f5183dfb 1691 #define __HAL_RCC_TIM2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM2LPEN))
Kojto 115:87f2f5183dfb 1692 #define __HAL_RCC_TIM3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM3LPEN))
Kojto 115:87f2f5183dfb 1693 #define __HAL_RCC_TIM4_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM4LPEN))
Kojto 115:87f2f5183dfb 1694 #define __HAL_RCC_TIM5_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM5LPEN))
Kojto 115:87f2f5183dfb 1695 #define __HAL_RCC_TIM6_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM6LPEN))
Kojto 115:87f2f5183dfb 1696 #define __HAL_RCC_TIM7_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM7LPEN))
Kojto 115:87f2f5183dfb 1697 #define __HAL_RCC_TIM12_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM12LPEN))
Kojto 115:87f2f5183dfb 1698 #define __HAL_RCC_TIM13_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM13LPEN))
Kojto 115:87f2f5183dfb 1699 #define __HAL_RCC_TIM14_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM14LPEN))
Kojto 115:87f2f5183dfb 1700 #define __HAL_RCC_LPTIM1_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_LPTIM1LPEN))
Kojto 115:87f2f5183dfb 1701 #define __HAL_RCC_SPI2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_SPI2LPEN))
Kojto 115:87f2f5183dfb 1702 #define __HAL_RCC_SPI3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_SPI3LPEN))
Kojto 115:87f2f5183dfb 1703 #define __HAL_RCC_SPDIFRX_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_SPDIFRXLPEN))
Kojto 115:87f2f5183dfb 1704 #define __HAL_RCC_USART2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_USART2LPEN))
Kojto 115:87f2f5183dfb 1705 #define __HAL_RCC_USART3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_USART3LPEN))
Kojto 115:87f2f5183dfb 1706 #define __HAL_RCC_UART4_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART4LPEN))
Kojto 115:87f2f5183dfb 1707 #define __HAL_RCC_UART5_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART5LPEN))
Kojto 115:87f2f5183dfb 1708 #define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C1LPEN))
Kojto 115:87f2f5183dfb 1709 #define __HAL_RCC_I2C2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C2LPEN))
Kojto 115:87f2f5183dfb 1710 #define __HAL_RCC_I2C3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C3LPEN))
Kojto 115:87f2f5183dfb 1711 #define __HAL_RCC_I2C4_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C4LPEN))
Kojto 115:87f2f5183dfb 1712 #define __HAL_RCC_CAN1_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN1LPEN))
Kojto 115:87f2f5183dfb 1713 #define __HAL_RCC_CAN2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN2LPEN))
Kojto 115:87f2f5183dfb 1714 #define __HAL_RCC_CEC_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CECLPEN))
Kojto 115:87f2f5183dfb 1715 #define __HAL_RCC_DAC_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_DACLPEN))
Kojto 115:87f2f5183dfb 1716 #define __HAL_RCC_UART7_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART7LPEN))
Kojto 115:87f2f5183dfb 1717 #define __HAL_RCC_UART8_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART8LPEN))
Kojto 115:87f2f5183dfb 1718
Kojto 115:87f2f5183dfb 1719 #define __HAL_RCC_TIM2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM2LPEN))
Kojto 115:87f2f5183dfb 1720 #define __HAL_RCC_TIM3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM3LPEN))
Kojto 115:87f2f5183dfb 1721 #define __HAL_RCC_TIM4_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM4LPEN))
Kojto 115:87f2f5183dfb 1722 #define __HAL_RCC_TIM5_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM5LPEN))
Kojto 115:87f2f5183dfb 1723 #define __HAL_RCC_TIM6_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM6LPEN))
Kojto 115:87f2f5183dfb 1724 #define __HAL_RCC_TIM7_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM7LPEN))
Kojto 115:87f2f5183dfb 1725 #define __HAL_RCC_TIM12_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM12LPEN))
Kojto 115:87f2f5183dfb 1726 #define __HAL_RCC_TIM13_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM13LPEN))
Kojto 115:87f2f5183dfb 1727 #define __HAL_RCC_TIM14_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM14LPEN))
Kojto 115:87f2f5183dfb 1728 #define __HAL_RCC_LPTIM1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_LPTIM1LPEN))
Kojto 115:87f2f5183dfb 1729 #define __HAL_RCC_SPI2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI2LPEN))
Kojto 115:87f2f5183dfb 1730 #define __HAL_RCC_SPI3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI3LPEN))
Kojto 115:87f2f5183dfb 1731 #define __HAL_RCC_SPDIFRX_CLK_SLEEP_DISABLE()(RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPDIFRXLPEN))
Kojto 115:87f2f5183dfb 1732 #define __HAL_RCC_USART2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART2LPEN))
Kojto 115:87f2f5183dfb 1733 #define __HAL_RCC_USART3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART3LPEN))
Kojto 115:87f2f5183dfb 1734 #define __HAL_RCC_UART4_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART4LPEN))
Kojto 115:87f2f5183dfb 1735 #define __HAL_RCC_UART5_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART5LPEN))
Kojto 115:87f2f5183dfb 1736 #define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C1LPEN))
Kojto 115:87f2f5183dfb 1737 #define __HAL_RCC_I2C2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C2LPEN))
Kojto 115:87f2f5183dfb 1738 #define __HAL_RCC_I2C3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C3LPEN))
Kojto 115:87f2f5183dfb 1739 #define __HAL_RCC_I2C4_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C4LPEN))
Kojto 115:87f2f5183dfb 1740 #define __HAL_RCC_CAN1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN1LPEN))
Kojto 115:87f2f5183dfb 1741 #define __HAL_RCC_CAN2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN2LPEN))
Kojto 115:87f2f5183dfb 1742 #define __HAL_RCC_CEC_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CECLPEN))
Kojto 115:87f2f5183dfb 1743 #define __HAL_RCC_DAC_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_DACLPEN))
Kojto 115:87f2f5183dfb 1744 #define __HAL_RCC_UART7_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART7LPEN))
Kojto 115:87f2f5183dfb 1745 #define __HAL_RCC_UART8_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART8LPEN))
Kojto 115:87f2f5183dfb 1746
Kojto 115:87f2f5183dfb 1747 /** @brief Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1748 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1749 * power consumption.
Kojto 115:87f2f5183dfb 1750 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1751 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1752 */
Kojto 115:87f2f5183dfb 1753 #define __HAL_RCC_TIM1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM1LPEN))
Kojto 115:87f2f5183dfb 1754 #define __HAL_RCC_TIM8_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM8LPEN))
Kojto 115:87f2f5183dfb 1755 #define __HAL_RCC_USART1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_USART1LPEN))
Kojto 115:87f2f5183dfb 1756 #define __HAL_RCC_USART6_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_USART6LPEN))
Kojto 115:87f2f5183dfb 1757 #define __HAL_RCC_ADC1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC1LPEN))
Kojto 115:87f2f5183dfb 1758 #define __HAL_RCC_ADC2_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC2LPEN))
Kojto 115:87f2f5183dfb 1759 #define __HAL_RCC_ADC3_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC3LPEN))
Kojto 115:87f2f5183dfb 1760 #define __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SDMMC1LPEN))
Kojto 115:87f2f5183dfb 1761 #define __HAL_RCC_SPI1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI1LPEN))
Kojto 115:87f2f5183dfb 1762 #define __HAL_RCC_SPI4_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI4LPEN))
Kojto 115:87f2f5183dfb 1763 #define __HAL_RCC_TIM9_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM9LPEN))
Kojto 115:87f2f5183dfb 1764 #define __HAL_RCC_TIM10_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM10LPEN))
Kojto 115:87f2f5183dfb 1765 #define __HAL_RCC_TIM11_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM11LPEN))
Kojto 115:87f2f5183dfb 1766 #define __HAL_RCC_SPI5_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI5LPEN))
Kojto 115:87f2f5183dfb 1767 #define __HAL_RCC_SPI6_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI6LPEN))
Kojto 115:87f2f5183dfb 1768 #define __HAL_RCC_SAI1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SAI1LPEN))
Kojto 115:87f2f5183dfb 1769 #define __HAL_RCC_SAI2_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SAI2LPEN))
Kojto 115:87f2f5183dfb 1770 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1771 #define __HAL_RCC_LTDC_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_LTDCLPEN))
Kojto 115:87f2f5183dfb 1772 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1773
Kojto 115:87f2f5183dfb 1774 #define __HAL_RCC_TIM1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM1LPEN))
Kojto 115:87f2f5183dfb 1775 #define __HAL_RCC_TIM8_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM8LPEN))
Kojto 115:87f2f5183dfb 1776 #define __HAL_RCC_USART1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_USART1LPEN))
Kojto 115:87f2f5183dfb 1777 #define __HAL_RCC_USART6_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_USART6LPEN))
Kojto 115:87f2f5183dfb 1778 #define __HAL_RCC_ADC1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC1LPEN))
Kojto 115:87f2f5183dfb 1779 #define __HAL_RCC_ADC2_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC2LPEN))
Kojto 115:87f2f5183dfb 1780 #define __HAL_RCC_ADC3_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC3LPEN))
Kojto 115:87f2f5183dfb 1781 #define __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SDMMC1LPEN))
Kojto 115:87f2f5183dfb 1782 #define __HAL_RCC_SPI1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI1LPEN))
Kojto 115:87f2f5183dfb 1783 #define __HAL_RCC_SPI4_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI4LPEN))
Kojto 115:87f2f5183dfb 1784 #define __HAL_RCC_TIM9_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM9LPEN))
Kojto 115:87f2f5183dfb 1785 #define __HAL_RCC_TIM10_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM10LPEN))
Kojto 115:87f2f5183dfb 1786 #define __HAL_RCC_TIM11_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM11LPEN))
Kojto 115:87f2f5183dfb 1787 #define __HAL_RCC_SPI5_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI5LPEN))
Kojto 115:87f2f5183dfb 1788 #define __HAL_RCC_SPI6_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI6LPEN))
Kojto 115:87f2f5183dfb 1789 #define __HAL_RCC_SAI1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SAI1LPEN))
Kojto 115:87f2f5183dfb 1790 #define __HAL_RCC_SAI2_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SAI2LPEN))
Kojto 115:87f2f5183dfb 1791 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1792 #define __HAL_RCC_LTDC_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_LTDCLPEN))
Kojto 115:87f2f5183dfb 1793 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1794 /**
Kojto 115:87f2f5183dfb 1795 * @}
Kojto 115:87f2f5183dfb 1796 */
Kojto 115:87f2f5183dfb 1797
Kojto 115:87f2f5183dfb 1798 /** @defgroup RCC_Clock_Sleep_Enable_Disable_Status AHB/APB Peripheral Clock Sleep Enable Disable Status
Kojto 115:87f2f5183dfb 1799 * @brief Get the enable or disable status of the AHB/APB peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1800 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1801 * power consumption.
Kojto 115:87f2f5183dfb 1802 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1803 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1804 * @{
Kojto 115:87f2f5183dfb 1805 */
Kojto 115:87f2f5183dfb 1806
Kojto 115:87f2f5183dfb 1807 /** @brief Get the enable or disable status of the AHB1 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1808 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1809 * power consumption.
Kojto 115:87f2f5183dfb 1810 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1811 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1812 */
Kojto 115:87f2f5183dfb 1813 #define __HAL_RCC_FLITF_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_FLITFLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1814 #define __HAL_RCC_AXI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_AXILPEN)) != RESET)
Kojto 115:87f2f5183dfb 1815 #define __HAL_RCC_SRAM1_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1816 #define __HAL_RCC_SRAM2_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1817 #define __HAL_RCC_BKPSRAM_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_BKPSRAMLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1818 #define __HAL_RCC_DTCM_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DTCMLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1819 #define __HAL_RCC_DMA2_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1820 #define __HAL_RCC_DMA2D_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2DLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1821 #define __HAL_RCC_ETHMAC_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1822 #define __HAL_RCC_ETHMACTX_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACTXLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1823 #define __HAL_RCC_ETHMACRX_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACRXLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1824 #define __HAL_RCC_ETHMACPTP_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACPTPLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1825 #define __HAL_RCC_USB_OTG_HS_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1826 #define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSULPILPEN)) != RESET)
Kojto 115:87f2f5183dfb 1827 #define __HAL_RCC_GPIOA_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOALPEN)) != RESET)
Kojto 115:87f2f5183dfb 1828 #define __HAL_RCC_GPIOB_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOBLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1829 #define __HAL_RCC_GPIOC_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOCLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1830 #define __HAL_RCC_GPIOD_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIODLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1831 #define __HAL_RCC_GPIOE_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOELPEN)) != RESET)
Kojto 115:87f2f5183dfb 1832 #define __HAL_RCC_GPIOF_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOFLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1833 #define __HAL_RCC_GPIOG_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOGLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1834 #define __HAL_RCC_GPIOH_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOHLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1835 #define __HAL_RCC_GPIOI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOILPEN)) != RESET)
Kojto 115:87f2f5183dfb 1836 #define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOJLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1837 #define __HAL_RCC_GPIOK_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOKLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1838
Kojto 115:87f2f5183dfb 1839 #define __HAL_RCC_FLITF_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_FLITFLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1840 #define __HAL_RCC_AXI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_AXILPEN)) == RESET)
Kojto 115:87f2f5183dfb 1841 #define __HAL_RCC_SRAM1_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1842 #define __HAL_RCC_SRAM2_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1843 #define __HAL_RCC_BKPSRAM_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_BKPSRAMLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1844 #define __HAL_RCC_DTCM_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DTCMLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1845 #define __HAL_RCC_DMA2_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1846 #define __HAL_RCC_DMA2D_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2DLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1847 #define __HAL_RCC_ETHMAC_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1848 #define __HAL_RCC_ETHMACTX_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACTXLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1849 #define __HAL_RCC_ETHMACRX_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACRXLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1850 #define __HAL_RCC_ETHMACPTP_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACPTPLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1851 #define __HAL_RCC_USB_OTG_HS_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1852 #define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSULPILPEN)) == RESET)
Kojto 115:87f2f5183dfb 1853 #define __HAL_RCC_GPIOA_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOALPEN)) == RESET)
Kojto 115:87f2f5183dfb 1854 #define __HAL_RCC_GPIOB_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOBLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1855 #define __HAL_RCC_GPIOC_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOCLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1856 #define __HAL_RCC_GPIOD_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIODLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1857 #define __HAL_RCC_GPIOE_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOELPEN)) == RESET)
Kojto 115:87f2f5183dfb 1858 #define __HAL_RCC_GPIOF_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOFLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1859 #define __HAL_RCC_GPIOG_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOGLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1860 #define __HAL_RCC_GPIOH_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOHLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1861 #define __HAL_RCC_GPIOI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOILPEN)) == RESET)
Kojto 115:87f2f5183dfb 1862 #define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOJLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1863 #define __HAL_RCC_GPIOK_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOKLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1864
Kojto 115:87f2f5183dfb 1865 /** @brief Get the enable or disable status of the AHB2 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1866 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1867 * power consumption.
Kojto 115:87f2f5183dfb 1868 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1869 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1870 */
Kojto 115:87f2f5183dfb 1871 #define __HAL_RCC_DCMI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DCMILPEN)) != RESET)
Kojto 115:87f2f5183dfb 1872 #define __HAL_RCC_DCMI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DCMILPEN)) == RESET)
Kojto 115:87f2f5183dfb 1873
Kojto 115:87f2f5183dfb 1874 #define __HAL_RCC_RNG_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_RNGLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1875 #define __HAL_RCC_RNG_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_RNGLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1876
Kojto 115:87f2f5183dfb 1877 #define __HAL_RCC_USB_OTG_FS_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_OTGFSLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1878 #define __HAL_RCC_USB_OTG_FS_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_OTGFSLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1879
Kojto 115:87f2f5183dfb 1880 #if defined(STM32F756xx)
Kojto 115:87f2f5183dfb 1881 #define __HAL_RCC_CRYP_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CRYPLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1882 #define __HAL_RCC_HASH_IS_CLK_SLEEP_ENABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_HASHLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1883
Kojto 115:87f2f5183dfb 1884 #define __HAL_RCC_CRYP_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CRYPLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1885 #define __HAL_RCC_HASH_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_HASHLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1886 #endif /* STM32F756xx */
Kojto 115:87f2f5183dfb 1887
Kojto 115:87f2f5183dfb 1888 /** @brief Get the enable or disable status of the AHB3 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1889 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1890 * power consumption.
Kojto 115:87f2f5183dfb 1891 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1892 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1893 */
Kojto 115:87f2f5183dfb 1894 #define __HAL_RCC_FMC_IS_CLK_SLEEP_ENABLED() ((RCC->AHB3LPENR & (RCC_AHB3LPENR_FMCLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1895 #define __HAL_RCC_FMC_IS_CLK_SLEEP_DISABLED() ((RCC->AHB3LPENR & (RCC_AHB3LPENR_FMCLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1896
Kojto 115:87f2f5183dfb 1897 #define __HAL_RCC_QSPI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB3LPENR & (RCC_AHB3LPENR_QSPILPEN)) != RESET)
Kojto 115:87f2f5183dfb 1898 #define __HAL_RCC_QSPI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB3LPENR & (RCC_AHB3LPENR_QSPILPEN)) == RESET)
Kojto 115:87f2f5183dfb 1899
Kojto 115:87f2f5183dfb 1900 /** @brief Get the enable or disable status of the APB1 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1901 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1902 * power consumption.
Kojto 115:87f2f5183dfb 1903 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1904 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1905 */
Kojto 115:87f2f5183dfb 1906 #define __HAL_RCC_TIM2_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1907 #define __HAL_RCC_TIM3_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM3LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1908 #define __HAL_RCC_TIM4_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM4LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1909 #define __HAL_RCC_TIM5_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM5LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1910 #define __HAL_RCC_TIM6_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM6LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1911 #define __HAL_RCC_TIM7_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM7LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1912 #define __HAL_RCC_TIM12_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM12LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1913 #define __HAL_RCC_TIM13_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM13LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1914 #define __HAL_RCC_TIM14_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM14LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1915 #define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_LPTIM1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1916 #define __HAL_RCC_SPI2_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1917 #define __HAL_RCC_SPI3_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI3LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1918 #define __HAL_RCC_SPDIFRX_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_SPDIFRXLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1919 #define __HAL_RCC_USART2_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_USART2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1920 #define __HAL_RCC_USART3_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_USART3LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1921 #define __HAL_RCC_UART4_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART4LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1922 #define __HAL_RCC_UART5_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART5LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1923 #define __HAL_RCC_I2C1_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1924 #define __HAL_RCC_I2C2_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1925 #define __HAL_RCC_I2C3_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C3LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1926 #define __HAL_RCC_I2C4_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C4LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1927 #define __HAL_RCC_CAN1_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1928 #define __HAL_RCC_CAN2_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1929 #define __HAL_RCC_CEC_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_CECLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1930 #define __HAL_RCC_DAC_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_DACLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1931 #define __HAL_RCC_UART7_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART7LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1932 #define __HAL_RCC_UART8_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART8LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1933
Kojto 115:87f2f5183dfb 1934 #define __HAL_RCC_TIM2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1935 #define __HAL_RCC_TIM3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM3LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1936 #define __HAL_RCC_TIM4_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM4LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1937 #define __HAL_RCC_TIM5_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM5LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1938 #define __HAL_RCC_TIM6_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM6LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1939 #define __HAL_RCC_TIM7_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM7LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1940 #define __HAL_RCC_TIM12_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM12LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1941 #define __HAL_RCC_TIM13_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM13LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1942 #define __HAL_RCC_TIM14_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM14LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1943 #define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_LPTIM1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1944 #define __HAL_RCC_SPI2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1945 #define __HAL_RCC_SPI3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI3LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1946 #define __HAL_RCC_SPDIFRX_IS_CLK_SLEEP_DISABLED()((RCC->APB1LPENR & (RCC_APB1LPENR_SPDIFRXLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1947 #define __HAL_RCC_USART2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_USART2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1948 #define __HAL_RCC_USART3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_USART3LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1949 #define __HAL_RCC_UART4_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART4LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1950 #define __HAL_RCC_UART5_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART5LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1951 #define __HAL_RCC_I2C1_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1952 #define __HAL_RCC_I2C2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1953 #define __HAL_RCC_I2C3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C3LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1954 #define __HAL_RCC_I2C4_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C4LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1955 #define __HAL_RCC_CAN1_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1956 #define __HAL_RCC_CAN2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1957 #define __HAL_RCC_CEC_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_CECLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1958 #define __HAL_RCC_DAC_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_DACLPEN)) == RESET)
Kojto 115:87f2f5183dfb 1959 #define __HAL_RCC_UART7_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART7LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1960 #define __HAL_RCC_UART8_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_UART8LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1961
Kojto 115:87f2f5183dfb 1962 /** @brief Get the enable or disable status of the APB2 peripheral clock during Low Power (Sleep) mode.
Kojto 115:87f2f5183dfb 1963 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
Kojto 115:87f2f5183dfb 1964 * power consumption.
Kojto 115:87f2f5183dfb 1965 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
Kojto 115:87f2f5183dfb 1966 * @note By default, all peripheral clocks are enabled during SLEEP mode.
Kojto 115:87f2f5183dfb 1967 */
Kojto 115:87f2f5183dfb 1968 #define __HAL_RCC_TIM1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1969 #define __HAL_RCC_TIM8_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM8LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1970 #define __HAL_RCC_USART1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_USART1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1971 #define __HAL_RCC_USART6_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_USART6LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1972 #define __HAL_RCC_ADC1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1973 #define __HAL_RCC_ADC2_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1974 #define __HAL_RCC_ADC3_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC3LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1975 #define __HAL_RCC_SDMMC1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SDMMC1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1976 #define __HAL_RCC_SPI1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1977 #define __HAL_RCC_SPI4_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI4LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1978 #define __HAL_RCC_TIM9_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM9LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1979 #define __HAL_RCC_TIM10_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM10LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1980 #define __HAL_RCC_TIM11_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM11LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1981 #define __HAL_RCC_SPI5_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1982 #define __HAL_RCC_SPI6_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI6LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1983 #define __HAL_RCC_SAI1_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1984 #define __HAL_RCC_SAI2_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN)) != RESET)
Kojto 115:87f2f5183dfb 1985 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 1986 #define __HAL_RCC_LTDC_IS_CLK_SLEEP_ENABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_LTDCLPEN)) != RESET)
Kojto 115:87f2f5183dfb 1987 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 1988
Kojto 115:87f2f5183dfb 1989 #define __HAL_RCC_TIM1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1990 #define __HAL_RCC_TIM8_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM8LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1991 #define __HAL_RCC_USART1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_USART1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1992 #define __HAL_RCC_USART6_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_USART6LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1993 #define __HAL_RCC_ADC1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1994 #define __HAL_RCC_ADC2_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1995 #define __HAL_RCC_ADC3_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC3LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1996 #define __HAL_RCC_SDMMC1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SDMMC1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1997 #define __HAL_RCC_SPI1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1998 #define __HAL_RCC_SPI4_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI4LPEN)) == RESET)
Kojto 115:87f2f5183dfb 1999 #define __HAL_RCC_TIM9_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM9LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2000 #define __HAL_RCC_TIM10_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM10LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2001 #define __HAL_RCC_TIM11_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM11LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2002 #define __HAL_RCC_SPI5_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2003 #define __HAL_RCC_SPI6_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI6LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2004 #define __HAL_RCC_SAI1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2005 #define __HAL_RCC_SAI2_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN)) == RESET)
Kojto 115:87f2f5183dfb 2006 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 2007 #define __HAL_RCC_LTDC_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_LTDCLPEN)) == RESET)
Kojto 115:87f2f5183dfb 2008 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 2009 /**
Kojto 115:87f2f5183dfb 2010 * @}
Kojto 115:87f2f5183dfb 2011 */
Kojto 115:87f2f5183dfb 2012
Kojto 115:87f2f5183dfb 2013 /*---------------------------------------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 2014
Kojto 115:87f2f5183dfb 2015 /** @brief Macro to configure the Timers clocks prescalers
Kojto 115:87f2f5183dfb 2016 * @param __PRESC__ : specifies the Timers clocks prescalers selection
Kojto 115:87f2f5183dfb 2017 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2018 * @arg RCC_TIMPRES_DESACTIVATED: The Timers kernels clocks prescaler is
Kojto 115:87f2f5183dfb 2019 * equal to HPRE if PPREx is corresponding to division by 1 or 2,
Kojto 115:87f2f5183dfb 2020 * else it is equal to [(HPRE * PPREx) / 2] if PPREx is corresponding to
Kojto 115:87f2f5183dfb 2021 * division by 4 or more.
Kojto 115:87f2f5183dfb 2022 * @arg RCC_TIMPRES_ACTIVATED: The Timers kernels clocks prescaler is
Kojto 115:87f2f5183dfb 2023 * equal to HPRE if PPREx is corresponding to division by 1, 2 or 4,
Kojto 115:87f2f5183dfb 2024 * else it is equal to [(HPRE * PPREx) / 4] if PPREx is corresponding
Kojto 115:87f2f5183dfb 2025 * to division by 8 or more.
Kojto 115:87f2f5183dfb 2026 */
Kojto 115:87f2f5183dfb 2027 #define __HAL_RCC_TIMCLKPRESCALER(__PRESC__) do {RCC->DCKCFGR1 &= ~(RCC_DCKCFGR1_TIMPRE);\
Kojto 115:87f2f5183dfb 2028 RCC->DCKCFGR1 |= (__PRESC__);\
Kojto 115:87f2f5183dfb 2029 }while(0)
Kojto 115:87f2f5183dfb 2030
Kojto 115:87f2f5183dfb 2031 /** @brief Macros to Enable or Disable the PLLISAI.
Kojto 115:87f2f5183dfb 2032 * @note The PLLSAI is disabled by hardware when entering STOP and STANDBY modes.
Kojto 115:87f2f5183dfb 2033 */
Kojto 115:87f2f5183dfb 2034 #define __HAL_RCC_PLLSAI_ENABLE() (RCC->CR |= (RCC_CR_PLLSAION))
Kojto 115:87f2f5183dfb 2035 #define __HAL_RCC_PLLSAI_DISABLE() (RCC->CR &= ~(RCC_CR_PLLSAION))
Kojto 115:87f2f5183dfb 2036
Kojto 115:87f2f5183dfb 2037 /** @brief Macro to configure the PLLSAI clock multiplication and division factors.
Kojto 115:87f2f5183dfb 2038 * @note This function must be used only when the PLLSAI is disabled.
Kojto 115:87f2f5183dfb 2039 * @note PLLSAI clock source is common with the main PLL (configured in
Kojto 115:87f2f5183dfb 2040 * RCC_PLLConfig function )
Kojto 115:87f2f5183dfb 2041 * @param __PLLSAIN__: specifies the multiplication factor for PLLSAI VCO output clock.
Kojto 115:87f2f5183dfb 2042 * This parameter must be a number between Min_Data = 49 and Max_Data = 432.
Kojto 115:87f2f5183dfb 2043 * @note You have to set the PLLSAIN parameter correctly to ensure that the VCO
Kojto 115:87f2f5183dfb 2044 * output frequency is between Min_Data = 49 and Max_Data = 432 MHz.
Kojto 115:87f2f5183dfb 2045 * @param __PLLSAIQ__: specifies the division factor for SAI clock
Kojto 115:87f2f5183dfb 2046 * This parameter must be a number between Min_Data = 2 and Max_Data = 15.
Kojto 115:87f2f5183dfb 2047 * @param __PLLSAIR__: specifies the division factor for LTDC clock
Kojto 115:87f2f5183dfb 2048 * This parameter must be a number between Min_Data = 2 and Max_Data = 7.
Kojto 115:87f2f5183dfb 2049 * @param __PLLSAIP__: specifies the division factor for USB, RNG, SDMMC clocks
Kojto 115:87f2f5183dfb 2050 * This parameter can be a value of @ref RCCEx_PLLSAIP_Clock_Divider .
Kojto 115:87f2f5183dfb 2051 */
Kojto 115:87f2f5183dfb 2052 #define __HAL_RCC_PLLSAI_CONFIG(__PLLSAIN__, __PLLSAIP__, __PLLSAIQ__, __PLLSAIR__) (RCC->PLLSAICFGR = ((__PLLSAIN__) << 6) | ((__PLLSAIP__) << 16) | ((__PLLSAIQ__) << 24) | ((__PLLSAIR__) << 28))
Kojto 115:87f2f5183dfb 2053
Kojto 115:87f2f5183dfb 2054 /** @brief Macro used by the SAI HAL driver to configure the PLLI2S clock multiplication and division factors.
Kojto 115:87f2f5183dfb 2055 * @note This macro must be used only when the PLLI2S is disabled.
Kojto 115:87f2f5183dfb 2056 * @note PLLI2S clock source is common with the main PLL (configured in
Kojto 115:87f2f5183dfb 2057 * HAL_RCC_ClockConfig() API)
Kojto 115:87f2f5183dfb 2058 * @param __PLLI2SN__: specifies the multiplication factor for PLLI2S VCO output clock.
Kojto 115:87f2f5183dfb 2059 * This parameter must be a number between Min_Data = 192 and Max_Data = 432.
Kojto 115:87f2f5183dfb 2060 * @note You have to set the PLLI2SN parameter correctly to ensure that the VCO
Kojto 115:87f2f5183dfb 2061 * output frequency is between Min_Data = 192 and Max_Data = 432 MHz.
Kojto 115:87f2f5183dfb 2062 * @param __PLLI2SQ__: specifies the division factor for SAI clock.
Kojto 115:87f2f5183dfb 2063 * This parameter must be a number between Min_Data = 2 and Max_Data = 15.
Kojto 115:87f2f5183dfb 2064 * @param __PLLI2SR__: specifies the division factor for I2S clock
Kojto 115:87f2f5183dfb 2065 * This parameter must be a number between Min_Data = 2 and Max_Data = 7.
Kojto 115:87f2f5183dfb 2066 * @note You have to set the PLLI2SR parameter correctly to not exceed 192 MHz
Kojto 115:87f2f5183dfb 2067 * on the I2S clock frequency.
Kojto 115:87f2f5183dfb 2068 * @param __PLLI2SP__: specifies the division factor for SPDDIF-RX clock.
Kojto 115:87f2f5183dfb 2069 * This parameter can be a number between 0 and 3 for respective values 2, 4, 6 and 8
Kojto 115:87f2f5183dfb 2070 */
Kojto 115:87f2f5183dfb 2071 #define __HAL_RCC_PLLI2S_CONFIG(__PLLI2SN__, __PLLI2SP__, __PLLI2SQ__, __PLLI2SR__) (RCC->PLLI2SCFGR = ((__PLLI2SN__) << 6) | ((__PLLI2SP__) << 16) | ((__PLLI2SQ__) << 24) | ((__PLLI2SR__) << 28))
Kojto 115:87f2f5183dfb 2072
Kojto 115:87f2f5183dfb 2073 /** @brief Macro to configure the SAI clock Divider coming from PLLI2S.
Kojto 115:87f2f5183dfb 2074 * @note This function must be called before enabling the PLLI2S.
Kojto 115:87f2f5183dfb 2075 * @param __PLLI2SDivQ__: specifies the PLLI2S division factor for SAI1 clock .
Kojto 115:87f2f5183dfb 2076 * This parameter must be a number between 1 and 32.
Kojto 115:87f2f5183dfb 2077 * SAI1 clock frequency = f(PLLI2SQ) / __PLLI2SDivQ__
Kojto 115:87f2f5183dfb 2078 */
Kojto 115:87f2f5183dfb 2079 #define __HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(__PLLI2SDivQ__) (MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_PLLI2SDIVQ, (__PLLI2SDivQ__)-1))
Kojto 115:87f2f5183dfb 2080
Kojto 115:87f2f5183dfb 2081 /** @brief Macro to configure the SAI clock Divider coming from PLLSAI.
Kojto 115:87f2f5183dfb 2082 * @note This function must be called before enabling the PLLSAI.
Kojto 115:87f2f5183dfb 2083 * @param __PLLSAIDivQ__: specifies the PLLSAI division factor for SAI1 clock .
Kojto 115:87f2f5183dfb 2084 * This parameter must be a number between Min_Data = 1 and Max_Data = 32.
Kojto 115:87f2f5183dfb 2085 * SAI1 clock frequency = f(PLLSAIQ) / __PLLSAIDivQ__
Kojto 115:87f2f5183dfb 2086 */
Kojto 115:87f2f5183dfb 2087 #define __HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(__PLLSAIDivQ__) (MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_PLLSAIDIVQ, ((__PLLSAIDivQ__)-1)<<8))
Kojto 115:87f2f5183dfb 2088
Kojto 115:87f2f5183dfb 2089 /** @brief Macro to configure the LTDC clock Divider coming from PLLSAI.
Kojto 115:87f2f5183dfb 2090 *
Kojto 115:87f2f5183dfb 2091 * @note This function must be called before enabling the PLLSAI.
Kojto 115:87f2f5183dfb 2092 * @param __PLLSAIDivR__: specifies the PLLSAI division factor for LTDC clock .
Kojto 115:87f2f5183dfb 2093 * This parameter must be a number between Min_Data = 2 and Max_Data = 16.
Kojto 115:87f2f5183dfb 2094 * LTDC clock frequency = f(PLLSAIR) / __PLLSAIDivR__
Kojto 115:87f2f5183dfb 2095 */
Kojto 115:87f2f5183dfb 2096 #define __HAL_RCC_PLLSAI_PLLSAICLKDIVR_CONFIG(__PLLSAIDivR__)\
Kojto 115:87f2f5183dfb 2097 MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_PLLSAIDIVR, (uint32_t)(__PLLSAIDivR__))
Kojto 115:87f2f5183dfb 2098
Kojto 115:87f2f5183dfb 2099 /** @brief Macro to configure SAI1 clock source selection.
Kojto 115:87f2f5183dfb 2100 * @note This function must be called before enabling PLLSAI, PLLI2S and
Kojto 115:87f2f5183dfb 2101 * the SAI clock.
Kojto 115:87f2f5183dfb 2102 * @param __SOURCE__: specifies the SAI1 clock source.
Kojto 115:87f2f5183dfb 2103 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2104 * @arg RCC_SAI1CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used
Kojto 115:87f2f5183dfb 2105 * as SAI1 clock.
Kojto 115:87f2f5183dfb 2106 * @arg RCC_SAI1CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used
Kojto 115:87f2f5183dfb 2107 * as SAI1 clock.
Kojto 115:87f2f5183dfb 2108 * @arg RCC_SAI1CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin
Kojto 115:87f2f5183dfb 2109 * used as SAI1 clock.
Kojto 115:87f2f5183dfb 2110 */
Kojto 115:87f2f5183dfb 2111 #define __HAL_RCC_SAI1_CONFIG(__SOURCE__)\
Kojto 115:87f2f5183dfb 2112 MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI1SEL, (uint32_t)(__SOURCE__))
Kojto 115:87f2f5183dfb 2113
Kojto 115:87f2f5183dfb 2114 /** @brief Macro to get the SAI1 clock source.
Kojto 115:87f2f5183dfb 2115 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2116 * @arg RCC_SAI1CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used
Kojto 115:87f2f5183dfb 2117 * as SAI1 clock.
Kojto 115:87f2f5183dfb 2118 * @arg RCC_SAI1CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used
Kojto 115:87f2f5183dfb 2119 * as SAI1 clock.
Kojto 115:87f2f5183dfb 2120 * @arg RCC_SAI1CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin
Kojto 115:87f2f5183dfb 2121 * used as SAI1 clock.
Kojto 115:87f2f5183dfb 2122 */
Kojto 115:87f2f5183dfb 2123 #define __HAL_RCC_GET_SAI1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI1SEL)))
Kojto 115:87f2f5183dfb 2124
Kojto 115:87f2f5183dfb 2125
Kojto 115:87f2f5183dfb 2126 /** @brief Macro to configure SAI2 clock source selection.
Kojto 115:87f2f5183dfb 2127 * @note This function must be called before enabling PLLSAI, PLLI2S and
Kojto 115:87f2f5183dfb 2128 * the SAI clock.
Kojto 115:87f2f5183dfb 2129 * @param __SOURCE__: specifies the SAI2 clock source.
Kojto 115:87f2f5183dfb 2130 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2131 * @arg RCC_SAI2CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used
Kojto 115:87f2f5183dfb 2132 * as SAI2 clock.
Kojto 115:87f2f5183dfb 2133 * @arg RCC_SAI2CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used
Kojto 115:87f2f5183dfb 2134 * as SAI2 clock.
Kojto 115:87f2f5183dfb 2135 * @arg RCC_SAI2CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin
Kojto 115:87f2f5183dfb 2136 * used as SAI2 clock.
Kojto 115:87f2f5183dfb 2137 */
Kojto 115:87f2f5183dfb 2138 #define __HAL_RCC_SAI2_CONFIG(__SOURCE__)\
Kojto 115:87f2f5183dfb 2139 MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI2SEL, (uint32_t)(__SOURCE__))
Kojto 115:87f2f5183dfb 2140
Kojto 115:87f2f5183dfb 2141
Kojto 115:87f2f5183dfb 2142 /** @brief Macro to get the SAI2 clock source.
Kojto 115:87f2f5183dfb 2143 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2144 * @arg RCC_SAI2CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used
Kojto 115:87f2f5183dfb 2145 * as SAI2 clock.
Kojto 115:87f2f5183dfb 2146 * @arg RCC_SAI2CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used
Kojto 115:87f2f5183dfb 2147 * as SAI2 clock.
Kojto 115:87f2f5183dfb 2148 * @arg RCC_SAI2CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin
Kojto 115:87f2f5183dfb 2149 * used as SAI2 clock.
Kojto 115:87f2f5183dfb 2150 */
Kojto 115:87f2f5183dfb 2151 #define __HAL_RCC_GET_SAI2_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI2SEL)))
Kojto 115:87f2f5183dfb 2152
Kojto 115:87f2f5183dfb 2153
Kojto 115:87f2f5183dfb 2154 /** @brief Enable PLLSAI_RDY interrupt.
Kojto 115:87f2f5183dfb 2155 */
Kojto 115:87f2f5183dfb 2156 #define __HAL_RCC_PLLSAI_ENABLE_IT() (RCC->CIR |= (RCC_CIR_PLLSAIRDYIE))
Kojto 115:87f2f5183dfb 2157
Kojto 115:87f2f5183dfb 2158 /** @brief Disable PLLSAI_RDY interrupt.
Kojto 115:87f2f5183dfb 2159 */
Kojto 115:87f2f5183dfb 2160 #define __HAL_RCC_PLLSAI_DISABLE_IT() (RCC->CIR &= ~(RCC_CIR_PLLSAIRDYIE))
Kojto 115:87f2f5183dfb 2161
Kojto 115:87f2f5183dfb 2162 /** @brief Clear the PLLSAI RDY interrupt pending bits.
Kojto 115:87f2f5183dfb 2163 */
Kojto 115:87f2f5183dfb 2164 #define __HAL_RCC_PLLSAI_CLEAR_IT() (RCC->CIR |= (RCC_CIR_PLLSAIRDYF))
Kojto 115:87f2f5183dfb 2165
Kojto 115:87f2f5183dfb 2166 /** @brief Check the PLLSAI RDY interrupt has occurred or not.
Kojto 115:87f2f5183dfb 2167 * @retval The new state (TRUE or FALSE).
Kojto 115:87f2f5183dfb 2168 */
Kojto 115:87f2f5183dfb 2169 #define __HAL_RCC_PLLSAI_GET_IT() ((RCC->CIR & (RCC_CIR_PLLSAIRDYIE)) == (RCC_CIR_PLLSAIRDYIE))
Kojto 115:87f2f5183dfb 2170
Kojto 115:87f2f5183dfb 2171 /** @brief Check PLLSAI RDY flag is set or not.
Kojto 115:87f2f5183dfb 2172 * @retval The new state (TRUE or FALSE).
Kojto 115:87f2f5183dfb 2173 */
Kojto 115:87f2f5183dfb 2174 #define __HAL_RCC_PLLSAI_GET_FLAG() ((RCC->CR & (RCC_CR_PLLSAIRDY)) == (RCC_CR_PLLSAIRDY))
Kojto 115:87f2f5183dfb 2175
Kojto 115:87f2f5183dfb 2176 /** @brief Macro to Get I2S clock source selection.
Kojto 115:87f2f5183dfb 2177 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2178 * @arg RCC_I2SCLKSOURCE_PLLI2S: PLLI2S VCO output clock divided by PLLI2SR used as I2S clock.
Kojto 115:87f2f5183dfb 2179 * @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin used as I2S clock source
Kojto 115:87f2f5183dfb 2180 */
Kojto 115:87f2f5183dfb 2181 #define __HAL_RCC_GET_I2SCLKSOURCE() (READ_BIT(RCC->CFGR, RCC_CFGR_I2SSRC))
Kojto 115:87f2f5183dfb 2182
Kojto 115:87f2f5183dfb 2183 /** @brief Macro to configure the I2C1 clock (I2C1CLK).
Kojto 115:87f2f5183dfb 2184 *
Kojto 115:87f2f5183dfb 2185 * @param __I2C1_CLKSOURCE__: specifies the I2C1 clock source.
Kojto 115:87f2f5183dfb 2186 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2187 * @arg RCC_I2C1CLKSOURCE_PCLK1: PCLK1 selected as I2C1 clock
Kojto 115:87f2f5183dfb 2188 * @arg RCC_I2C1CLKSOURCE_HSI: HSI selected as I2C1 clock
Kojto 115:87f2f5183dfb 2189 * @arg RCC_I2C1CLKSOURCE_SYSCLK: System Clock selected as I2C1 clock
Kojto 115:87f2f5183dfb 2190 */
Kojto 115:87f2f5183dfb 2191 #define __HAL_RCC_I2C1_CONFIG(__I2C1_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2192 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C1SEL, (uint32_t)(__I2C1_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2193
Kojto 115:87f2f5183dfb 2194 /** @brief Macro to get the I2C1 clock source.
Kojto 115:87f2f5183dfb 2195 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2196 * @arg RCC_I2C1CLKSOURCE_PCLK1: PCLK1 selected as I2C1 clock
Kojto 115:87f2f5183dfb 2197 * @arg RCC_I2C1CLKSOURCE_HSI: HSI selected as I2C1 clock
Kojto 115:87f2f5183dfb 2198 * @arg RCC_I2C1CLKSOURCE_SYSCLK: System Clock selected as I2C1 clock
Kojto 115:87f2f5183dfb 2199 */
Kojto 115:87f2f5183dfb 2200 #define __HAL_RCC_GET_I2C1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C1SEL)))
Kojto 115:87f2f5183dfb 2201
Kojto 115:87f2f5183dfb 2202 /** @brief Macro to configure the I2C2 clock (I2C2CLK).
Kojto 115:87f2f5183dfb 2203 *
Kojto 115:87f2f5183dfb 2204 * @param __I2C2_CLKSOURCE__: specifies the I2C2 clock source.
Kojto 115:87f2f5183dfb 2205 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2206 * @arg RCC_I2C2CLKSOURCE_PCLK1: PCLK1 selected as I2C2 clock
Kojto 115:87f2f5183dfb 2207 * @arg RCC_I2C2CLKSOURCE_HSI: HSI selected as I2C2 clock
Kojto 115:87f2f5183dfb 2208 * @arg RCC_I2C2CLKSOURCE_SYSCLK: System Clock selected as I2C2 clock
Kojto 115:87f2f5183dfb 2209 */
Kojto 115:87f2f5183dfb 2210 #define __HAL_RCC_I2C2_CONFIG(__I2C2_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2211 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C2SEL, (uint32_t)(__I2C2_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2212
Kojto 115:87f2f5183dfb 2213 /** @brief Macro to get the I2C2 clock source.
Kojto 115:87f2f5183dfb 2214 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2215 * @arg RCC_I2C2CLKSOURCE_PCLK1: PCLK1 selected as I2C2 clock
Kojto 115:87f2f5183dfb 2216 * @arg RCC_I2C2CLKSOURCE_HSI: HSI selected as I2C2 clock
Kojto 115:87f2f5183dfb 2217 * @arg RCC_I2C2CLKSOURCE_SYSCLK: System Clock selected as I2C2 clock
Kojto 115:87f2f5183dfb 2218 */
Kojto 115:87f2f5183dfb 2219 #define __HAL_RCC_GET_I2C2_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C2SEL)))
Kojto 115:87f2f5183dfb 2220
Kojto 115:87f2f5183dfb 2221 /** @brief Macro to configure the I2C3 clock (I2C3CLK).
Kojto 115:87f2f5183dfb 2222 *
Kojto 115:87f2f5183dfb 2223 * @param __I2C3_CLKSOURCE__: specifies the I2C3 clock source.
Kojto 115:87f2f5183dfb 2224 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2225 * @arg RCC_I2C3CLKSOURCE_PCLK1: PCLK1 selected as I2C3 clock
Kojto 115:87f2f5183dfb 2226 * @arg RCC_I2C3CLKSOURCE_HSI: HSI selected as I2C3 clock
Kojto 115:87f2f5183dfb 2227 * @arg RCC_I2C3CLKSOURCE_SYSCLK: System Clock selected as I2C3 clock
Kojto 115:87f2f5183dfb 2228 */
Kojto 115:87f2f5183dfb 2229 #define __HAL_RCC_I2C3_CONFIG(__I2C3_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2230 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C3SEL, (uint32_t)(__I2C3_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2231
Kojto 115:87f2f5183dfb 2232 /** @brief macro to get the I2C3 clock source.
Kojto 115:87f2f5183dfb 2233 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2234 * @arg RCC_I2C3CLKSOURCE_PCLK1: PCLK1 selected as I2C3 clock
Kojto 115:87f2f5183dfb 2235 * @arg RCC_I2C3CLKSOURCE_HSI: HSI selected as I2C3 clock
Kojto 115:87f2f5183dfb 2236 * @arg RCC_I2C3CLKSOURCE_SYSCLK: System Clock selected as I2C3 clock
Kojto 115:87f2f5183dfb 2237 */
Kojto 115:87f2f5183dfb 2238 #define __HAL_RCC_GET_I2C3_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C3SEL)))
Kojto 115:87f2f5183dfb 2239
Kojto 115:87f2f5183dfb 2240 /** @brief Macro to configure the I2C4 clock (I2C4CLK).
Kojto 115:87f2f5183dfb 2241 *
Kojto 115:87f2f5183dfb 2242 * @param __I2C4_CLKSOURCE__: specifies the I2C4 clock source.
Kojto 115:87f2f5183dfb 2243 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2244 * @arg RCC_I2C4CLKSOURCE_PCLK1: PCLK1 selected as I2C4 clock
Kojto 115:87f2f5183dfb 2245 * @arg RCC_I2C4CLKSOURCE_HSI: HSI selected as I2C4 clock
Kojto 115:87f2f5183dfb 2246 * @arg RCC_I2C4CLKSOURCE_SYSCLK: System Clock selected as I2C4 clock
Kojto 115:87f2f5183dfb 2247 */
Kojto 115:87f2f5183dfb 2248 #define __HAL_RCC_I2C4_CONFIG(__I2C4_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2249 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C4SEL, (uint32_t)(__I2C4_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2250
Kojto 115:87f2f5183dfb 2251 /** @brief macro to get the I2C4 clock source.
Kojto 115:87f2f5183dfb 2252 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2253 * @arg RCC_I2C4CLKSOURCE_PCLK1: PCLK1 selected as I2C4 clock
Kojto 115:87f2f5183dfb 2254 * @arg RCC_I2C4CLKSOURCE_HSI: HSI selected as I2C4 clock
Kojto 115:87f2f5183dfb 2255 * @arg RCC_I2C4CLKSOURCE_SYSCLK: System Clock selected as I2C4 clock
Kojto 115:87f2f5183dfb 2256 */
Kojto 115:87f2f5183dfb 2257 #define __HAL_RCC_GET_I2C4_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C4SEL)))
Kojto 115:87f2f5183dfb 2258
Kojto 115:87f2f5183dfb 2259 /** @brief Macro to configure the USART1 clock (USART1CLK).
Kojto 115:87f2f5183dfb 2260 *
Kojto 115:87f2f5183dfb 2261 * @param __USART1_CLKSOURCE__: specifies the USART1 clock source.
Kojto 115:87f2f5183dfb 2262 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2263 * @arg RCC_USART1CLKSOURCE_PCLK2: PCLK2 selected as USART1 clock
Kojto 115:87f2f5183dfb 2264 * @arg RCC_USART1CLKSOURCE_HSI: HSI selected as USART1 clock
Kojto 115:87f2f5183dfb 2265 * @arg RCC_USART1CLKSOURCE_SYSCLK: System Clock selected as USART1 clock
Kojto 115:87f2f5183dfb 2266 * @arg RCC_USART1CLKSOURCE_LSE: LSE selected as USART1 clock
Kojto 115:87f2f5183dfb 2267 */
Kojto 115:87f2f5183dfb 2268 #define __HAL_RCC_USART1_CONFIG(__USART1_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2269 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART1SEL, (uint32_t)(__USART1_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2270
Kojto 115:87f2f5183dfb 2271 /** @brief macro to get the USART1 clock source.
Kojto 115:87f2f5183dfb 2272 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2273 * @arg RCC_USART1CLKSOURCE_PCLK2: PCLK2 selected as USART1 clock
Kojto 115:87f2f5183dfb 2274 * @arg RCC_USART1CLKSOURCE_HSI: HSI selected as USART1 clock
Kojto 115:87f2f5183dfb 2275 * @arg RCC_USART1CLKSOURCE_SYSCLK: System Clock selected as USART1 clock
Kojto 115:87f2f5183dfb 2276 * @arg RCC_USART1CLKSOURCE_LSE: LSE selected as USART1 clock
Kojto 115:87f2f5183dfb 2277 */
Kojto 115:87f2f5183dfb 2278 #define __HAL_RCC_GET_USART1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART1SEL)))
Kojto 115:87f2f5183dfb 2279
Kojto 115:87f2f5183dfb 2280 /** @brief Macro to configure the USART2 clock (USART2CLK).
Kojto 115:87f2f5183dfb 2281 *
Kojto 115:87f2f5183dfb 2282 * @param __USART2_CLKSOURCE__: specifies the USART2 clock source.
Kojto 115:87f2f5183dfb 2283 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2284 * @arg RCC_USART2CLKSOURCE_PCLK1: PCLK1 selected as USART2 clock
Kojto 115:87f2f5183dfb 2285 * @arg RCC_USART2CLKSOURCE_HSI: HSI selected as USART2 clock
Kojto 115:87f2f5183dfb 2286 * @arg RCC_USART2CLKSOURCE_SYSCLK: System Clock selected as USART2 clock
Kojto 115:87f2f5183dfb 2287 * @arg RCC_USART2CLKSOURCE_LSE: LSE selected as USART2 clock
Kojto 115:87f2f5183dfb 2288 */
Kojto 115:87f2f5183dfb 2289 #define __HAL_RCC_USART2_CONFIG(__USART2_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2290 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART2SEL, (uint32_t)(__USART2_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2291
Kojto 115:87f2f5183dfb 2292 /** @brief macro to get the USART2 clock source.
Kojto 115:87f2f5183dfb 2293 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2294 * @arg RCC_USART2CLKSOURCE_PCLK1: PCLK1 selected as USART2 clock
Kojto 115:87f2f5183dfb 2295 * @arg RCC_USART2CLKSOURCE_HSI: HSI selected as USART2 clock
Kojto 115:87f2f5183dfb 2296 * @arg RCC_USART2CLKSOURCE_SYSCLK: System Clock selected as USART2 clock
Kojto 115:87f2f5183dfb 2297 * @arg RCC_USART2CLKSOURCE_LSE: LSE selected as USART2 clock
Kojto 115:87f2f5183dfb 2298 */
Kojto 115:87f2f5183dfb 2299 #define __HAL_RCC_GET_USART2_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART2SEL)))
Kojto 115:87f2f5183dfb 2300
Kojto 115:87f2f5183dfb 2301 /** @brief Macro to configure the USART3 clock (USART3CLK).
Kojto 115:87f2f5183dfb 2302 *
Kojto 115:87f2f5183dfb 2303 * @param __USART3_CLKSOURCE__: specifies the USART3 clock source.
Kojto 115:87f2f5183dfb 2304 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2305 * @arg RCC_USART3CLKSOURCE_PCLK1: PCLK1 selected as USART3 clock
Kojto 115:87f2f5183dfb 2306 * @arg RCC_USART3CLKSOURCE_HSI: HSI selected as USART3 clock
Kojto 115:87f2f5183dfb 2307 * @arg RCC_USART3CLKSOURCE_SYSCLK: System Clock selected as USART3 clock
Kojto 115:87f2f5183dfb 2308 * @arg RCC_USART3CLKSOURCE_LSE: LSE selected as USART3 clock
Kojto 115:87f2f5183dfb 2309 */
Kojto 115:87f2f5183dfb 2310 #define __HAL_RCC_USART3_CONFIG(__USART3_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2311 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART3SEL, (uint32_t)(__USART3_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2312
Kojto 115:87f2f5183dfb 2313 /** @brief macro to get the USART3 clock source.
Kojto 115:87f2f5183dfb 2314 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2315 * @arg RCC_USART3CLKSOURCE_PCLK1: PCLK1 selected as USART3 clock
Kojto 115:87f2f5183dfb 2316 * @arg RCC_USART3CLKSOURCE_HSI: HSI selected as USART3 clock
Kojto 115:87f2f5183dfb 2317 * @arg RCC_USART3CLKSOURCE_SYSCLK: System Clock selected as USART3 clock
Kojto 115:87f2f5183dfb 2318 * @arg RCC_USART3CLKSOURCE_LSE: LSE selected as USART3 clock
Kojto 115:87f2f5183dfb 2319 */
Kojto 115:87f2f5183dfb 2320 #define __HAL_RCC_GET_USART3_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART3SEL)))
Kojto 115:87f2f5183dfb 2321
Kojto 115:87f2f5183dfb 2322 /** @brief Macro to configure the UART4 clock (UART4CLK).
Kojto 115:87f2f5183dfb 2323 *
Kojto 115:87f2f5183dfb 2324 * @param __UART4_CLKSOURCE__: specifies the UART4 clock source.
Kojto 115:87f2f5183dfb 2325 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2326 * @arg RCC_UART4CLKSOURCE_PCLK1: PCLK1 selected as UART4 clock
Kojto 115:87f2f5183dfb 2327 * @arg RCC_UART4CLKSOURCE_HSI: HSI selected as UART4 clock
Kojto 115:87f2f5183dfb 2328 * @arg RCC_UART4CLKSOURCE_SYSCLK: System Clock selected as UART4 clock
Kojto 115:87f2f5183dfb 2329 * @arg RCC_UART4CLKSOURCE_LSE: LSE selected as UART4 clock
Kojto 115:87f2f5183dfb 2330 */
Kojto 115:87f2f5183dfb 2331 #define __HAL_RCC_UART4_CONFIG(__UART4_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2332 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART4SEL, (uint32_t)(__UART4_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2333
Kojto 115:87f2f5183dfb 2334 /** @brief macro to get the UART4 clock source.
Kojto 115:87f2f5183dfb 2335 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2336 * @arg RCC_UART4CLKSOURCE_PCLK1: PCLK1 selected as UART4 clock
Kojto 115:87f2f5183dfb 2337 * @arg RCC_UART4CLKSOURCE_HSI: HSI selected as UART4 clock
Kojto 115:87f2f5183dfb 2338 * @arg RCC_UART4CLKSOURCE_SYSCLK: System Clock selected as UART4 clock
Kojto 115:87f2f5183dfb 2339 * @arg RCC_UART4CLKSOURCE_LSE: LSE selected as UART4 clock
Kojto 115:87f2f5183dfb 2340 */
Kojto 115:87f2f5183dfb 2341 #define __HAL_RCC_GET_UART4_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART4SEL)))
Kojto 115:87f2f5183dfb 2342
Kojto 115:87f2f5183dfb 2343 /** @brief Macro to configure the UART5 clock (UART5CLK).
Kojto 115:87f2f5183dfb 2344 *
Kojto 115:87f2f5183dfb 2345 * @param __UART5_CLKSOURCE__: specifies the UART5 clock source.
Kojto 115:87f2f5183dfb 2346 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2347 * @arg RCC_UART5CLKSOURCE_PCLK1: PCLK1 selected as UART5 clock
Kojto 115:87f2f5183dfb 2348 * @arg RCC_UART5CLKSOURCE_HSI: HSI selected as UART5 clock
Kojto 115:87f2f5183dfb 2349 * @arg RCC_UART5CLKSOURCE_SYSCLK: System Clock selected as UART5 clock
Kojto 115:87f2f5183dfb 2350 * @arg RCC_UART5CLKSOURCE_LSE: LSE selected as UART5 clock
Kojto 115:87f2f5183dfb 2351 */
Kojto 115:87f2f5183dfb 2352 #define __HAL_RCC_UART5_CONFIG(__UART5_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2353 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART5SEL, (uint32_t)(__UART5_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2354
Kojto 115:87f2f5183dfb 2355 /** @brief macro to get the UART5 clock source.
Kojto 115:87f2f5183dfb 2356 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2357 * @arg RCC_UART5CLKSOURCE_PCLK1: PCLK1 selected as UART5 clock
Kojto 115:87f2f5183dfb 2358 * @arg RCC_UART5CLKSOURCE_HSI: HSI selected as UART5 clock
Kojto 115:87f2f5183dfb 2359 * @arg RCC_UART5CLKSOURCE_SYSCLK: System Clock selected as UART5 clock
Kojto 115:87f2f5183dfb 2360 * @arg RCC_UART5CLKSOURCE_LSE: LSE selected as UART5 clock
Kojto 115:87f2f5183dfb 2361 */
Kojto 115:87f2f5183dfb 2362 #define __HAL_RCC_GET_UART5_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART5SEL)))
Kojto 115:87f2f5183dfb 2363
Kojto 115:87f2f5183dfb 2364 /** @brief Macro to configure the USART6 clock (USART6CLK).
Kojto 115:87f2f5183dfb 2365 *
Kojto 115:87f2f5183dfb 2366 * @param __USART6_CLKSOURCE__: specifies the USART6 clock source.
Kojto 115:87f2f5183dfb 2367 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2368 * @arg RCC_USART6CLKSOURCE_PCLK1: PCLK1 selected as USART6 clock
Kojto 115:87f2f5183dfb 2369 * @arg RCC_USART6CLKSOURCE_HSI: HSI selected as USART6 clock
Kojto 115:87f2f5183dfb 2370 * @arg RCC_USART6CLKSOURCE_SYSCLK: System Clock selected as USART6 clock
Kojto 115:87f2f5183dfb 2371 * @arg RCC_USART6CLKSOURCE_LSE: LSE selected as USART6 clock
Kojto 115:87f2f5183dfb 2372 */
Kojto 115:87f2f5183dfb 2373 #define __HAL_RCC_USART6_CONFIG(__USART6_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2374 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART6SEL, (uint32_t)(__USART6_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2375
Kojto 115:87f2f5183dfb 2376 /** @brief macro to get the USART6 clock source.
Kojto 115:87f2f5183dfb 2377 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2378 * @arg RCC_USART6CLKSOURCE_PCLK1: PCLK1 selected as USART6 clock
Kojto 115:87f2f5183dfb 2379 * @arg RCC_USART6CLKSOURCE_HSI: HSI selected as USART6 clock
Kojto 115:87f2f5183dfb 2380 * @arg RCC_USART6CLKSOURCE_SYSCLK: System Clock selected as USART6 clock
Kojto 115:87f2f5183dfb 2381 * @arg RCC_USART6CLKSOURCE_LSE: LSE selected as USART6 clock
Kojto 115:87f2f5183dfb 2382 */
Kojto 115:87f2f5183dfb 2383 #define __HAL_RCC_GET_USART6_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART6SEL)))
Kojto 115:87f2f5183dfb 2384
Kojto 115:87f2f5183dfb 2385 /** @brief Macro to configure the UART7 clock (UART7CLK).
Kojto 115:87f2f5183dfb 2386 *
Kojto 115:87f2f5183dfb 2387 * @param __UART7_CLKSOURCE__: specifies the UART7 clock source.
Kojto 115:87f2f5183dfb 2388 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2389 * @arg RCC_UART7CLKSOURCE_PCLK1: PCLK1 selected as UART7 clock
Kojto 115:87f2f5183dfb 2390 * @arg RCC_UART7CLKSOURCE_HSI: HSI selected as UART7 clock
Kojto 115:87f2f5183dfb 2391 * @arg RCC_UART7CLKSOURCE_SYSCLK: System Clock selected as UART7 clock
Kojto 115:87f2f5183dfb 2392 * @arg RCC_UART7CLKSOURCE_LSE: LSE selected as UART7 clock
Kojto 115:87f2f5183dfb 2393 */
Kojto 115:87f2f5183dfb 2394 #define __HAL_RCC_UART7_CONFIG(__UART7_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2395 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART7SEL, (uint32_t)(__UART7_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2396
Kojto 115:87f2f5183dfb 2397 /** @brief macro to get the UART7 clock source.
Kojto 115:87f2f5183dfb 2398 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2399 * @arg RCC_UART7CLKSOURCE_PCLK1: PCLK1 selected as UART7 clock
Kojto 115:87f2f5183dfb 2400 * @arg RCC_UART7CLKSOURCE_HSI: HSI selected as UART7 clock
Kojto 115:87f2f5183dfb 2401 * @arg RCC_UART7CLKSOURCE_SYSCLK: System Clock selected as UART7 clock
Kojto 115:87f2f5183dfb 2402 * @arg RCC_UART7CLKSOURCE_LSE: LSE selected as UART7 clock
Kojto 115:87f2f5183dfb 2403 */
Kojto 115:87f2f5183dfb 2404 #define __HAL_RCC_GET_UART7_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART7SEL)))
Kojto 115:87f2f5183dfb 2405
Kojto 115:87f2f5183dfb 2406 /** @brief Macro to configure the UART8 clock (UART8CLK).
Kojto 115:87f2f5183dfb 2407 *
Kojto 115:87f2f5183dfb 2408 * @param __UART8_CLKSOURCE__: specifies the UART8 clock source.
Kojto 115:87f2f5183dfb 2409 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2410 * @arg RCC_UART8CLKSOURCE_PCLK1: PCLK1 selected as UART8 clock
Kojto 115:87f2f5183dfb 2411 * @arg RCC_UART8CLKSOURCE_HSI: HSI selected as UART8 clock
Kojto 115:87f2f5183dfb 2412 * @arg RCC_UART8CLKSOURCE_SYSCLK: System Clock selected as UART8 clock
Kojto 115:87f2f5183dfb 2413 * @arg RCC_UART8CLKSOURCE_LSE: LSE selected as UART8 clock
Kojto 115:87f2f5183dfb 2414 */
Kojto 115:87f2f5183dfb 2415 #define __HAL_RCC_UART8_CONFIG(__UART8_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2416 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART8SEL, (uint32_t)(__UART8_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2417
Kojto 115:87f2f5183dfb 2418 /** @brief macro to get the UART8 clock source.
Kojto 115:87f2f5183dfb 2419 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2420 * @arg RCC_UART8CLKSOURCE_PCLK1: PCLK1 selected as UART8 clock
Kojto 115:87f2f5183dfb 2421 * @arg RCC_UART8CLKSOURCE_HSI: HSI selected as UART8 clock
Kojto 115:87f2f5183dfb 2422 * @arg RCC_UART8CLKSOURCE_SYSCLK: System Clock selected as UART8 clock
Kojto 115:87f2f5183dfb 2423 * @arg RCC_UART8CLKSOURCE_LSE: LSE selected as UART8 clock
Kojto 115:87f2f5183dfb 2424 */
Kojto 115:87f2f5183dfb 2425 #define __HAL_RCC_GET_UART8_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART8SEL)))
Kojto 115:87f2f5183dfb 2426
Kojto 115:87f2f5183dfb 2427 /** @brief Macro to configure the LPTIM1 clock (LPTIM1CLK).
Kojto 115:87f2f5183dfb 2428 *
Kojto 115:87f2f5183dfb 2429 * @param __LPTIM1_CLKSOURCE__: specifies the LPTIM1 clock source.
Kojto 115:87f2f5183dfb 2430 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2431 * @arg RCC_LPTIM1CLKSOURCE_PCLK: PCLK selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2432 * @arg RCC_LPTIM1CLKSOURCE_HSI: HSI selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2433 * @arg RCC_LPTIM1CLKSOURCE_LSI: LSI selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2434 * @arg RCC_LPTIM1CLKSOURCE_LSE: LSE selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2435 */
Kojto 115:87f2f5183dfb 2436 #define __HAL_RCC_LPTIM1_CONFIG(__LPTIM1_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2437 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_LPTIM1SEL, (uint32_t)(__LPTIM1_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2438
Kojto 115:87f2f5183dfb 2439 /** @brief macro to get the LPTIM1 clock source.
Kojto 115:87f2f5183dfb 2440 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2441 * @arg RCC_LPTIM1CLKSOURCE_PCLK: PCLK selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2442 * @arg RCC_LPTIM1CLKSOURCE_HSI: HSI selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2443 * @arg RCC_LPTIM1CLKSOURCE_LSI: LSI selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2444 * @arg RCC_LPTIM1CLKSOURCE_LSE: LSE selected as LPTIM1 clock
Kojto 115:87f2f5183dfb 2445 */
Kojto 115:87f2f5183dfb 2446 #define __HAL_RCC_GET_LPTIM1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_LPTIM1SEL)))
Kojto 115:87f2f5183dfb 2447
Kojto 115:87f2f5183dfb 2448 /** @brief Macro to configure the CEC clock (CECCLK).
Kojto 115:87f2f5183dfb 2449 *
Kojto 115:87f2f5183dfb 2450 * @param __CEC_CLKSOURCE__: specifies the CEC clock source.
Kojto 115:87f2f5183dfb 2451 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2452 * @arg RCC_CECCLKSOURCE_LSE: LSE selected as CEC clock
Kojto 115:87f2f5183dfb 2453 * @arg RCC_CECCLKSOURCE_HSI: HSI selected as CEC clock
Kojto 115:87f2f5183dfb 2454 */
Kojto 115:87f2f5183dfb 2455 #define __HAL_RCC_CEC_CONFIG(__CEC_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2456 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_CECSEL, (uint32_t)(__CEC_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2457
Kojto 115:87f2f5183dfb 2458 /** @brief macro to get the CEC clock source.
Kojto 115:87f2f5183dfb 2459 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2460 * @arg RCC_CECCLKSOURCE_LSE: LSE selected as CEC clock
Kojto 115:87f2f5183dfb 2461 * @arg RCC_CECCLKSOURCE_HSI: HSI selected as CEC clock
Kojto 115:87f2f5183dfb 2462 */
Kojto 115:87f2f5183dfb 2463 #define __HAL_RCC_GET_CEC_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_CECSEL)))
Kojto 115:87f2f5183dfb 2464
Kojto 115:87f2f5183dfb 2465 /** @brief Macro to configure the CLK48 source (CLK48CLK).
Kojto 115:87f2f5183dfb 2466 *
Kojto 115:87f2f5183dfb 2467 * @param __CLK48_SOURCE__: specifies the CLK48 clock source.
Kojto 115:87f2f5183dfb 2468 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2469 * @arg RCC_CLK48SOURCE_PLL: PLL selected as CLK48 source
Kojto 115:87f2f5183dfb 2470 * @arg RCC_CLK48SOURCE_PLSAI1: PLLSAI1 selected as CLK48 source
Kojto 115:87f2f5183dfb 2471 */
Kojto 115:87f2f5183dfb 2472 #define __HAL_RCC_CLK48_CONFIG(__CLK48_SOURCE__) \
Kojto 115:87f2f5183dfb 2473 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_CK48MSEL, (uint32_t)(__CLK48_SOURCE__))
Kojto 115:87f2f5183dfb 2474
Kojto 115:87f2f5183dfb 2475 /** @brief macro to get the CLK48 source.
Kojto 115:87f2f5183dfb 2476 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2477 * @arg RCC_CLK48SOURCE_PLL: PLL used as CLK48 source
Kojto 115:87f2f5183dfb 2478 * @arg RCC_CLK48SOURCE_PLSAI1: PLLSAI1 used as CLK48 source
Kojto 115:87f2f5183dfb 2479 */
Kojto 115:87f2f5183dfb 2480 #define __HAL_RCC_GET_CLK48_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_CK48MSEL)))
Kojto 115:87f2f5183dfb 2481
Kojto 115:87f2f5183dfb 2482 /** @brief Macro to configure the SDMMC1 clock (SDMMC1CLK).
Kojto 115:87f2f5183dfb 2483 *
Kojto 115:87f2f5183dfb 2484 * @param __SDMMC1_CLKSOURCE__: specifies the SDMMC1 clock source.
Kojto 115:87f2f5183dfb 2485 * This parameter can be one of the following values:
Kojto 115:87f2f5183dfb 2486 * @arg RCC_SDMMC1CLKSOURCE_CLK48: CLK48 selected as SDMMC clock
Kojto 115:87f2f5183dfb 2487 * @arg RCC_SDMMC1CLKSOURCE_SYSCLK: SYSCLK selected as SDMMC clock
Kojto 115:87f2f5183dfb 2488 */
Kojto 115:87f2f5183dfb 2489 #define __HAL_RCC_SDMMC1_CONFIG(__SDMMC1_CLKSOURCE__) \
Kojto 115:87f2f5183dfb 2490 MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_SDMMC1SEL, (uint32_t)(__SDMMC1_CLKSOURCE__))
Kojto 115:87f2f5183dfb 2491
Kojto 115:87f2f5183dfb 2492 /** @brief macro to get the SDMMC1 clock source.
Kojto 115:87f2f5183dfb 2493 * @retval The clock source can be one of the following values:
Kojto 115:87f2f5183dfb 2494 * @arg RCC_SDMMC1CLKSOURCE_CLK48: CLK48 selected as SDMMC1 clock
Kojto 115:87f2f5183dfb 2495 * @arg RCC_SDMMC1CLKSOURCE_SYSCLK: SYSCLK selected as SDMMC1 clock
Kojto 115:87f2f5183dfb 2496 */
Kojto 115:87f2f5183dfb 2497 #define __HAL_RCC_GET_SDMMC1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_SDMMC1SEL)))
Kojto 115:87f2f5183dfb 2498
Kojto 115:87f2f5183dfb 2499 /**
Kojto 115:87f2f5183dfb 2500 * @}
Kojto 115:87f2f5183dfb 2501 */
Kojto 115:87f2f5183dfb 2502
Kojto 115:87f2f5183dfb 2503 /* Exported functions --------------------------------------------------------*/
Kojto 115:87f2f5183dfb 2504 /** @addtogroup RCCEx_Exported_Functions_Group1
Kojto 115:87f2f5183dfb 2505 * @{
Kojto 115:87f2f5183dfb 2506 */
Kojto 115:87f2f5183dfb 2507 HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
Kojto 115:87f2f5183dfb 2508 void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
Kojto 115:87f2f5183dfb 2509 uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk);
Kojto 115:87f2f5183dfb 2510
Kojto 115:87f2f5183dfb 2511 /**
Kojto 115:87f2f5183dfb 2512 * @}
Kojto 115:87f2f5183dfb 2513 */
Kojto 115:87f2f5183dfb 2514 /* Private macros ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 2515 /** @addtogroup RCCEx_Private_Macros RCCEx Private Macros
Kojto 115:87f2f5183dfb 2516 * @{
Kojto 115:87f2f5183dfb 2517 */
Kojto 115:87f2f5183dfb 2518 /** @defgroup RCCEx_IS_RCC_Definitions RCC Private macros to check input parameters
Kojto 115:87f2f5183dfb 2519 * @{
Kojto 115:87f2f5183dfb 2520 */
Kojto 115:87f2f5183dfb 2521 #if defined(STM32F756xx) || defined(STM32F746xx)
Kojto 115:87f2f5183dfb 2522 #define IS_RCC_PERIPHCLOCK(SELECTION) \
Kojto 115:87f2f5183dfb 2523 ((((SELECTION) & RCC_PERIPHCLK_I2S) == RCC_PERIPHCLK_I2S) || \
Kojto 115:87f2f5183dfb 2524 (((SELECTION) & RCC_PERIPHCLK_LTDC) == RCC_PERIPHCLK_LTDC) || \
Kojto 115:87f2f5183dfb 2525 (((SELECTION) & RCC_PERIPHCLK_TIM) == RCC_PERIPHCLK_TIM) || \
Kojto 115:87f2f5183dfb 2526 (((SELECTION) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1) || \
Kojto 115:87f2f5183dfb 2527 (((SELECTION) & RCC_PERIPHCLK_USART2) == RCC_PERIPHCLK_USART2) || \
Kojto 115:87f2f5183dfb 2528 (((SELECTION) & RCC_PERIPHCLK_USART3) == RCC_PERIPHCLK_USART3) || \
Kojto 115:87f2f5183dfb 2529 (((SELECTION) & RCC_PERIPHCLK_UART4) == RCC_PERIPHCLK_UART4) || \
Kojto 115:87f2f5183dfb 2530 (((SELECTION) & RCC_PERIPHCLK_UART5) == RCC_PERIPHCLK_UART5) || \
Kojto 115:87f2f5183dfb 2531 (((SELECTION) & RCC_PERIPHCLK_USART6) == RCC_PERIPHCLK_USART6) || \
Kojto 115:87f2f5183dfb 2532 (((SELECTION) & RCC_PERIPHCLK_UART7) == RCC_PERIPHCLK_UART7) || \
Kojto 115:87f2f5183dfb 2533 (((SELECTION) & RCC_PERIPHCLK_UART8) == RCC_PERIPHCLK_UART8) || \
Kojto 115:87f2f5183dfb 2534 (((SELECTION) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1) || \
Kojto 115:87f2f5183dfb 2535 (((SELECTION) & RCC_PERIPHCLK_I2C2) == RCC_PERIPHCLK_I2C2) || \
Kojto 115:87f2f5183dfb 2536 (((SELECTION) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3) || \
Kojto 115:87f2f5183dfb 2537 (((SELECTION) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4) || \
Kojto 115:87f2f5183dfb 2538 (((SELECTION) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1) || \
Kojto 115:87f2f5183dfb 2539 (((SELECTION) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) || \
Kojto 115:87f2f5183dfb 2540 (((SELECTION) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) || \
Kojto 115:87f2f5183dfb 2541 (((SELECTION) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) || \
Kojto 115:87f2f5183dfb 2542 (((SELECTION) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC) || \
Kojto 115:87f2f5183dfb 2543 (((SELECTION) & RCC_PERIPHCLK_SDMMC1) == RCC_PERIPHCLK_SDMMC1) || \
Kojto 115:87f2f5183dfb 2544 (((SELECTION) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) || \
Kojto 115:87f2f5183dfb 2545 (((SELECTION) & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC))
Kojto 115:87f2f5183dfb 2546 #elif defined(STM32F745xx)
Kojto 115:87f2f5183dfb 2547 #define IS_RCC_PERIPHCLOCK(SELECTION) \
Kojto 115:87f2f5183dfb 2548 ((((SELECTION) & RCC_PERIPHCLK_I2S) == RCC_PERIPHCLK_I2S) || \
Kojto 115:87f2f5183dfb 2549 (((SELECTION) & RCC_PERIPHCLK_TIM) == RCC_PERIPHCLK_TIM) || \
Kojto 115:87f2f5183dfb 2550 (((SELECTION) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1) || \
Kojto 115:87f2f5183dfb 2551 (((SELECTION) & RCC_PERIPHCLK_USART2) == RCC_PERIPHCLK_USART2) || \
Kojto 115:87f2f5183dfb 2552 (((SELECTION) & RCC_PERIPHCLK_USART3) == RCC_PERIPHCLK_USART3) || \
Kojto 115:87f2f5183dfb 2553 (((SELECTION) & RCC_PERIPHCLK_UART4) == RCC_PERIPHCLK_UART4) || \
Kojto 115:87f2f5183dfb 2554 (((SELECTION) & RCC_PERIPHCLK_UART5) == RCC_PERIPHCLK_UART5) || \
Kojto 115:87f2f5183dfb 2555 (((SELECTION) & RCC_PERIPHCLK_USART6) == RCC_PERIPHCLK_USART6) || \
Kojto 115:87f2f5183dfb 2556 (((SELECTION) & RCC_PERIPHCLK_UART7) == RCC_PERIPHCLK_UART7) || \
Kojto 115:87f2f5183dfb 2557 (((SELECTION) & RCC_PERIPHCLK_UART8) == RCC_PERIPHCLK_UART8) || \
Kojto 115:87f2f5183dfb 2558 (((SELECTION) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1) || \
Kojto 115:87f2f5183dfb 2559 (((SELECTION) & RCC_PERIPHCLK_I2C2) == RCC_PERIPHCLK_I2C2) || \
Kojto 115:87f2f5183dfb 2560 (((SELECTION) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3) || \
Kojto 115:87f2f5183dfb 2561 (((SELECTION) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4) || \
Kojto 115:87f2f5183dfb 2562 (((SELECTION) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1) || \
Kojto 115:87f2f5183dfb 2563 (((SELECTION) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) || \
Kojto 115:87f2f5183dfb 2564 (((SELECTION) & RCC_PERIPHCLK_SAI2) == RCC_PERIPHCLK_SAI2) || \
Kojto 115:87f2f5183dfb 2565 (((SELECTION) & RCC_PERIPHCLK_CLK48) == RCC_PERIPHCLK_CLK48) || \
Kojto 115:87f2f5183dfb 2566 (((SELECTION) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC) || \
Kojto 115:87f2f5183dfb 2567 (((SELECTION) & RCC_PERIPHCLK_SDMMC1) == RCC_PERIPHCLK_SDMMC1) || \
Kojto 115:87f2f5183dfb 2568 (((SELECTION) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) || \
Kojto 115:87f2f5183dfb 2569 (((SELECTION) & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC))
Kojto 115:87f2f5183dfb 2570 #endif /* STM32F756xx || STM32F746xx */
Kojto 115:87f2f5183dfb 2571 #define IS_RCC_PLLI2SN_VALUE(VALUE) ((49 <= (VALUE)) && ((VALUE) <= 432))
Kojto 115:87f2f5183dfb 2572 #define IS_RCC_PLLI2SP_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 8))
Kojto 115:87f2f5183dfb 2573 #define IS_RCC_PLLI2SQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))
Kojto 115:87f2f5183dfb 2574 #define IS_RCC_PLLI2SR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
Kojto 115:87f2f5183dfb 2575
Kojto 115:87f2f5183dfb 2576 #define IS_RCC_PLLSAIN_VALUE(VALUE) ((49 <= (VALUE)) && ((VALUE) <= 432))
Kojto 115:87f2f5183dfb 2577 #define IS_RCC_PLLSAIP_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 8))
Kojto 115:87f2f5183dfb 2578 #define IS_RCC_PLLSAIQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))
Kojto 115:87f2f5183dfb 2579 #define IS_RCC_PLLSAIR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
Kojto 115:87f2f5183dfb 2580
Kojto 115:87f2f5183dfb 2581 #define IS_RCC_PLLSAI_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))
Kojto 115:87f2f5183dfb 2582
Kojto 115:87f2f5183dfb 2583 #define IS_RCC_PLLI2S_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))
Kojto 115:87f2f5183dfb 2584
Kojto 115:87f2f5183dfb 2585 #define IS_RCC_PLLSAI_DIVR_VALUE(VALUE) (((VALUE) == RCC_PLLSAIDIVR_2) ||\
Kojto 115:87f2f5183dfb 2586 ((VALUE) == RCC_PLLSAIDIVR_4) ||\
Kojto 115:87f2f5183dfb 2587 ((VALUE) == RCC_PLLSAIDIVR_8) ||\
Kojto 115:87f2f5183dfb 2588 ((VALUE) == RCC_PLLSAIDIVR_16))
Kojto 115:87f2f5183dfb 2589 #define IS_RCC_I2SCLKSOURCE(SOURCE) (((SOURCE) == RCC_I2SCLKSOURCE_PLLI2S) || \
Kojto 115:87f2f5183dfb 2590 ((SOURCE) == RCC_I2SCLKSOURCE_EXT))
Kojto 115:87f2f5183dfb 2591 #define IS_RCC_SAI1CLKSOURCE(SOURCE) (((SOURCE) == RCC_SAI1CLKSOURCE_PLLSAI) || \
Kojto 115:87f2f5183dfb 2592 ((SOURCE) == RCC_SAI1CLKSOURCE_PLLI2S) || \
Kojto 115:87f2f5183dfb 2593 ((SOURCE) == RCC_SAI1CLKSOURCE_PIN))
Kojto 115:87f2f5183dfb 2594 #define IS_RCC_SAI2CLKSOURCE(SOURCE) (((SOURCE) == RCC_SAI2CLKSOURCE_PLLSAI) || \
Kojto 115:87f2f5183dfb 2595 ((SOURCE) == RCC_SAI2CLKSOURCE_PLLI2S) || \
Kojto 115:87f2f5183dfb 2596 ((SOURCE) == RCC_SAI2CLKSOURCE_PIN))
Kojto 115:87f2f5183dfb 2597
Kojto 115:87f2f5183dfb 2598 #define IS_RCC_SDMMC1CLKSOURCE(SOURCE) (((SOURCE) == RCC_SDMMC1CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2599 ((SOURCE) == RCC_SDMMC1CLKSOURCE_CLK48))
Kojto 115:87f2f5183dfb 2600
Kojto 115:87f2f5183dfb 2601 #define IS_RCC_CECCLKSOURCE(SOURCE) (((SOURCE) == RCC_CECCLKSOURCE_HSI) || \
Kojto 115:87f2f5183dfb 2602 ((SOURCE) == RCC_CECCLKSOURCE_LSE))
Kojto 115:87f2f5183dfb 2603 #define IS_RCC_USART1CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2604 (((SOURCE) == RCC_USART1CLKSOURCE_PCLK2) || \
Kojto 115:87f2f5183dfb 2605 ((SOURCE) == RCC_USART1CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2606 ((SOURCE) == RCC_USART1CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2607 ((SOURCE) == RCC_USART1CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2608
Kojto 115:87f2f5183dfb 2609 #define IS_RCC_USART2CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2610 (((SOURCE) == RCC_USART2CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2611 ((SOURCE) == RCC_USART2CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2612 ((SOURCE) == RCC_USART2CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2613 ((SOURCE) == RCC_USART2CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2614 #define IS_RCC_USART3CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2615 (((SOURCE) == RCC_USART3CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2616 ((SOURCE) == RCC_USART3CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2617 ((SOURCE) == RCC_USART3CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2618 ((SOURCE) == RCC_USART3CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2619
Kojto 115:87f2f5183dfb 2620 #define IS_RCC_UART4CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2621 (((SOURCE) == RCC_UART4CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2622 ((SOURCE) == RCC_UART4CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2623 ((SOURCE) == RCC_UART4CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2624 ((SOURCE) == RCC_UART4CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2625
Kojto 115:87f2f5183dfb 2626 #define IS_RCC_UART5CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2627 (((SOURCE) == RCC_UART5CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2628 ((SOURCE) == RCC_UART5CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2629 ((SOURCE) == RCC_UART5CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2630 ((SOURCE) == RCC_UART5CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2631
Kojto 115:87f2f5183dfb 2632 #define IS_RCC_USART6CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2633 (((SOURCE) == RCC_USART6CLKSOURCE_PCLK2) || \
Kojto 115:87f2f5183dfb 2634 ((SOURCE) == RCC_USART6CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2635 ((SOURCE) == RCC_USART6CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2636 ((SOURCE) == RCC_USART6CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2637
Kojto 115:87f2f5183dfb 2638 #define IS_RCC_UART7CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2639 (((SOURCE) == RCC_UART7CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2640 ((SOURCE) == RCC_UART7CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2641 ((SOURCE) == RCC_UART7CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2642 ((SOURCE) == RCC_UART7CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2643
Kojto 115:87f2f5183dfb 2644 #define IS_RCC_UART8CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2645 (((SOURCE) == RCC_UART8CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2646 ((SOURCE) == RCC_UART8CLKSOURCE_SYSCLK) || \
Kojto 115:87f2f5183dfb 2647 ((SOURCE) == RCC_UART8CLKSOURCE_LSE) || \
Kojto 115:87f2f5183dfb 2648 ((SOURCE) == RCC_UART8CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2649 #define IS_RCC_I2C1CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2650 (((SOURCE) == RCC_I2C1CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2651 ((SOURCE) == RCC_I2C1CLKSOURCE_SYSCLK)|| \
Kojto 115:87f2f5183dfb 2652 ((SOURCE) == RCC_I2C1CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2653 #define IS_RCC_I2C2CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2654 (((SOURCE) == RCC_I2C2CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2655 ((SOURCE) == RCC_I2C2CLKSOURCE_SYSCLK)|| \
Kojto 115:87f2f5183dfb 2656 ((SOURCE) == RCC_I2C2CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2657
Kojto 115:87f2f5183dfb 2658 #define IS_RCC_I2C3CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2659 (((SOURCE) == RCC_I2C3CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2660 ((SOURCE) == RCC_I2C3CLKSOURCE_SYSCLK)|| \
Kojto 115:87f2f5183dfb 2661 ((SOURCE) == RCC_I2C3CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2662 #define IS_RCC_I2C4CLKSOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2663 (((SOURCE) == RCC_I2C4CLKSOURCE_PCLK1) || \
Kojto 115:87f2f5183dfb 2664 ((SOURCE) == RCC_I2C4CLKSOURCE_SYSCLK)|| \
Kojto 115:87f2f5183dfb 2665 ((SOURCE) == RCC_I2C4CLKSOURCE_HSI))
Kojto 115:87f2f5183dfb 2666 #define IS_RCC_LPTIM1CLK(SOURCE) \
Kojto 115:87f2f5183dfb 2667 (((SOURCE) == RCC_LPTIM1CLKSOURCE_PCLK) || \
Kojto 115:87f2f5183dfb 2668 ((SOURCE) == RCC_LPTIM1CLKSOURCE_LSI) || \
Kojto 115:87f2f5183dfb 2669 ((SOURCE) == RCC_LPTIM1CLKSOURCE_HSI) || \
Kojto 115:87f2f5183dfb 2670 ((SOURCE) == RCC_LPTIM1CLKSOURCE_LSE))
Kojto 115:87f2f5183dfb 2671 #define IS_RCC_CLK48SOURCE(SOURCE) \
Kojto 115:87f2f5183dfb 2672 (((SOURCE) == RCC_CLK48SOURCE_PLLSAIP) || \
Kojto 115:87f2f5183dfb 2673 ((SOURCE) == RCC_CLK48SOURCE_PLL))
Kojto 115:87f2f5183dfb 2674 #define IS_RCC_TIMPRES(VALUE) \
Kojto 115:87f2f5183dfb 2675 (((VALUE) == RCC_TIMPRES_DESACTIVATED) || \
Kojto 115:87f2f5183dfb 2676 ((VALUE) == RCC_TIMPRES_ACTIVATED))
Kojto 115:87f2f5183dfb 2677 /**
Kojto 115:87f2f5183dfb 2678 * @}
Kojto 115:87f2f5183dfb 2679 */
Kojto 115:87f2f5183dfb 2680
Kojto 115:87f2f5183dfb 2681 /**
Kojto 115:87f2f5183dfb 2682 * @}
Kojto 115:87f2f5183dfb 2683 */
Kojto 115:87f2f5183dfb 2684
Kojto 115:87f2f5183dfb 2685 /**
Kojto 115:87f2f5183dfb 2686 * @}
Kojto 115:87f2f5183dfb 2687 */
Kojto 115:87f2f5183dfb 2688
Kojto 115:87f2f5183dfb 2689 /**
Kojto 115:87f2f5183dfb 2690 * @}
Kojto 115:87f2f5183dfb 2691 */
Kojto 115:87f2f5183dfb 2692 #ifdef __cplusplus
Kojto 115:87f2f5183dfb 2693 }
Kojto 115:87f2f5183dfb 2694 #endif
Kojto 115:87f2f5183dfb 2695
Kojto 115:87f2f5183dfb 2696 #endif /* __STM32F7xx_HAL_RCC_EX_H */
Kojto 115:87f2f5183dfb 2697
Kojto 115:87f2f5183dfb 2698 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/