annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_rcc_ex.h @ 38:5f11787b4f42

include in ostc4 repository
author heinrichsweikamp
date Sat, 28 Apr 2018 11:52:34 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_rcc_ex.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of RCC HAL Extension module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_RCC_EX_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_RCC_EX_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /** @addtogroup RCCEx
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 /** @defgroup RCCEx_Exported_Types RCCEx Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 * @brief PLLI2S Clock structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 uint32_t PLLI2SN; /*!< Specifies the multiplication factor for PLLI2S VCO output clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 uint32_t PLLI2SR; /*!< Specifies the division factor for I2S clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 uint32_t PLLI2SQ; /*!< Specifies the division factor for SAI1 clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 This parameter must be a number between Min_Data = 2 and Max_Data = 15.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 This parameter will be used only when PLLI2S is selected as Clock Source SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 }RCC_PLLI2SInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 * @brief PLLSAI Clock structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 uint32_t PLLSAIN; /*!< Specifies the multiplication factor for PLLI2S VCO output clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 This parameter will be used only when PLLSAI is selected as Clock Source SAI or LTDC */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 uint32_t PLLSAIQ; /*!< Specifies the division factor for SAI1 clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 This parameter must be a number between Min_Data = 2 and Max_Data = 15.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 This parameter will be used only when PLLSAI is selected as Clock Source SAI or LTDC */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 uint32_t PLLSAIR; /*!< specifies the division factor for LTDC clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 This parameter will be used only when PLLSAI is selected as Clock Source LTDC */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 }RCC_PLLSAIInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 * @brief RCC extended clocks structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 uint32_t PeriphClockSelection; /*!< The Extended Clock to be configured.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 This parameter can be a value of @ref RCCEx_Periph_Clock_Selection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 RCC_PLLI2SInitTypeDef PLLI2S; /*!< PLL I2S structure parameters.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 RCC_PLLSAIInitTypeDef PLLSAI; /*!< PLL SAI structure parameters.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 This parameter will be used only when PLLI2S is selected as Clock Source SAI or LTDC */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 uint32_t PLLI2SDivQ; /*!< Specifies the PLLI2S division factor for SAI1 clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 This parameter must be a number between Min_Data = 1 and Max_Data = 32
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 This parameter will be used only when PLLI2S is selected as Clock Source SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 uint32_t PLLSAIDivQ; /*!< Specifies the PLLI2S division factor for SAI1 clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 This parameter must be a number between Min_Data = 1 and Max_Data = 32
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 This parameter will be used only when PLLSAI is selected as Clock Source SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 uint32_t PLLSAIDivR; /*!< Specifies the PLLSAI division factor for LTDC clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 This parameter must be one value of @ref RCCEx_PLLSAI_DIVR */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 uint32_t RTCClockSelection; /*!< Specifies RTC Clock Prescalers Selection.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 This parameter can be a value of @ref RCC_RTC_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 uint8_t TIMPresSelection; /*!< Specifies TIM Clock Prescalers Selection.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 This parameter can be a value of @ref RCCEx_TIM_PRescaler_Selection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 }RCC_PeriphCLKInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 * @brief PLLI2S Clock structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 uint32_t PLLI2SM; /*!< PLLM: Division factor for PLLI2S VCO input clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 This parameter must be a number between Min_Data = 2 and Max_Data = 62 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 uint32_t PLLI2SN; /*!< Specifies the multiplication factor for PLLI2S VCO output clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 This parameter must be a number between Min_Data = 192 and Max_Data = 432
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 uint32_t PLLI2SR; /*!< Specifies the division factor for I2S clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 }RCC_PLLI2SInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 * @brief RCC extended clocks structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 uint32_t PeriphClockSelection; /*!< The Extended Clock to be configured.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 This parameter can be a value of @ref RCCEx_Periph_Clock_Selection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 RCC_PLLI2SInitTypeDef PLLI2S; /*!< PLL I2S structure parameters.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 uint32_t RTCClockSelection; /*!< Specifies RTC Clock Prescalers Selection.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 This parameter can be a value of @ref RCC_RTC_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 }RCC_PeriphCLKInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 /** @defgroup RCCEx_Exported_Constants RCCEx Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 /** @defgroup RCCEx_Periph_Clock_Selection RCC Periph Clock Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 #define RCC_PERIPHCLK_I2S ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 #define RCC_PERIPHCLK_SAI_PLLI2S ((uint32_t)0x00000002)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 #define RCC_PERIPHCLK_SAI_PLLSAI ((uint32_t)0x00000004)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 #define RCC_PERIPHCLK_LTDC ((uint32_t)0x00000008)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 #define RCC_PERIPHCLK_TIM ((uint32_t)0x00000010)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #define RCC_PERIPHCLK_RTC ((uint32_t)0x00000020)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 #define RCC_PERIPHCLK_I2S ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 #define RCC_PERIPHCLK_RTC ((uint32_t)0x00000002)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 /** @defgroup RCCEx_PLLSAI_DIVR RCC PLLSAI DIVR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 #define RCC_PLLSAIDIVR_2 ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 #define RCC_PLLSAIDIVR_4 ((uint32_t)0x00010000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 #define RCC_PLLSAIDIVR_8 ((uint32_t)0x00020000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 #define RCC_PLLSAIDIVR_16 ((uint32_t)0x00030000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 /** @defgroup RCCEx_SAI_BlockA_Clock_Source RCC SAI BlockA Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 #define RCC_SAIACLKSOURCE_PLLSAI ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 #define RCC_SAIACLKSOURCE_PLLI2S ((uint32_t)0x00100000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 #define RCC_SAIACLKSOURCE_EXT ((uint32_t)0x00200000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 /** @defgroup RCCEx_SAI_BlockB_Clock_Source RCC SAI BlockB Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 #define RCC_SAIBCLKSOURCE_PLLSAI ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 #define RCC_SAIBCLKSOURCE_PLLI2S ((uint32_t)0x00400000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 #define RCC_SAIBCLKSOURCE_EXT ((uint32_t)0x00800000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 /** @defgroup RCCEx_TIM_PRescaler_Selection RCC TIM PRescaler Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 #define RCC_TIMPRES_DESACTIVATED ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 #define RCC_TIMPRES_ACTIVATED ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 /** @defgroup RCCEx_LSE_Dual_Mode_Selection RCC LSE Dual Mode Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 #define RCC_LSE_LOWPOWER_MODE ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 #define RCC_LSE_HIGHDRIVE_MODE ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 /** @defgroup RCCEx_Exported_Macros RCCEx Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 /*----------------------------------- STM32F42xxx/STM32F43xxx----------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 /** @brief Enables or disables the AHB1 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 #define __HAL_RCC_GPIOI_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 #define __HAL_RCC_GPIOF_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOFEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 #define __HAL_RCC_GPIOG_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 #define __HAL_RCC_GPIOJ_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOJEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 #define __HAL_RCC_GPIOK_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOKEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 #define __HAL_RCC_DMA2D_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_DMA2DEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 #define __HAL_RCC_ETHMAC_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 #define __HAL_RCC_ETHMACTX_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACTXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 #define __HAL_RCC_ETHMACRX_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACRXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 #define __HAL_RCC_ETHMACPTP_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACPTPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 #define __HAL_RCC_USB_OTG_HS_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_OTGHSEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_OTGHSULPIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 #define __HAL_RCC_GPIOF_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOFEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 #define __HAL_RCC_GPIOG_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 #define __HAL_RCC_GPIOI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 #define __HAL_RCC_GPIOJ_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOJEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 #define __HAL_RCC_GPIOK_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOKEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 #define __HAL_RCC_DMA2D_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA2DEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 #define __HAL_RCC_ETHMAC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 #define __HAL_RCC_ETHMACTX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACTXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 #define __HAL_RCC_ETHMACRX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACRXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 #define __HAL_RCC_ETHMACPTP_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACPTPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 #define __HAL_RCC_USB_OTG_HS_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSULPIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 * @brief Enable ETHERNET clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 #define __HAL_RCC_ETH_CLK_ENABLE() do { \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 __HAL_RCC_ETHMAC_CLK_ENABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 __HAL_RCC_ETHMACTX_CLK_ENABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 __HAL_RCC_ETHMACRX_CLK_ENABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 } while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 * @brief Disable ETHERNET clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 #define __HAL_RCC_ETH_CLK_DISABLE() do { \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 __HAL_RCC_ETHMACTX_CLK_DISABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 __HAL_RCC_ETHMACRX_CLK_DISABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 __HAL_RCC_ETHMAC_CLK_DISABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 } while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 /** @brief Enable or disable the AHB2 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 #define __HAL_RCC_DCMI_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_DCMIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 #define __HAL_RCC_DCMI_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_DCMIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 #if defined(STM32F437xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 #define __HAL_RCC_CRYP_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_CRYPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 #define __HAL_RCC_HASH_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_HASHEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 #define __HAL_RCC_CRYP_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_CRYPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 #define __HAL_RCC_HASH_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_HASHEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 #endif /* STM32F437xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 /** @brief Enables or disables the AHB3 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 #define __HAL_RCC_FMC_CLK_ENABLE() (RCC->AHB3ENR |= (RCC_AHB3ENR_FMCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 #define __HAL_RCC_FMC_CLK_DISABLE() (RCC->AHB3ENR &= ~(RCC_AHB3ENR_FMCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 /** @brief Enable or disable the Low Speed APB (APB1) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 #define __HAL_RCC_TIM6_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 #define __HAL_RCC_TIM7_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM7EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 #define __HAL_RCC_TIM12_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM12EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 #define __HAL_RCC_TIM13_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM13EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 #define __HAL_RCC_TIM14_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM14EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 #define __HAL_RCC_WWDG_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_WWDGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 #define __HAL_RCC_USART3_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_USART3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 #define __HAL_RCC_UART4_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_UART4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 #define __HAL_RCC_UART5_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_UART5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 #define __HAL_RCC_CAN1_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_CAN1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 #define __HAL_RCC_CAN2_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_CAN2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 #define __HAL_RCC_DAC_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_DACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 #define __HAL_RCC_UART7_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_UART7EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 #define __HAL_RCC_UART8_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_UART8EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 #define __HAL_RCC_TIM6_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 #define __HAL_RCC_TIM7_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM7EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 #define __HAL_RCC_TIM12_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM12EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 #define __HAL_RCC_TIM13_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM13EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 #define __HAL_RCC_TIM14_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM14EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 #define __HAL_RCC_WWDG_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_WWDGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 #define __HAL_RCC_USART3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 #define __HAL_RCC_UART4_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 #define __HAL_RCC_UART5_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 #define __HAL_RCC_CAN1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 #define __HAL_RCC_CAN2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 #define __HAL_RCC_DAC_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_DACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 #define __HAL_RCC_UART7_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART7EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 #define __HAL_RCC_UART8_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART8EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 /** @brief Enable or disable the High Speed APB (APB2) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 #define __HAL_RCC_TIM8_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_TIM8EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 #define __HAL_RCC_ADC2_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_ADC2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 #define __HAL_RCC_ADC3_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_ADC3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 #define __HAL_RCC_SPI5_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SPI5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 #define __HAL_RCC_SPI6_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SPI6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 #define __HAL_RCC_SAI1_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SAI1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 #define __HAL_RCC_TIM8_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM8EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 #define __HAL_RCC_ADC2_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 #define __HAL_RCC_ADC3_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 #define __HAL_RCC_SPI5_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 #define __HAL_RCC_SPI6_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 #define __HAL_RCC_SAI1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SAI1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 #if defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 #define __HAL_RCC_LTDC_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_LTDCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 #define __HAL_RCC_LTDC_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_LTDCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 #endif /* STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 /** @brief Force or release AHB1 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 #define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 #define __HAL_RCC_GPIOG_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 #define __HAL_RCC_GPIOI_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 #define __HAL_RCC_ETHMAC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ETHMACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 #define __HAL_RCC_OTGHS_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_OTGHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 #define __HAL_RCC_GPIOJ_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOJRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 #define __HAL_RCC_GPIOK_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOKRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 #define __HAL_RCC_DMA2D_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2DRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 #define __HAL_RCC_GPIOF_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOFRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 #define __HAL_RCC_GPIOG_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 #define __HAL_RCC_GPIOI_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 #define __HAL_RCC_ETHMAC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_ETHMACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 #define __HAL_RCC_OTGHS_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_OTGHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 #define __HAL_RCC_GPIOJ_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOJRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 #define __HAL_RCC_GPIOK_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOKRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 #define __HAL_RCC_DMA2D_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA2DRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 /** @brief Force or release AHB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 #define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 #define __HAL_RCC_DCMI_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_DCMIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 #if defined(STM32F437xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 #define __HAL_RCC_CRYP_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CRYPRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 #define __HAL_RCC_HASH_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HASHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 #define __HAL_RCC_CRYP_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_CRYPRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 #define __HAL_RCC_HASH_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_HASHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 #endif /* STM32F437xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 /** @brief Force or release AHB3 peripheral reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 #define __HAL_RCC_FMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 #define __HAL_RCC_FMC_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_FMCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 /** @brief Force or release APB1 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 #define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 #define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 #define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 #define __HAL_RCC_TIM13_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM13RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 #define __HAL_RCC_TIM14_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM14RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 #define __HAL_RCC_USART3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_USART3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 #define __HAL_RCC_UART4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 #define __HAL_RCC_UART5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 #define __HAL_RCC_CAN1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 #define __HAL_RCC_CAN2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 #define __HAL_RCC_DAC_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_DACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 #define __HAL_RCC_UART7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART7RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 #define __HAL_RCC_UART8_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART8RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452 #define __HAL_RCC_TIM6_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 #define __HAL_RCC_TIM7_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM7RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 #define __HAL_RCC_TIM12_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM12RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 #define __HAL_RCC_TIM13_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM13RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 #define __HAL_RCC_TIM14_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM14RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 #define __HAL_RCC_USART3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 #define __HAL_RCC_UART4_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 #define __HAL_RCC_UART5_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 #define __HAL_RCC_CAN1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 #define __HAL_RCC_CAN2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 #define __HAL_RCC_DAC_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_DACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 #define __HAL_RCC_UART7_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART7RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464 #define __HAL_RCC_UART8_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART8RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 /** @brief Force or release APB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 #define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 #define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 #define __HAL_RCC_SPI6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 #define __HAL_RCC_SAI1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 #define __HAL_RCC_TIM8_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM8RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 #define __HAL_RCC_SPI5_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 #define __HAL_RCC_SPI6_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 #define __HAL_RCC_SAI1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SAI1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 #if defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 #define __HAL_RCC_LTDC_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_LTDCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 #define __HAL_RCC_LTDC_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_LTDCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 #endif /* STM32F429xx|| STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 /** @brief Enable or disable the AHB1 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 #define __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOFLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 #define __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 #define __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 #define __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 #define __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 #define __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACTXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 #define __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACRXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 #define __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACPTPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 #define __HAL_RCC_OTGHS_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 #define __HAL_RCC_OTGHSULPI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSULPILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 #define __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOJLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 #define __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOKLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 #define __HAL_RCC_SRAM3_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 #define __HAL_RCC_DMA2D_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2DLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 #define __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOFLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 #define __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 #define __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 #define __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 #define __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 #define __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACTXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 #define __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACRXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 #define __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACPTPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 #define __HAL_RCC_OTGHS_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 #define __HAL_RCC_OTGHSULPI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSULPILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 #define __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOJLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 #define __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOKLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 #define __HAL_RCC_DMA2D_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA2DLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 /** @brief Enable or disable the AHB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 #define __HAL_RCC_DCMI_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525 #define __HAL_RCC_DCMI_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_DCMILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 #if defined(STM32F437xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 #define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 #define __HAL_RCC_HASH_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 #define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_CRYPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 #define __HAL_RCC_HASH_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_HASHLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 #endif /* STM32F437xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 /** @brief Enable or disable the AHB3 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 #define __HAL_RCC_FMC_CLK_SLEEP_ENABLE() (RCC->AHB3LPENR |= (RCC_AHB3LPENR_FMCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 #define __HAL_RCC_FMC_CLK_SLEEP_DISABLE() (RCC->AHB3LPENR &= ~(RCC_AHB3LPENR_FMCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 /** @brief Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 #define __HAL_RCC_TIM6_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 #define __HAL_RCC_TIM7_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM7LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 #define __HAL_RCC_TIM12_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM12LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 #define __HAL_RCC_TIM13_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM13LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554 #define __HAL_RCC_TIM14_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM14LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555 #define __HAL_RCC_USART3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_USART3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 #define __HAL_RCC_UART4_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557 #define __HAL_RCC_UART5_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 #define __HAL_RCC_CAN1_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 #define __HAL_RCC_CAN2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560 #define __HAL_RCC_DAC_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_DACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561 #define __HAL_RCC_UART7_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART7LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 #define __HAL_RCC_UART8_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART8LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 #define __HAL_RCC_TIM6_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565 #define __HAL_RCC_TIM7_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM7LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566 #define __HAL_RCC_TIM12_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM12LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 #define __HAL_RCC_TIM13_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM13LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 #define __HAL_RCC_TIM14_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM14LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 #define __HAL_RCC_USART3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 #define __HAL_RCC_UART4_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 #define __HAL_RCC_UART5_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 #define __HAL_RCC_CAN1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573 #define __HAL_RCC_CAN2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574 #define __HAL_RCC_DAC_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_DACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 #define __HAL_RCC_UART7_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART7LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 #define __HAL_RCC_UART8_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART8LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 /** @brief Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584 #define __HAL_RCC_TIM8_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM8LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 #define __HAL_RCC_ADC2_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 #define __HAL_RCC_ADC3_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 #define __HAL_RCC_SPI5_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 #define __HAL_RCC_SPI6_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 #define __HAL_RCC_SAI1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SAI1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591 #define __HAL_RCC_TIM8_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM8LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 #define __HAL_RCC_ADC2_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593 #define __HAL_RCC_ADC3_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 #define __HAL_RCC_SPI5_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 #define __HAL_RCC_SPI6_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 #define __HAL_RCC_SAI1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SAI1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 #if defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 #define __HAL_RCC_LTDC_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_LTDCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 #define __HAL_RCC_LTDC_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_LTDCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 #endif /* STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603 #endif /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 /*---------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 /*----------------------------------- STM32F40xxx/STM32F41xxx----------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608 /** @brief Enables or disables the AHB1 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
610 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 #define __HAL_RCC_GPIOI_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 #define __HAL_RCC_GPIOF_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOFEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615 #define __HAL_RCC_GPIOG_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 #define __HAL_RCC_USB_OTG_HS_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_OTGHSEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_OTGHSULPIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619 #define __HAL_RCC_GPIOF_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOFEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620 #define __HAL_RCC_GPIOG_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621 #define __HAL_RCC_GPIOI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622 #define __HAL_RCC_USB_OTG_HS_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623 #define __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSULPIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625 #if defined(STM32F407xx)|| defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 * @brief Enable ETHERNET clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629 #define __HAL_RCC_ETHMAC_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630 #define __HAL_RCC_ETHMACTX_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACTXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631 #define __HAL_RCC_ETHMACRX_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACRXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 #define __HAL_RCC_ETHMACPTP_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_ETHMACPTPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633 #define __HAL_RCC_ETH_CLK_ENABLE() do { \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634 __HAL_RCC_ETHMAC_CLK_ENABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 __HAL_RCC_ETHMACTX_CLK_ENABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 __HAL_RCC_ETHMACRX_CLK_ENABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637 } while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 * @brief Disable ETHERNET clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642 #define __HAL_RCC_ETHMAC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643 #define __HAL_RCC_ETHMACTX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACTXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 #define __HAL_RCC_ETHMACRX_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACRXEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645 #define __HAL_RCC_ETHMACPTP_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACPTPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646 #define __HAL_RCC_ETH_CLK_DISABLE() do { \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647 __HAL_RCC_ETHMACTX_CLK_DISABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 __HAL_RCC_ETHMACRX_CLK_DISABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649 __HAL_RCC_ETHMAC_CLK_DISABLE(); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 } while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 #endif /* STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653 /** @brief Enable or disable the AHB2 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 #if defined(STM32F407xx)|| defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659 #define __HAL_RCC_DCMI_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_DCMIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 #define __HAL_RCC_DCMI_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_DCMIEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661 #endif /* STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 #if defined(STM32F415xx) || defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 #define __HAL_RCC_CRYP_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_CRYPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665 #define __HAL_RCC_HASH_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_HASHEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667 #define __HAL_RCC_CRYP_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_CRYPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668 #define __HAL_RCC_HASH_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_HASHEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 #endif /* STM32F415xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671 /** @brief Enables or disables the AHB3 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 #define __HAL_RCC_FSMC_CLK_ENABLE() (RCC->AHB3ENR |= (RCC_AHB3ENR_FSMCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677 #define __HAL_RCC_FSMC_CLK_DISABLE() (RCC->AHB3ENR &= ~(RCC_AHB3ENR_FSMCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 /** @brief Enable or disable the Low Speed APB (APB1) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 #define __HAL_RCC_TIM6_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685 #define __HAL_RCC_TIM7_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM7EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686 #define __HAL_RCC_TIM12_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM12EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687 #define __HAL_RCC_TIM13_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM13EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 #define __HAL_RCC_TIM14_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM14EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 #define __HAL_RCC_WWDG_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_WWDGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690 #define __HAL_RCC_USART3_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_USART3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691 #define __HAL_RCC_UART4_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_UART4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692 #define __HAL_RCC_UART5_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_UART5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693 #define __HAL_RCC_CAN1_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_CAN1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 #define __HAL_RCC_CAN2_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_CAN2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695 #define __HAL_RCC_DAC_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_DACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 #define __HAL_RCC_TIM6_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698 #define __HAL_RCC_TIM7_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM7EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699 #define __HAL_RCC_TIM12_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM12EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700 #define __HAL_RCC_TIM13_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM13EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 #define __HAL_RCC_TIM14_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM14EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
702 #define __HAL_RCC_WWDG_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_WWDGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
703 #define __HAL_RCC_USART3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
704 #define __HAL_RCC_UART4_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
705 #define __HAL_RCC_UART5_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_UART5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
706 #define __HAL_RCC_CAN1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
707 #define __HAL_RCC_CAN2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
708 #define __HAL_RCC_DAC_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_DACEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
709
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
710 /** @brief Enable or disable the High Speed APB (APB2) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
711 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
712 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
713 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
714 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
715 #define __HAL_RCC_TIM8_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_TIM8EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
716 #define __HAL_RCC_ADC2_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_ADC2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
717 #define __HAL_RCC_ADC3_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_ADC3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
718
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
719 #define __HAL_RCC_TIM8_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM8EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
720 #define __HAL_RCC_ADC2_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
721 #define __HAL_RCC_ADC3_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
722
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
723 /** @brief Force or release AHB1 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
724 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
725 #define __HAL_RCC_GPIOF_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
726 #define __HAL_RCC_GPIOG_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
727 #define __HAL_RCC_GPIOI_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
728 #define __HAL_RCC_ETHMAC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ETHMACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
729 #define __HAL_RCC_OTGHS_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_OTGHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
730
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
731 #define __HAL_RCC_GPIOF_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOFRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
732 #define __HAL_RCC_GPIOG_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
733 #define __HAL_RCC_GPIOI_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
734 #define __HAL_RCC_ETHMAC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_ETHMACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
735 #define __HAL_RCC_OTGHS_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_OTGHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
736
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
737 /** @brief Force or release AHB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
738 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
739 #if defined(STM32F407xx)|| defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
740 #define __HAL_RCC_DCMI_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
741 #define __HAL_RCC_DCMI_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_DCMIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
742 #endif /* STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
743
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
744 #if defined(STM32F415xx) || defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
745 #define __HAL_RCC_CRYP_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CRYPRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
746 #define __HAL_RCC_HASH_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HASHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
747
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
748 #define __HAL_RCC_CRYP_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_CRYPRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
749 #define __HAL_RCC_HASH_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_HASHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
750
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
751 #endif /* STM32F415xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
752
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
753 /** @brief Force or release AHB3 peripheral reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
754 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
755 #define __HAL_RCC_FSMC_FORCE_RESET() (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FSMCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
756 #define __HAL_RCC_FSMC_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_FSMCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
757
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
758 /** @brief Force or release APB1 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
759 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
760 #define __HAL_RCC_TIM6_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
761 #define __HAL_RCC_TIM7_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
762 #define __HAL_RCC_TIM12_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
763 #define __HAL_RCC_TIM13_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM13RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
764 #define __HAL_RCC_TIM14_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM14RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
765 #define __HAL_RCC_USART3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_USART3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
766 #define __HAL_RCC_UART4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
767 #define __HAL_RCC_UART5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_UART5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
768 #define __HAL_RCC_CAN1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
769 #define __HAL_RCC_CAN2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
770 #define __HAL_RCC_DAC_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_DACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
771
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
772 #define __HAL_RCC_TIM6_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
773 #define __HAL_RCC_TIM7_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM7RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
774 #define __HAL_RCC_TIM12_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM12RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
775 #define __HAL_RCC_TIM13_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM13RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
776 #define __HAL_RCC_TIM14_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM14RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
777 #define __HAL_RCC_USART3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
778 #define __HAL_RCC_UART4_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
779 #define __HAL_RCC_UART5_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
780 #define __HAL_RCC_CAN1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
781 #define __HAL_RCC_CAN2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
782 #define __HAL_RCC_DAC_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_DACRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
783
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
784 /** @brief Force or release APB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
785 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
786 #define __HAL_RCC_TIM8_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
787 #define __HAL_RCC_TIM8_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM8RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
788
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
789 /** @brief Enable or disable the AHB1 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
790 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
791 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
792 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
793 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
794 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
795 #define __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOFLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
796 #define __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
797 #define __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
798 #define __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
799 #define __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
800 #define __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACTXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
801 #define __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACRXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
802 #define __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACPTPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
803 #define __HAL_RCC_OTGHS_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
804 #define __HAL_RCC_OTGHSULPI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSULPILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
805
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
806 #define __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOFLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
807 #define __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
808 #define __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
809 #define __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
810 #define __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
811 #define __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACTXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
812 #define __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACRXLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
813 #define __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACPTPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
814 #define __HAL_RCC_OTGHS_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
815 #define __HAL_RCC_OTGHSULPI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSULPILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
816
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
817 /** @brief Enable or disable the AHB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
818 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
819 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
820 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
821 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
822 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
823 #if defined(STM32F407xx)|| defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
824 #define __HAL_RCC_DCMI_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
825 #define __HAL_RCC_DCMI_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_DCMILPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
826 #endif /* STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
827
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
828 #if defined(STM32F415xx) || defined(STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
829 #define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
830 #define __HAL_RCC_HASH_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
831
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
832 #define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_CRYPLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
833 #define __HAL_RCC_HASH_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_HASHLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
834 #endif /* STM32F415xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
835
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
836 /** @brief Enable or disable the AHB3 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
837 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
838 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
839 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
840 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
841 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
842 #define __HAL_RCC_FSMC_CLK_SLEEP_ENABLE() (RCC->AHB3LPENR |= (RCC_AHB3LPENR_FSMCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
843 #define __HAL_RCC_FSMC_CLK_SLEEP_DISABLE() (RCC->AHB3LPENR &= ~(RCC_AHB3LPENR_FSMCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
844
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
845 /** @brief Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
846 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
847 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
848 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
849 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
850 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
851 #define __HAL_RCC_TIM6_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
852 #define __HAL_RCC_TIM7_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM7LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
853 #define __HAL_RCC_TIM12_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM12LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
854 #define __HAL_RCC_TIM13_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM13LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
855 #define __HAL_RCC_TIM14_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM14LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
856 #define __HAL_RCC_USART3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_USART3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
857 #define __HAL_RCC_UART4_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
858 #define __HAL_RCC_UART5_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_UART5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
859 #define __HAL_RCC_CAN1_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
860 #define __HAL_RCC_CAN2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
861 #define __HAL_RCC_DAC_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_DACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
862
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
863 #define __HAL_RCC_TIM6_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
864 #define __HAL_RCC_TIM7_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM7LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
865 #define __HAL_RCC_TIM12_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM12LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
866 #define __HAL_RCC_TIM13_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM13LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
867 #define __HAL_RCC_TIM14_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM14LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
868 #define __HAL_RCC_USART3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
869 #define __HAL_RCC_UART4_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
870 #define __HAL_RCC_UART5_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
871 #define __HAL_RCC_CAN1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
872 #define __HAL_RCC_CAN2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
873 #define __HAL_RCC_DAC_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_DACLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
874
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
875 /** @brief Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
876 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
877 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
878 * @note After wakeup from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
879 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
880 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
881 #define __HAL_RCC_TIM8_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM8LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
882 #define __HAL_RCC_ADC2_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
883 #define __HAL_RCC_ADC3_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
884
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
885 #define __HAL_RCC_TIM8_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM8LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
886 #define __HAL_RCC_ADC2_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
887 #define __HAL_RCC_ADC3_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
888 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
889 /*---------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
890
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
891 /*------------------------------------------ STM32F411xx --------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
892 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
893 /** @brief Enable or disable the High Speed APB (APB2) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
894 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
895 #define __HAL_RCC_SPI5_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SPI5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
896 #define __HAL_RCC_SPI5_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
897
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
898 /** @brief Force or release APB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
899 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
900 #define __HAL_RCC_SPI5_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
901 #define __HAL_RCC_SPI5_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
902
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
903 /** @brief Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
904 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
905 #define __HAL_RCC_SPI5_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
906 #define __HAL_RCC_SPI5_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
907
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
908 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
909 /*---------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
910
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
911 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
912 defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
913
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
914 /** @brief Macro to configure the Timers clocks prescalers
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
915 * @note This feature is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
916 * @param __PRESC__ : specifies the Timers clocks prescalers selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
917 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
918 * @arg RCC_TIMPRES_DESACTIVATED: The Timers kernels clocks prescaler is
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
919 * equal to HPRE if PPREx is corresponding to division by 1 or 2,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
920 * else it is equal to [(HPRE * PPREx) / 2] if PPREx is corresponding to
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
921 * division by 4 or more.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
922 * @arg RCC_TIMPRES_ACTIVATED: The Timers kernels clocks prescaler is
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
923 * equal to HPRE if PPREx is corresponding to division by 1, 2 or 4,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
924 * else it is equal to [(HPRE * PPREx) / 4] if PPREx is corresponding
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
925 * to division by 8 or more.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
926 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
927 #define __HAL_RCC_TIMCLKPRESCALER(__PRESC__) (*(__IO uint32_t *) RCC_DCKCFGR_TIMPRE_BB = (__PRESC__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
928
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
929 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx) || STM32F401xC || STM32F401xE || STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
930
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
931 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
932
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
933 /** @brief Macro to configure the PLLI2S clock multiplication and division factors .
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
934 * @note This macro must be used only when the PLLI2S is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
935 * @note This macro must be used only when the PLLI2S is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
936 * @note PLLI2S clock source is common with the main PLL (configured in
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
937 * HAL_RCC_ClockConfig() API).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
938 * @param __PLLI2SM__: specifies the division factor for PLLI2S VCO input clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
939 * This parameter must be a number between Min_Data = 2 and Max_Data = 63.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
940 * @note You have to set the PLLI2SM parameter correctly to ensure that the VCO input
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
941 * frequency ranges from 1 to 2 MHz. It is recommended to select a frequency
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
942 * of 2 MHz to limit PLLI2S jitter.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
943 * @param __PLLI2SN__: specifies the multiplication factor for PLLI2S VCO output clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
944 * This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
945 * @note You have to set the PLLI2SN parameter correctly to ensure that the VCO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
946 * output frequency is between Min_Data = 192 and Max_Data = 432 MHz.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
947 * @param __PLLI2SR__: specifies the division factor for I2S clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
948 * This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
949 * @note You have to set the PLLI2SR parameter correctly to not exceed 192 MHz
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
950 * on the I2S clock frequency.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
951 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
952 #define __HAL_RCC_PLLI2S_I2SCLK_CONFIG(__PLLI2SM__, __PLLI2SN__, __PLLI2SR__) (RCC->PLLI2SCFGR = ((__PLLI2SN__) << POSITION_VAL(RCC_PLLI2SCFGR_PLLI2SN)) |\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
953 ((__PLLI2SR__) << POSITION_VAL(RCC_PLLI2SCFGR_PLLI2SR)) | (__PLLI2SM__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
954 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
955
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
956
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
957 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
958
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
959 /** @brief Macros to Enable or Disable the PLLISAI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
960 * @note The PLLSAI is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
961 * @note The PLLSAI is disabled by hardware when entering STOP and STANDBY modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
962 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
963 #define __HAL_RCC_PLLSAI_ENABLE() (*(__IO uint32_t *) RCC_CR_PLLSAION_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
964 #define __HAL_RCC_PLLSAI_DISABLE() (*(__IO uint32_t *) RCC_CR_PLLSAION_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
965
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
966 /** @brief Macro to configure the PLLSAI clock multiplication and division factors.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
967 * @note The PLLSAI is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
968 * @note This function must be used only when the PLLSAI is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
969 * @note PLLSAI clock source is common with the main PLL (configured in
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
970 * RCC_PLLConfig function )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
971 * @param __PLLSAIN__: specifies the multiplication factor for PLLSAI VCO output clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
972 * This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
973 * @note You have to set the PLLSAIN parameter correctly to ensure that the VCO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
974 * output frequency is between Min_Data = 192 and Max_Data = 432 MHz.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
975 * @param __PLLSAIQ__: specifies the division factor for SAI1 clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
976 * This parameter must be a number between Min_Data = 2 and Max_Data = 15.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
977 * @param __PLLSAIR__: specifies the division factor for LTDC clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
978 * This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
979 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
980 #define __HAL_RCC_PLLSAI_CONFIG(__PLLSAIN__, __PLLSAIQ__, __PLLSAIR__) (RCC->PLLSAICFGR = ((__PLLSAIN__) << 6) | ((__PLLSAIQ__) << 24) | ((__PLLSAIR__) << 28))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
981
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
982 /** @brief Macro used by the SAI HAL driver to configure the PLLI2S clock multiplication and division factors.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
983 * @note This macro must be used only when the PLLI2S is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
984 * @note PLLI2S clock source is common with the main PLL (configured in
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
985 * HAL_RCC_ClockConfig() API)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
986 * @param __PLLI2SN__: specifies the multiplication factor for PLLI2S VCO output clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
987 * This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
988 * @note You have to set the PLLI2SN parameter correctly to ensure that the VCO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
989 * output frequency is between Min_Data = 192 and Max_Data = 432 MHz.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
990 * @param __PLLI2SQ__: specifies the division factor for SAI1 clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
991 * This parameter must be a number between Min_Data = 2 and Max_Data = 15.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
992 * @note the PLLI2SQ parameter is only available with STM32F429x/439x Devices
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
993 * and can be configured using the __HAL_RCC_PLLI2S_PLLSAICLK_CONFIG() macro
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
994 * @param __PLLI2SR__: specifies the division factor for I2S clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
995 * This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
996 * @note You have to set the PLLI2SR parameter correctly to not exceed 192 MHz
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
997 * on the I2S clock frequency.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
998 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
999 #define __HAL_RCC_PLLI2S_SAICLK_CONFIG(__PLLI2SN__, __PLLI2SQ__, __PLLI2SR__) (RCC->PLLI2SCFGR = ((__PLLI2SN__) << 6) | ((__PLLI2SQ__) << 24) | ((__PLLI2SR__) << 28))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1000
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1001 /** @brief Macro to configure the SAI clock Divider coming from PLLI2S.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1002 * @note The SAI peripheral is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1003 * @note This function must be called before enabling the PLLI2S.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1004 * @param __PLLI2SDivQ__: specifies the PLLI2S division factor for SAI1 clock .
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1005 * This parameter must be a number between 1 and 32.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1006 * SAI1 clock frequency = f(PLLI2SQ) / __PLLI2SDivQ__
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1007 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1008 #define __HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(__PLLI2SDivQ__) (MODIFY_REG(RCC->DCKCFGR, RCC_DCKCFGR_PLLI2SDIVQ, (__PLLI2SDivQ__)-1))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1009
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1010 /** @brief Macro to configure the SAI clock Divider coming from PLLSAI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1011 * @note The SAI peripheral is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1012 * @note This function must be called before enabling the PLLSAI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1013 * @param __PLLSAIDivQ__: specifies the PLLSAI division factor for SAI1 clock .
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1014 * This parameter must be a number between Min_Data = 1 and Max_Data = 32.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1015 * SAI1 clock frequency = f(PLLSAIQ) / __PLLSAIDivQ__
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1016 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1017 #define __HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(__PLLSAIDivQ__) (MODIFY_REG(RCC->DCKCFGR, RCC_DCKCFGR_PLLSAIDIVQ, ((__PLLSAIDivQ__)-1)<<8))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1018
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1019 /** @brief Macro to configure the LTDC clock Divider coming from PLLSAI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1020 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1021 * @note The LTDC peripheral is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1022 * @note This function must be called before enabling the PLLSAI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1023 * @param __PLLSAIDivR__: specifies the PLLSAI division factor for LTDC clock .
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1024 * This parameter must be a number between Min_Data = 2 and Max_Data = 16.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1025 * LTDC clock frequency = f(PLLSAIR) / __PLLSAIDivR__
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1026 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1027 #define __HAL_RCC_PLLSAI_PLLSAICLKDIVR_CONFIG(__PLLSAIDivR__) (MODIFY_REG(RCC->DCKCFGR, RCC_DCKCFGR_PLLSAIDIVR, (__PLLSAIDivR__)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1028
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1029 /** @brief Macro to configure SAI1BlockA clock source selection.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1030 * @note The SAI peripheral is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1031 * @note This function must be called before enabling PLLSAI, PLLI2S and
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1032 * the SAI clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1033 * @param __SOURCE__: specifies the SAI Block A clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1034 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1035 * @arg RCC_SAIACLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1036 * as SAI1 Block A clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1037 * @arg RCC_SAIACLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1038 * as SAI1 Block A clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1039 * @arg RCC_SAIACLKSOURCE_Ext: External clock mapped on the I2S_CKIN pin
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1040 * used as SAI1 Block A clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1041 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1042 #define __HAL_RCC_SAI_BLOCKACLKSOURCE_CONFIG(__SOURCE__) (MODIFY_REG(RCC->DCKCFGR, RCC_DCKCFGR_SAI1ASRC, (__SOURCE__)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1043
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1044 /** @brief Macro to configure SAI1BlockB clock source selection.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1045 * @note The SAI peripheral is only available with STM32F429x/439x Devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1046 * @note This function must be called before enabling PLLSAI, PLLI2S and
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1047 * the SAI clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1048 * @param __SOURCE__: specifies the SAI Block B clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1049 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1050 * @arg RCC_SAIBCLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1051 * as SAI1 Block B clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1052 * @arg RCC_SAIBCLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1053 * as SAI1 Block B clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1054 * @arg RCC_SAIBCLKSOURCE_Ext: External clock mapped on the I2S_CKIN pin
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1055 * used as SAI1 Block B clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1056 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1057 #define __HAL_RCC_SAI_BLOCKBCLKSOURCE_CONFIG(__SOURCE__) (MODIFY_REG(RCC->DCKCFGR, RCC_DCKCFGR_SAI1BSRC, (__SOURCE__)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1058
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1059 /** @brief Enable PLLSAI_RDY interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1060 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1061 #define __HAL_RCC_PLLSAI_ENABLE_IT() (RCC->CIR |= (RCC_CIR_PLLSAIRDYIE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1062
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1063 /** @brief Disable PLLSAI_RDY interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1064 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1065 #define __HAL_RCC_PLLSAI_DISABLE_IT() (RCC->CIR &= ~(RCC_CIR_PLLSAIRDYIE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1066
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1067 /** @brief Clear the PLLSAI RDY interrupt pending bits.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1068 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1069 #define __HAL_RCC_PLLSAI_CLEAR_IT() (RCC->CIR |= (RCC_CIR_PLLSAIRDYF))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1070
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1071 /** @brief Check the PLLSAI RDY interrupt has occurred or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1072 * @retval The new state (TRUE or FALSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1073 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1074 #define __HAL_RCC_PLLSAI_GET_IT() ((RCC->CIR & (RCC_CIR_PLLSAIRDYIE)) == (RCC_CIR_PLLSAIRDYIE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1075
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1076 /** @brief Check PLLSAI RDY flag is set or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1077 * @retval The new state (TRUE or FALSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1078 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1079 #define __HAL_RCC_PLLSAI_GET_FLAG() ((RCC->CR & (RCC_CR_PLLSAIRDY)) == (RCC_CR_PLLSAIRDY))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1080
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1081 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1082 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1083 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1084 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1085
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1086 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1087 /** @addtogroup RCCEx_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1088 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1089 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1090
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1091 /** @addtogroup RCCEx_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1092 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1093 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1094 HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1095 void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1096
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1097 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1098 void HAL_RCCEx_SelectLSEMode(uint8_t Mode);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1099 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1100 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1101 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1102 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1103
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1104 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1105 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1106 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1107 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1108 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1109 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1110 /** @defgroup RCCEx_Private_Constants RCCEx Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1111 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1112 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1113 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1114 /** @defgroup RCCEx_BitAddress_AliasRegion RCC BitAddress AliasRegion
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1115 * @brief RCC registers bit address in the alias region
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1116 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1117 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1118 /* --- CR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1119 /* Alias word address of PLLSAION bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1120 #define RCC_PLLSAION_BIT_NUMBER 0x1C
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1121 #define RCC_CR_PLLSAION_BB (PERIPH_BB_BASE + (RCC_CR_OFFSET * 32) + (RCC_PLLSAION_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1122
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1123 /* --- DCKCFGR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1124 /* Alias word address of TIMPRE bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1125 #define RCC_DCKCFGR_OFFSET (RCC_OFFSET + 0x8C)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1126 #define RCC_TIMPRE_BIT_NUMBER 0x18
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1127 #define RCC_DCKCFGR_TIMPRE_BB (PERIPH_BB_BASE + (RCC_DCKCFGR_OFFSET * 32) + (RCC_TIMPRE_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1128 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1129 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1130 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1131 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1132
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1133 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1134 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1135 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1136
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1137 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1138 /** @addtogroup RCCEx_Private_Macros RCCEx Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1139 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1140 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1141 /** @defgroup RCCEx_IS_RCC_Definitions RCC Private macros to check input parameters
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1142 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1143 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1144 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1145 #define IS_RCC_PERIPHCLOCK(SELECTION) ((1 <= (SELECTION)) && ((SELECTION) <= 0x0000002F))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1146 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1147
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1148 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1149 defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1150 #define IS_RCC_PERIPHCLOCK(SELECTION) ((1 <= (SELECTION)) && ((SELECTION) <= 0x00000003))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1151 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F401xC || STM32F401xE || STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1152
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1153 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1154 #define IS_RCC_PLLI2SQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1155 #define IS_RCC_PLLSAIN_VALUE(VALUE) ((49 <= (VALUE)) && ((VALUE) <= 432))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1156 #define IS_RCC_PLLSAIQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1157 #define IS_RCC_PLLSAIR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1158 #define IS_RCC_PLLSAI_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1159 #define IS_RCC_PLLI2S_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1160 #define IS_RCC_PLLSAI_DIVR_VALUE(VALUE) (((VALUE) == RCC_PLLSAIDIVR_2) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1161 ((VALUE) == RCC_PLLSAIDIVR_4) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1162 ((VALUE) == RCC_PLLSAIDIVR_8) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1163 ((VALUE) == RCC_PLLSAIDIVR_16))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1164 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1165
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1166 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1167
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1168 #define IS_RCC_PLLI2SM_VALUE(VALUE) ((VALUE) <= 63)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1169 #define IS_RCC_LSE_MODE(MODE) (((MODE) == RCC_LSE_LOWPOWER_MODE) ||\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1170 ((MODE) == RCC_LSE_HIGHDRIVE_MODE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1171 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1173 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1174 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1176
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1177 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1178 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1179 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1180
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1181 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1182 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1183 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1184
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1185 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1186 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1187 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1188 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1189 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1190 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1191
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1192 #endif /* __STM32F4xx_HAL_RCC_EX_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1193
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1194 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/