21#ifndef __STM32F2xx_HAL_RCC_EX_H
22#define __STM32F2xx_HAL_RCC_EX_H
63 uint32_t PeriphClockSelection;
69 uint32_t RTCClockSelection;
88#define RCC_PERIPHCLK_I2S ((uint32_t)0x00000001)
89#define RCC_PERIPHCLK_TIM ((uint32_t)0x00000002)
90#define RCC_PERIPHCLK_RTC ((uint32_t)0x00000004)
91#define RCC_PERIPHCLK_PLLI2S ((uint32_t)0x00000008)
100#define RCC_TIMPRES_DESACTIVATED ((uint8_t)0x00)
101#define RCC_TIMPRES_ACTIVATED ((uint8_t)0x01)
122#if defined(STM32F207xx) || defined(STM32F217xx)
123#define __HAL_RCC_ETHMAC_CLK_ENABLE() do { \
124 __IO uint32_t tmpreg = 0x00; \
125 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACEN);\
127 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACEN);\
130#define __HAL_RCC_ETHMACTX_CLK_ENABLE() do { \
131 __IO uint32_t tmpreg = 0x00; \
132 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACTXEN);\
134 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACTXEN);\
137#define __HAL_RCC_ETHMACRX_CLK_ENABLE() do { \
138 __IO uint32_t tmpreg = 0x00; \
139 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACRXEN);\
141 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACRXEN);\
144#define __HAL_RCC_ETHMACPTP_CLK_ENABLE() do { \
145 __IO uint32_t tmpreg = 0x00; \
146 SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACPTPEN);\
148 tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACPTPEN);\
152#define __HAL_RCC_ETHMAC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACEN))
153#define __HAL_RCC_ETHMACTX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACTXEN))
154#define __HAL_RCC_ETHMACRX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACRXEN))
155#define __HAL_RCC_ETHMACPTP_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACPTPEN))
164#define __HAL_RCC_ETHMAC_IS_CLK_ENABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACEN))!= RESET)
165#define __HAL_RCC_ETHMACTX_IS_CLK_ENABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACTXEN))!= RESET)
166#define __HAL_RCC_ETHMACRX_IS_CLK_ENABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACRXEN))!= RESET)
167#define __HAL_RCC_ETHMACPTP_IS_CLK_ENABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACPTPEN))!= RESET)
168#define __HAL_RCC_ETH_IS_CLK_ENABLED() (__HAL_RCC_ETHMAC_IS_CLK_ENABLED() && \
169 __HAL_RCC_ETHMACTX_IS_CLK_ENABLED() && \
170 __HAL_RCC_ETHMACRX_IS_CLK_ENABLED())
171#define __HAL_RCC_ETHMAC_IS_CLK_DISABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACEN))== RESET)
172#define __HAL_RCC_ETHMACTX_IS_CLK_DISABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACTXEN))== RESET)
173#define __HAL_RCC_ETHMACRX_IS_CLK_DISABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACRXEN))== RESET)
174#define __HAL_RCC_ETHMACPTP_IS_CLK_DISABLED() ((RCC->AHB1ENR &(RCC_AHB1ENR_ETHMACPTPEN))== RESET)
175#define __HAL_RCC_ETH_IS_CLK_DISABLED() (__HAL_RCC_ETHMAC_IS_CLK_DISABLED() && \
176 __HAL_RCC_ETHMACTX_IS_CLK_DISABLED() && \
177 __HAL_RCC_ETHMACRX_IS_CLK_DISABLED())
185#define __HAL_RCC_ETH_CLK_ENABLE() do { \
186 __HAL_RCC_ETHMAC_CLK_ENABLE(); \
187 __HAL_RCC_ETHMACTX_CLK_ENABLE(); \
188 __HAL_RCC_ETHMACRX_CLK_ENABLE(); \
193#define __HAL_RCC_ETH_CLK_DISABLE() do { \
194 __HAL_RCC_ETHMACTX_CLK_DISABLE(); \
195 __HAL_RCC_ETHMACRX_CLK_DISABLE(); \
196 __HAL_RCC_ETHMAC_CLK_DISABLE(); \
210#if defined(STM32F207xx) || defined(STM32F217xx)
211#define __HAL_RCC_DCMI_CLK_ENABLE() do { \
212 __IO uint32_t tmpreg = 0x00; \
213 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\
215 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\
219#define __HAL_RCC_DCMI_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_DCMIEN))
222#if defined(STM32F215xx) || defined(STM32F217xx)
223#define __HAL_RCC_CRYP_CLK_ENABLE() do { \
224 __IO uint32_t tmpreg = 0x00; \
225 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\
227 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\
230#define __HAL_RCC_HASH_CLK_ENABLE() do { \
231 __IO uint32_t tmpreg = 0x00; \
232 SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\
234 tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\
238#define __HAL_RCC_CRYP_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_CRYPEN))
239#define __HAL_RCC_HASH_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_HASHEN))
252#if defined(STM32F207xx) || defined(STM32F217xx)
253#define __HAL_RCC_DCMI_IS_CLK_ENABLED() ((RCC->AHB2ENR &(RCC_AHB2ENR_DCMIEN))!= RESET)
254#define __HAL_RCC_DCMI_IS_CLK_DISABLED() ((RCC->AHB2ENR &(RCC_AHB2ENR_DCMIEN))== RESET)
256#if defined(STM32F215xx) || defined(STM32F217xx)
257#define __HAL_RCC_CRYP_IS_CLK_ENABLED() ((RCC->AHB2ENR &(RCC_AHB2ENR_CRYPEN))!= RESET)
258#define __HAL_RCC_HASH_IS_CLK_ENABLED() ((RCC->AHB2ENR &(RCC_AHB2ENR_HASHEN))!= RESET)
260#define __HAL_RCC_CRYP_IS_CLK_DISABLED() ((RCC->AHB2ENR &(RCC_AHB2ENR_CRYPEN))== RESET)
261#define __HAL_RCC_HASH_IS_CLK_DISABLED() ((RCC->AHB2ENR &(RCC_AHB2ENR_HASHEN))== RESET)
271#if defined(STM32F207xx) || defined(STM32F217xx)
272#define __HAL_RCC_ETHMAC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ETHMACRST))
273#define __HAL_RCC_ETHMAC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_ETHMACRST))
283#if defined(STM32F207xx) || defined(STM32F217xx)
284#define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
285#define __HAL_RCC_DCMI_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_DCMIRST))
288#if defined(STM32F215xx) || defined(STM32F217xx)
289#define __HAL_RCC_CRYP_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CRYPRST))
290#define __HAL_RCC_HASH_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HASHRST))
292#define __HAL_RCC_CRYP_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_CRYPRST))
293#define __HAL_RCC_HASH_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_HASHRST))
308#if defined(STM32F207xx) || defined(STM32F217xx)
309#define __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACLPEN))
310#define __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACTXLPEN))
311#define __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACRXLPEN))
312#define __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACPTPLPEN))
314#define __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACLPEN))
315#define __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACTXLPEN))
316#define __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACRXLPEN))
317#define __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACPTPLPEN))
331#if defined(STM32F207xx) || defined(STM32F217xx)
332#define __HAL_RCC_DCMI_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))
333#define __HAL_RCC_DCMI_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_DCMILPEN))
336#if defined(STM32F215xx) || defined(STM32F217xx)
337#define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))
338#define __HAL_RCC_HASH_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))
340#define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_CRYPLPEN))
341#define __HAL_RCC_HASH_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_HASHLPEN))
382#define PLL_TIMEOUT_VALUE ((uint32_t)100)
398#define IS_RCC_PERIPHCLOCK(SELECTION) ((1 <= (SELECTION)) && ((SELECTION) <= 0x0000000F))
399#define IS_RCC_PLLI2SN_VALUE(VALUE) ((192 <= (VALUE)) && ((VALUE) <= 432))
400#define IS_RCC_PLLI2SR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
HAL_StatusTypeDef
HAL Status structures definition.
Definition stm32f1xx_hal_def.h:40
This file contains HAL common defines, enumeration, macros and structures definitions.
PLLI2S Clock structure definition
Definition stm32f2xx_hal_rcc_ex.h:47
uint32_t PLLI2SN
Definition stm32f2xx_hal_rcc_ex.h:48
uint32_t PLLI2SR
Definition stm32f2xx_hal_rcc_ex.h:52
RCC extended clocks structure definition.
Definition stm32f1xx_hal_rcc_ex.h:284
uint8_t TIMPresSelection
Definition stm32f2xx_hal_rcc_ex.h:72
RCC_PLLI2SInitTypeDef PLLI2S
Definition stm32f2xx_hal_rcc_ex.h:66