annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_rcc.h @ 115:3834b6272ee5 FlipDisplay

Merge with 68181cd61f2069d061621c2cd2a6afddb7486f5e
author Ideenmodellierer
date Thu, 03 Jan 2019 19:59:36 +0100
parents 5f11787b4f42
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.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 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_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_RCC_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 RCC
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 RCC_Exported_Types RCC 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 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 * @brief RCC PLL configuration structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 uint32_t PLLState; /*!< The new state of the PLL.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 This parameter can be a value of @ref RCC_PLL_Config */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 uint32_t PLLSource; /*!< RCC_PLLSource: PLL entry clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 This parameter must be a value of @ref RCC_PLL_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 uint32_t PLLM; /*!< PLLM: Division factor for PLL VCO input clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 This parameter must be a number between Min_Data = 0 and Max_Data = 63 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 uint32_t PLLN; /*!< PLLN: Multiplication factor for PLL VCO output clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 This parameter must be a number between Min_Data = 192 and Max_Data = 432 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 uint32_t PLLP; /*!< PLLP: Division factor for main system clock (SYSCLK).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 This parameter must be a value of @ref RCC_PLLP_Clock_Divider */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 uint32_t PLLQ; /*!< PLLQ: Division factor for OTG FS, SDIO and RNG clocks.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 This parameter must be a number between Min_Data = 4 and Max_Data = 15 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 }RCC_PLLInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 * @brief RCC Internal/External Oscillator (HSE, HSI, LSE and LSI) configuration structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 uint32_t OscillatorType; /*!< The oscillators to be configured.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 This parameter can be a value of @ref RCC_Oscillator_Type */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 uint32_t HSEState; /*!< The new state of the HSE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 This parameter can be a value of @ref RCC_HSE_Config */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 uint32_t LSEState; /*!< The new state of the LSE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 This parameter can be a value of @ref RCC_LSE_Config */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 uint32_t HSIState; /*!< The new state of the HSI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 This parameter can be a value of @ref RCC_HSI_Config */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 uint32_t HSICalibrationValue; /*!< The calibration trimming value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x1F */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 uint32_t LSIState; /*!< The new state of the LSI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 This parameter can be a value of @ref RCC_LSI_Config */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 RCC_PLLInitTypeDef PLL; /*!< PLL structure parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 }RCC_OscInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 * @brief RCC System, AHB and APB busses clock configuration structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 uint32_t ClockType; /*!< The clock to be configured.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 This parameter can be a value of @ref RCC_System_Clock_Type */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 uint32_t SYSCLKSource; /*!< The clock source (SYSCLKS) used as system clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 This parameter can be a value of @ref RCC_System_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 uint32_t AHBCLKDivider; /*!< The AHB clock (HCLK) divider. This clock is derived from the system clock (SYSCLK).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 This parameter can be a value of @ref RCC_AHB_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 uint32_t APB1CLKDivider; /*!< The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 This parameter can be a value of @ref RCC_APB1_APB2_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 uint32_t APB2CLKDivider; /*!< The APB2 clock (PCLK2) divider. This clock is derived from the AHB clock (HCLK).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 This parameter can be a value of @ref RCC_APB1_APB2_Clock_Source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 }RCC_ClkInitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 /** @defgroup RCC_Exported_Constants RCC Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 /** @defgroup RCC_Oscillator_Type Oscillator Type
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 #define RCC_OSCILLATORTYPE_NONE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 #define RCC_OSCILLATORTYPE_HSE ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 #define RCC_OSCILLATORTYPE_HSI ((uint32_t)0x00000002)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 #define RCC_OSCILLATORTYPE_LSE ((uint32_t)0x00000004)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 #define RCC_OSCILLATORTYPE_LSI ((uint32_t)0x00000008)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 /**
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 /** @defgroup RCC_HSE_Config HSE Config
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 #define RCC_HSE_OFF ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 #define RCC_HSE_ON ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 #define RCC_HSE_BYPASS ((uint8_t)0x05)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 /** @defgroup RCC_LSE_Config LSE Config
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 #define RCC_LSE_OFF ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 #define RCC_LSE_ON ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 #define RCC_LSE_BYPASS ((uint8_t)0x05)
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
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 /** @defgroup RCC_HSI_Config HSI Config
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 #define RCC_HSI_OFF ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 #define RCC_HSI_ON ((uint8_t)0x01)
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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 /** @defgroup RCC_LSI_Config LSI Config
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 #define RCC_LSI_OFF ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #define RCC_LSI_ON ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 /** @defgroup RCC_PLL_Config PLL Config
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 #define RCC_PLL_NONE ((uint8_t)0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 #define RCC_PLL_OFF ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 #define RCC_PLL_ON ((uint8_t)0x02)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 /** @defgroup RCC_PLLP_Clock_Divider PLLP Clock Divider
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 #define RCC_PLLP_DIV2 ((uint32_t)0x00000002)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 #define RCC_PLLP_DIV4 ((uint32_t)0x00000004)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 #define RCC_PLLP_DIV6 ((uint32_t)0x00000006)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 #define RCC_PLLP_DIV8 ((uint32_t)0x00000008)
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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 /** @defgroup RCC_PLL_Clock_Source PLL Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 #define RCC_PLLSOURCE_HSI RCC_PLLCFGR_PLLSRC_HSI
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 #define RCC_PLLSOURCE_HSE RCC_PLLCFGR_PLLSRC_HSE
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
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 /** @defgroup RCC_System_Clock_Type System Clock Type
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 #define RCC_CLOCKTYPE_SYSCLK ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 #define RCC_CLOCKTYPE_HCLK ((uint32_t)0x00000002)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 #define RCC_CLOCKTYPE_PCLK1 ((uint32_t)0x00000004)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 #define RCC_CLOCKTYPE_PCLK2 ((uint32_t)0x00000008)
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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 /** @defgroup RCC_System_Clock_Source System Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 #define RCC_SYSCLKSOURCE_HSI RCC_CFGR_SW_HSI
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 #define RCC_SYSCLKSOURCE_HSE RCC_CFGR_SW_HSE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 #define RCC_SYSCLKSOURCE_PLLCLK RCC_CFGR_SW_PLL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 /** @defgroup RCC_AHB_Clock_Source AHB Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 #define RCC_SYSCLK_DIV1 RCC_CFGR_HPRE_DIV1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 #define RCC_SYSCLK_DIV2 RCC_CFGR_HPRE_DIV2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 #define RCC_SYSCLK_DIV4 RCC_CFGR_HPRE_DIV4
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 #define RCC_SYSCLK_DIV8 RCC_CFGR_HPRE_DIV8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 #define RCC_SYSCLK_DIV16 RCC_CFGR_HPRE_DIV16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 #define RCC_SYSCLK_DIV64 RCC_CFGR_HPRE_DIV64
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 #define RCC_SYSCLK_DIV128 RCC_CFGR_HPRE_DIV128
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 #define RCC_SYSCLK_DIV256 RCC_CFGR_HPRE_DIV256
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 #define RCC_SYSCLK_DIV512 RCC_CFGR_HPRE_DIV512
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 /** @defgroup RCC_APB1_APB2_Clock_Source APB1/APB2 Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 #define RCC_HCLK_DIV1 RCC_CFGR_PPRE1_DIV1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 #define RCC_HCLK_DIV2 RCC_CFGR_PPRE1_DIV2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 #define RCC_HCLK_DIV4 RCC_CFGR_PPRE1_DIV4
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 #define RCC_HCLK_DIV8 RCC_CFGR_PPRE1_DIV8
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 #define RCC_HCLK_DIV16 RCC_CFGR_PPRE1_DIV16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 /** @defgroup RCC_RTC_Clock_Source RTC Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 #define RCC_RTCCLKSOURCE_LSE ((uint32_t)0x00000100)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 #define RCC_RTCCLKSOURCE_LSI ((uint32_t)0x00000200)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 #define RCC_RTCCLKSOURCE_HSE_DIV2 ((uint32_t)0x00020300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 #define RCC_RTCCLKSOURCE_HSE_DIV3 ((uint32_t)0x00030300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 #define RCC_RTCCLKSOURCE_HSE_DIV4 ((uint32_t)0x00040300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 #define RCC_RTCCLKSOURCE_HSE_DIV5 ((uint32_t)0x00050300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 #define RCC_RTCCLKSOURCE_HSE_DIV6 ((uint32_t)0x00060300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 #define RCC_RTCCLKSOURCE_HSE_DIV7 ((uint32_t)0x00070300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 #define RCC_RTCCLKSOURCE_HSE_DIV8 ((uint32_t)0x00080300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 #define RCC_RTCCLKSOURCE_HSE_DIV9 ((uint32_t)0x00090300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 #define RCC_RTCCLKSOURCE_HSE_DIV10 ((uint32_t)0x000A0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 #define RCC_RTCCLKSOURCE_HSE_DIV11 ((uint32_t)0x000B0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 #define RCC_RTCCLKSOURCE_HSE_DIV12 ((uint32_t)0x000C0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 #define RCC_RTCCLKSOURCE_HSE_DIV13 ((uint32_t)0x000D0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 #define RCC_RTCCLKSOURCE_HSE_DIV14 ((uint32_t)0x000E0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 #define RCC_RTCCLKSOURCE_HSE_DIV15 ((uint32_t)0x000F0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 #define RCC_RTCCLKSOURCE_HSE_DIV16 ((uint32_t)0x00100300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 #define RCC_RTCCLKSOURCE_HSE_DIV17 ((uint32_t)0x00110300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 #define RCC_RTCCLKSOURCE_HSE_DIV18 ((uint32_t)0x00120300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 #define RCC_RTCCLKSOURCE_HSE_DIV19 ((uint32_t)0x00130300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 #define RCC_RTCCLKSOURCE_HSE_DIV20 ((uint32_t)0x00140300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 #define RCC_RTCCLKSOURCE_HSE_DIV21 ((uint32_t)0x00150300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 #define RCC_RTCCLKSOURCE_HSE_DIV22 ((uint32_t)0x00160300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 #define RCC_RTCCLKSOURCE_HSE_DIV23 ((uint32_t)0x00170300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 #define RCC_RTCCLKSOURCE_HSE_DIV24 ((uint32_t)0x00180300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 #define RCC_RTCCLKSOURCE_HSE_DIV25 ((uint32_t)0x00190300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 #define RCC_RTCCLKSOURCE_HSE_DIV26 ((uint32_t)0x001A0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 #define RCC_RTCCLKSOURCE_HSE_DIV27 ((uint32_t)0x001B0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 #define RCC_RTCCLKSOURCE_HSE_DIV28 ((uint32_t)0x001C0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 #define RCC_RTCCLKSOURCE_HSE_DIV29 ((uint32_t)0x001D0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 #define RCC_RTCCLKSOURCE_HSE_DIV30 ((uint32_t)0x001E0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 #define RCC_RTCCLKSOURCE_HSE_DIV31 ((uint32_t)0x001F0300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 /** @defgroup RCC_I2S_Clock_Source I2S Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 #define RCC_I2SCLKSOURCE_PLLI2S ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 #define RCC_I2SCLKSOURCE_EXT ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 /** @defgroup RCC_MCO_Index MCO Index
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 #define RCC_MCO1 ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 #define RCC_MCO2 ((uint32_t)0x00000001)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 /** @defgroup RCC_MCO1_Clock_Source MCO1 Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 #define RCC_MCO1SOURCE_HSI ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 #define RCC_MCO1SOURCE_LSE RCC_CFGR_MCO1_0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 #define RCC_MCO1SOURCE_HSE RCC_CFGR_MCO1_1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 #define RCC_MCO1SOURCE_PLLCLK RCC_CFGR_MCO1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 /** @defgroup RCC_MCO2_Clock_Source MCO2 Clock Source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 #define RCC_MCO2SOURCE_SYSCLK ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 #define RCC_MCO2SOURCE_PLLI2SCLK RCC_CFGR_MCO2_0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 #define RCC_MCO2SOURCE_HSE RCC_CFGR_MCO2_1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 #define RCC_MCO2SOURCE_PLLCLK RCC_CFGR_MCO2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 /** @defgroup RCC_MCOx_Clock_Prescaler MCOx Clock Prescaler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 #define RCC_MCODIV_1 ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 #define RCC_MCODIV_2 RCC_CFGR_MCO1PRE_2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 #define RCC_MCODIV_3 ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 #define RCC_MCODIV_4 ((uint32_t)RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 #define RCC_MCODIV_5 RCC_CFGR_MCO1PRE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 /** @defgroup RCC_Interrupt Interrupts
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 #define RCC_IT_LSIRDY ((uint8_t)0x01)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 #define RCC_IT_LSERDY ((uint8_t)0x02)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 #define RCC_IT_HSIRDY ((uint8_t)0x04)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 #define RCC_IT_HSERDY ((uint8_t)0x08)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 #define RCC_IT_PLLRDY ((uint8_t)0x10)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 #define RCC_IT_PLLI2SRDY ((uint8_t)0x20)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 #define RCC_IT_CSS ((uint8_t)0x80)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 /** @defgroup RCC_Flag Flags
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 * Elements values convention: 0XXYYYYYb
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 * - YYYYY : Flag position in the register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 * - 0XX : Register index
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 * - 01: CR register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 * - 10: BDCR register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 * - 11: CSR register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 /* Flags in the CR register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 #define RCC_FLAG_HSIRDY ((uint8_t)0x21)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 #define RCC_FLAG_HSERDY ((uint8_t)0x31)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 #define RCC_FLAG_PLLRDY ((uint8_t)0x39)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 #define RCC_FLAG_PLLI2SRDY ((uint8_t)0x3B)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 /* Flags in the BDCR register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 #define RCC_FLAG_LSERDY ((uint8_t)0x41)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 /* Flags in the CSR register */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 #define RCC_FLAG_LSIRDY ((uint8_t)0x61)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 #define RCC_FLAG_BORRST ((uint8_t)0x79)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 #define RCC_FLAG_PINRST ((uint8_t)0x7A)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 #define RCC_FLAG_PORRST ((uint8_t)0x7B)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 #define RCC_FLAG_SFTRST ((uint8_t)0x7C)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 #define RCC_FLAG_IWDGRST ((uint8_t)0x7D)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 #define RCC_FLAG_WWDGRST ((uint8_t)0x7E)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 #define RCC_FLAG_LPWRRST ((uint8_t)0x7F)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 /** @defgroup RCC_Exported_Macros RCC Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 /** @defgroup RCC_AHB1_Clock_Enable_Disable AHB1 Peripheral Clock Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 * @brief Enable or disable the AHB1 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 #define __HAL_RCC_GPIOA_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOAEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 #define __HAL_RCC_GPIOB_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOBEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 #define __HAL_RCC_GPIOC_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 #define __HAL_RCC_GPIOD_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIODEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 #define __HAL_RCC_GPIOE_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOEEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 #define __HAL_RCC_GPIOH_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_GPIOHEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 #define __HAL_RCC_CRC_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_CRCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 #define __HAL_RCC_BKPSRAM_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_BKPSRAMEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 #define __HAL_RCC_CCMDATARAMEN_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_CCMDATARAMEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 #define __HAL_RCC_DMA1_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_DMA1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 #define __HAL_RCC_DMA2_CLK_ENABLE() (RCC->AHB1ENR |= (RCC_AHB1ENR_DMA2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 #define __HAL_RCC_GPIOA_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOAEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 #define __HAL_RCC_GPIOB_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOBEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 #define __HAL_RCC_GPIOC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 #define __HAL_RCC_GPIOD_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIODEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 #define __HAL_RCC_GPIOE_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOEEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 #define __HAL_RCC_GPIOH_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOHEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 #define __HAL_RCC_CRC_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_CRCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 #define __HAL_RCC_BKPSRAM_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_BKPSRAMEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 #define __HAL_RCC_CCMDATARAMEN_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_CCMDATARAMEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 #define __HAL_RCC_DMA1_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 #define __HAL_RCC_DMA2_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 /** @defgroup RCC_AHB2_Clock_Enable_Disable AHB2 Peripheral Clock Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 * @brief Enable or disable the AHB2 peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 #define __HAL_RCC_USB_OTG_FS_CLK_ENABLE() do {(RCC->AHB2ENR |= (RCC_AHB2ENR_OTGFSEN));\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 __HAL_RCC_SYSCFG_CLK_ENABLE();\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 }while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 #define __HAL_RCC_USB_OTG_FS_CLK_DISABLE() do { (RCC->AHB2ENR &= ~(RCC_AHB2ENR_OTGFSEN));\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 __HAL_RCC_SYSCFG_CLK_DISABLE();\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 }while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 #define __HAL_RCC_RNG_CLK_ENABLE() (RCC->AHB2ENR |= (RCC_AHB2ENR_RNGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 #define __HAL_RCC_RNG_CLK_DISABLE() (RCC->AHB2ENR &= ~(RCC_AHB2ENR_RNGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 /** @defgroup RCC_APB1_Clock_Enable_Disable APB1 Peripheral Clock Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 * @brief Enable or disable the Low Speed APB (APB1) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 #define __HAL_RCC_TIM2_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 #define __HAL_RCC_TIM3_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 #define __HAL_RCC_TIM4_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 #define __HAL_RCC_TIM5_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_TIM5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 #define __HAL_RCC_WWDG_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_WWDGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 #define __HAL_RCC_SPI2_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_SPI2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 #define __HAL_RCC_SPI3_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_SPI3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 #define __HAL_RCC_USART2_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_USART2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 #define __HAL_RCC_I2C1_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_I2C1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 #define __HAL_RCC_I2C2_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_I2C2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 #define __HAL_RCC_I2C3_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_I2C3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 #define __HAL_RCC_PWR_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_PWREN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 #define __HAL_RCC_TIM2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 #define __HAL_RCC_TIM3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 #define __HAL_RCC_TIM4_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 #define __HAL_RCC_TIM5_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM5EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 #define __HAL_RCC_WWDG_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_WWDGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 #define __HAL_RCC_SPI2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_SPI2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 #define __HAL_RCC_SPI3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_SPI3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 #define __HAL_RCC_USART2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 #define __HAL_RCC_I2C1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 #define __HAL_RCC_I2C2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C2EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 #define __HAL_RCC_I2C3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C3EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 #define __HAL_RCC_PWR_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_PWREN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 /** @defgroup RCC_APB2_Clock_Enable_Disable APB2 Peripheral Clock Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 * @brief Enable or disable the High Speed APB (APB2) peripheral clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 * @note After reset, the peripheral clock (used for registers read/write access)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 * is disabled and the application software has to enable this clock before
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 * using it.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 #define __HAL_RCC_TIM1_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_TIM1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 #define __HAL_RCC_USART1_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_USART1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 #define __HAL_RCC_USART6_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_USART6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 #define __HAL_RCC_ADC1_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_ADC1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 #define __HAL_RCC_SDIO_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SDIOEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 #define __HAL_RCC_SPI1_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SPI1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525 #define __HAL_RCC_SPI4_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SPI4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 #define __HAL_RCC_SYSCFG_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_SYSCFGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 #define __HAL_RCC_TIM9_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_TIM9EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 #define __HAL_RCC_TIM10_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_TIM10EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 #define __HAL_RCC_TIM11_CLK_ENABLE() (RCC->APB2ENR |= (RCC_APB2ENR_TIM11EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 #define __HAL_RCC_TIM1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 #define __HAL_RCC_USART1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_USART1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 #define __HAL_RCC_USART6_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_USART6EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 #define __HAL_RCC_ADC1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 #define __HAL_RCC_SDIO_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SDIOEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 #define __HAL_RCC_SPI1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI1EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537 #define __HAL_RCC_SPI4_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI4EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 #define __HAL_RCC_SYSCFG_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SYSCFGEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 #define __HAL_RCC_TIM9_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM9EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 #define __HAL_RCC_TIM10_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM10EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 #define __HAL_RCC_TIM11_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM11EN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 /** @defgroup RCC_AHB1_Force_Release_Reset AHB1 Force Release Reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547 * @brief Force or release AHB1 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 #define __HAL_RCC_AHB1_FORCE_RESET() (RCC->AHB1RSTR = 0xFFFFFFFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 #define __HAL_RCC_GPIOA_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOARST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 #define __HAL_RCC_GPIOB_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOBRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 #define __HAL_RCC_GPIOC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554 #define __HAL_RCC_GPIOD_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555 #define __HAL_RCC_GPIOE_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 #define __HAL_RCC_GPIOH_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557 #define __HAL_RCC_CRC_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 #define __HAL_RCC_DMA1_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 #define __HAL_RCC_DMA2_FORCE_RESET() (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561 #define __HAL_RCC_AHB1_RELEASE_RESET() (RCC->AHB1RSTR = 0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 #define __HAL_RCC_GPIOA_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOARST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563 #define __HAL_RCC_GPIOB_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOBRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 #define __HAL_RCC_GPIOC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565 #define __HAL_RCC_GPIOD_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIODRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566 #define __HAL_RCC_GPIOE_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOERST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 #define __HAL_RCC_GPIOF_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOFRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 #define __HAL_RCC_GPIOG_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 #define __HAL_RCC_GPIOH_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOHRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 #define __HAL_RCC_GPIOI_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOIRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 #define __HAL_RCC_CRC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_CRCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 #define __HAL_RCC_DMA1_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573 #define __HAL_RCC_DMA2_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 /** @defgroup RCC_AHB2_Force_Release_Reset AHB2 Force Release Reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 * @brief Force or release AHB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 #define __HAL_RCC_AHB2_FORCE_RESET() (RCC->AHB2RSTR = 0xFFFFFFFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583 #define __HAL_RCC_USB_OTG_FS_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 #define __HAL_RCC_AHB2_RELEASE_RESET() (RCC->AHB2RSTR = 0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 #define __HAL_RCC_USB_OTG_FS_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_OTGFSRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 #define __HAL_RCC_RNG_FORCE_RESET() (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 #define __HAL_RCC_RNG_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_RNGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 /** @defgroup RCC_APB1_Force_Release_Reset APB1 Force Release Reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 * @brief Force or release APB1 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 #define __HAL_RCC_APB1_FORCE_RESET() (RCC->APB1RSTR = 0xFFFFFFFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 #define __HAL_RCC_TIM2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600 #define __HAL_RCC_TIM3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 #define __HAL_RCC_TIM4_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 #define __HAL_RCC_TIM5_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603 #define __HAL_RCC_WWDG_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_WWDGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 #define __HAL_RCC_SPI2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605 #define __HAL_RCC_SPI3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 #define __HAL_RCC_USART2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_USART2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607 #define __HAL_RCC_I2C1_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608 #define __HAL_RCC_I2C2_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 #define __HAL_RCC_I2C3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
610 #define __HAL_RCC_PWR_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_PWRRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612 #define __HAL_RCC_APB1_RELEASE_RESET() (RCC->APB1RSTR = 0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 #define __HAL_RCC_TIM2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 #define __HAL_RCC_TIM3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615 #define __HAL_RCC_TIM4_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 #define __HAL_RCC_TIM5_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM5RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 #define __HAL_RCC_WWDG_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_WWDGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618 #define __HAL_RCC_SPI2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPI2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619 #define __HAL_RCC_SPI3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPI3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620 #define __HAL_RCC_USART2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621 #define __HAL_RCC_I2C1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622 #define __HAL_RCC_I2C2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C2RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623 #define __HAL_RCC_I2C3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C3RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624 #define __HAL_RCC_PWR_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_PWRRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629 /** @defgroup RCC_APB2_Force_Release_Reset APB2 Force Release Reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630 * @brief Force or release APB2 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633 #define __HAL_RCC_APB2_FORCE_RESET() (RCC->APB2RSTR = 0xFFFFFFFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634 #define __HAL_RCC_TIM1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 #define __HAL_RCC_USART1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 #define __HAL_RCC_USART6_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_USART6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637 #define __HAL_RCC_ADC_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_ADCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638 #define __HAL_RCC_SDIO_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SDIORST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639 #define __HAL_RCC_SPI1_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 #define __HAL_RCC_SPI4_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641 #define __HAL_RCC_SYSCFG_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_SYSCFGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642 #define __HAL_RCC_TIM9_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM9RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643 #define __HAL_RCC_TIM10_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM10RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 #define __HAL_RCC_TIM11_FORCE_RESET() (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM11RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646 #define __HAL_RCC_APB2_RELEASE_RESET() (RCC->APB2RSTR = 0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647 #define __HAL_RCC_TIM1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 #define __HAL_RCC_USART1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_USART1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649 #define __HAL_RCC_USART6_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_USART6RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 #define __HAL_RCC_ADC_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_ADCRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 #define __HAL_RCC_SDIO_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SDIORST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652 #define __HAL_RCC_SPI1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI1RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653 #define __HAL_RCC_SPI4_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI4RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654 #define __HAL_RCC_SYSCFG_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SYSCFGRST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 #define __HAL_RCC_TIM9_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM9RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656 #define __HAL_RCC_TIM10_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM10RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657 #define __HAL_RCC_TIM11_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM11RST))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662 /** @defgroup RCC_AHB3_Force_Release_Reset AHB3 Force Release Reset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 * @brief Force or release AHB3 peripheral reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666 #define __HAL_RCC_AHB3_FORCE_RESET() (RCC->AHB3RSTR = 0xFFFFFFFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667 #define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672 /** @defgroup RCC_AHB1_LowPower_Enable_Disable AHB1 Peripheral Low Power Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673 * @brief Enable or disable the AHB1 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 * @note After wake-up from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680 #define __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOALPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681 #define __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOBLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682 #define __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 #define __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIODLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 #define __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOELPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685 #define __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOHLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686 #define __HAL_RCC_CRC_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_CRCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687 #define __HAL_RCC_FLITF_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_FLITFLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 #define __HAL_RCC_SRAM1_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 #define __HAL_RCC_BKPSRAM_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_BKPSRAMLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690 #define __HAL_RCC_DMA1_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691 #define __HAL_RCC_DMA2_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693 #define __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOALPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 #define __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOBLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695 #define __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696 #define __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIODLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 #define __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOELPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698 #define __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOHLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699 #define __HAL_RCC_CRC_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_CRCLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700 #define __HAL_RCC_FLITF_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_FLITFLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 #define __HAL_RCC_SRAM1_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
702 #define __HAL_RCC_BKPSRAM_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_BKPSRAMLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
703 #define __HAL_RCC_DMA1_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
704 #define __HAL_RCC_DMA2_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
705 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
706 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
707 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
708
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
709 /** @defgroup RCC_AHB2_LowPower_Enable_Disable AHB2 Peripheral Low Power Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
710 * @brief Enable or disable the AHB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
711 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
712 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
713 * @note After wake-up from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
714 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
715 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
716 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
717 #define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_OTGFSLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
718
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
719 #define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_OTGFSLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
720
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
721 #define __HAL_RCC_RNG_CLK_SLEEP_ENABLE() (RCC->AHB2LPENR |= (RCC_AHB2LPENR_RNGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
722 #define __HAL_RCC_RNG_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_RNGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
723 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
724 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
725 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
726
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
727 /** @defgroup RCC_APB1_LowPower_Enable_Disable APB1 Peripheral Low Power Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
728 * @brief Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
729 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
730 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
731 * @note After wake-up from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
732 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
733 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
734 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
735 #define __HAL_RCC_TIM2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
736 #define __HAL_RCC_TIM3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
737 #define __HAL_RCC_TIM4_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
738 #define __HAL_RCC_TIM5_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
739 #define __HAL_RCC_WWDG_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_WWDGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
740 #define __HAL_RCC_SPI2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_SPI2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
741 #define __HAL_RCC_SPI3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_SPI3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
742 #define __HAL_RCC_USART2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_USART2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
743 #define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
744 #define __HAL_RCC_I2C2_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
745 #define __HAL_RCC_I2C3_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
746 #define __HAL_RCC_PWR_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_PWRLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
747
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
748 #define __HAL_RCC_TIM2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
749 #define __HAL_RCC_TIM3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
750 #define __HAL_RCC_TIM4_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
751 #define __HAL_RCC_TIM5_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM5LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
752 #define __HAL_RCC_WWDG_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_WWDGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
753 #define __HAL_RCC_SPI2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
754 #define __HAL_RCC_SPI3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
755 #define __HAL_RCC_USART2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
756 #define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
757 #define __HAL_RCC_I2C2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C2LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
758 #define __HAL_RCC_I2C3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C3LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
759 #define __HAL_RCC_PWR_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_PWRLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
760 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
761 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
762 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
763
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
764 /** @defgroup RCC_APB2_LowPower_Enable_Disable APB2 Peripheral Low Power Enable Disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
765 * @brief Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
766 * @note Peripheral clock gating in SLEEP mode can be used to further reduce
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
767 * power consumption.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
768 * @note After wake-up from SLEEP mode, the peripheral clock is enabled again.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
769 * @note By default, all peripheral clocks are enabled during SLEEP mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
770 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
771 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
772 #define __HAL_RCC_TIM1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
773 #define __HAL_RCC_USART1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_USART1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
774 #define __HAL_RCC_USART6_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_USART6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
775 #define __HAL_RCC_ADC1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
776 #define __HAL_RCC_SDIO_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SDIOLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
777 #define __HAL_RCC_SPI1_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
778 #define __HAL_RCC_SPI4_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
779 #define __HAL_RCC_SYSCFG_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_SYSCFGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
780 #define __HAL_RCC_TIM9_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM9LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
781 #define __HAL_RCC_TIM10_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM10LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
782 #define __HAL_RCC_TIM11_CLK_SLEEP_ENABLE() (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM11LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
783
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
784 #define __HAL_RCC_TIM1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
785 #define __HAL_RCC_USART1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_USART1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
786 #define __HAL_RCC_USART6_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_USART6LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
787 #define __HAL_RCC_ADC1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
788 #define __HAL_RCC_SDIO_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SDIOLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
789 #define __HAL_RCC_SPI1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI1LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
790 #define __HAL_RCC_SPI4_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI4LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
791 #define __HAL_RCC_SYSCFG_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SYSCFGLPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
792 #define __HAL_RCC_TIM9_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM9LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
793 #define __HAL_RCC_TIM10_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM10LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
794 #define __HAL_RCC_TIM11_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM11LPEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
795 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
796 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
797 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
798
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
799 /** @defgroup RCC_HSI_Configuration HSI Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
800 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
801 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
802
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
803 /** @brief Macros to enable or disable the Internal High Speed oscillator (HSI).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
804 * @note The HSI is stopped by hardware when entering STOP and STANDBY modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
805 * It is used (enabled by hardware) as system clock source after startup
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
806 * from Reset, wake-up from STOP and STANDBY mode, or in case of failure
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
807 * of the HSE used directly or indirectly as system clock (if the Clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
808 * Security System CSS is enabled).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
809 * @note HSI can not be stopped if it is used as system clock source. In this case,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
810 * you have to select another source of the system clock then stop the HSI.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
811 * @note After enabling the HSI, the application software should wait on HSIRDY
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
812 * flag to be set indicating that HSI clock is stable and can be used as
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
813 * system clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
814 * This parameter can be: ENABLE or DISABLE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
815 * @note When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
816 * clock cycles.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
817 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
818 #define __HAL_RCC_HSI_ENABLE() (*(__IO uint32_t *) RCC_CR_HSION_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
819 #define __HAL_RCC_HSI_DISABLE() (*(__IO uint32_t *) RCC_CR_HSION_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
820
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
821 /** @brief Macro to adjust the Internal High Speed oscillator (HSI) calibration value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
822 * @note The calibration is used to compensate for the variations in voltage
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
823 * and temperature that influence the frequency of the internal HSI RC.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
824 * @param __HSICalibrationValue__: specifies the calibration trimming value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
825 * This parameter must be a number between 0 and 0x1F.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
826 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
827 #define __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(__HSICalibrationValue__) (MODIFY_REG(RCC->CR,\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
828 RCC_CR_HSITRIM, (uint32_t)(__HSICalibrationValue__) << POSITION_VAL(RCC_CR_HSITRIM)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
829 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
830 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
831 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
832
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
833 /** @defgroup RCC_LSI_Configuration LSI Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
834 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
835 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
836
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
837 /** @brief Macros to enable or disable the Internal Low Speed oscillator (LSI).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
838 * @note After enabling the LSI, the application software should wait on
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
839 * LSIRDY flag to be set indicating that LSI clock is stable and can
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
840 * be used to clock the IWDG and/or the RTC.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
841 * @note LSI can not be disabled if the IWDG is running.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
842 * @note When the LSI is stopped, LSIRDY flag goes low after 6 LSI oscillator
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
843 * clock cycles.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
844 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
845 #define __HAL_RCC_LSI_ENABLE() (*(__IO uint32_t *) RCC_CSR_LSION_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
846 #define __HAL_RCC_LSI_DISABLE() (*(__IO uint32_t *) RCC_CSR_LSION_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
847 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
848 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
849 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
850
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
851 /** @defgroup RCC_HSE_Configuration HSE Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
852 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
853 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
854
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
855 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
856 * @brief Macro to configure the External High Speed oscillator (HSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
857 * @note After enabling the HSE (RCC_HSE_ON or RCC_HSE_Bypass), the application
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
858 * software should wait on HSERDY flag to be set indicating that HSE clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
859 * is stable and can be used to clock the PLL and/or system clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
860 * @note HSE state can not be changed if it is used directly or through the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
861 * PLL as system clock. In this case, you have to select another source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
862 * of the system clock then change the HSE state (ex. disable it).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
863 * @note The HSE is stopped by hardware when entering STOP and STANDBY modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
864 * @note This function reset the CSSON bit, so if the clock security system(CSS)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
865 * was previously enabled you have to enable it again after calling this
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
866 * function.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
867 * @param __STATE__: specifies the new state of the HSE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
868 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
869 * @arg RCC_HSE_OFF: turn OFF the HSE oscillator, HSERDY flag goes low after
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
870 * 6 HSE oscillator clock cycles.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
871 * @arg RCC_HSE_ON: turn ON the HSE oscillator.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
872 * @arg RCC_HSE_BYPASS: HSE oscillator bypassed with external clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
873 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
874 #define __HAL_RCC_HSE_CONFIG(__STATE__) (*(__IO uint8_t *) RCC_CR_BYTE2_ADDRESS = (__STATE__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
875 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
876 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
877 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
878
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
879 /** @defgroup RCC_LSE_Configuration LSE Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
880 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
881 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
882
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
883 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
884 * @brief Macro to configure the External Low Speed oscillator (LSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
885 * @note As the LSE is in the Backup domain and write access is denied to
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
886 * this domain after reset, you have to enable write access using
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
887 * HAL_PWR_EnableBkUpAccess() function before to configure the LSE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
888 * (to be done once after reset).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
889 * @note After enabling the LSE (RCC_LSE_ON or RCC_LSE_BYPASS), the application
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
890 * software should wait on LSERDY flag to be set indicating that LSE clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
891 * is stable and can be used to clock the RTC.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
892 * @param __STATE__: specifies the new state of the LSE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
893 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
894 * @arg RCC_LSE_OFF: turn OFF the LSE oscillator, LSERDY flag goes low after
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
895 * 6 LSE oscillator clock cycles.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
896 * @arg RCC_LSE_ON: turn ON the LSE oscillator.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
897 * @arg RCC_LSE_BYPASS: LSE oscillator bypassed with external clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
898 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
899 #define __HAL_RCC_LSE_CONFIG(__STATE__) (*(__IO uint8_t *) RCC_BDCR_BYTE0_ADDRESS = (__STATE__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
900
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
901 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
902 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
903 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
904
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
905 /** @defgroup RCC_Internal_RTC_Clock_Configuration RTC Clock Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
906 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
907 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
908
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
909 /** @brief Macros to enable or disable the RTC clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
910 * @note These macros must be used only after the RTC clock source was selected.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
911 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
912 #define __HAL_RCC_RTC_ENABLE() (*(__IO uint32_t *) RCC_BDCR_RTCEN_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
913 #define __HAL_RCC_RTC_DISABLE() (*(__IO uint32_t *) RCC_BDCR_RTCEN_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
914
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
915 /** @brief Macros to configure the RTC clock (RTCCLK).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
916 * @note As the RTC clock configuration bits are in the Backup domain and write
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
917 * access is denied to this domain after reset, you have to enable write
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
918 * access using the Power Backup Access macro before to configure
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
919 * the RTC clock source (to be done once after reset).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
920 * @note Once the RTC clock is configured it can't be changed unless the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
921 * Backup domain is reset using __HAL_RCC_BackupReset_RELEASE() macro, or by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
922 * a Power On Reset (POR).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
923 * @param __RTCCLKSource__: specifies the RTC clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
924 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
925 * @arg RCC_RTCCLKSOURCE_LSE: LSE selected as RTC clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
926 * @arg RCC_RTCCLKSOURCE_LSI: LSI selected as RTC clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
927 * @arg RCC_RTCCLKSOURCE_HSE_DIVx: HSE clock divided by x selected
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
928 * as RTC clock, where x:[2,31]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
929 * @note If the LSE or LSI is used as RTC clock source, the RTC continues to
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
930 * work in STOP and STANDBY modes, and can be used as wake-up source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
931 * However, when the HSE clock is used as RTC clock source, the RTC
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
932 * cannot be used in STOP and STANDBY modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
933 * @note The maximum input clock frequency for RTC is 1MHz (when using HSE as
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
934 * RTC clock source).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
935 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
936 #define __HAL_RCC_RTC_CLKPRESCALER(__RTCCLKSource__) (((__RTCCLKSource__) & RCC_BDCR_RTCSEL) == RCC_BDCR_RTCSEL) ? \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
937 MODIFY_REG(RCC->CFGR, RCC_CFGR_RTCPRE, ((__RTCCLKSource__) & 0xFFFFCFF)) : CLEAR_BIT(RCC->CFGR, RCC_CFGR_RTCPRE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
938
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
939 #define __HAL_RCC_RTC_CONFIG(__RTCCLKSource__) do { __HAL_RCC_RTC_CLKPRESCALER(__RTCCLKSource__); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
940 RCC->BDCR |= ((__RTCCLKSource__) & 0x00000FFF); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
941 } while (0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
942
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
943 /** @brief Macros to force or release the Backup domain reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
944 * @note This function resets the RTC peripheral (including the backup registers)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
945 * and the RTC clock source selection in RCC_CSR register.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
946 * @note The BKPSRAM is not affected by this reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
947 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
948 #define __HAL_RCC_BACKUPRESET_FORCE() (*(__IO uint32_t *) RCC_BDCR_BDRST_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
949 #define __HAL_RCC_BACKUPRESET_RELEASE() (*(__IO uint32_t *) RCC_BDCR_BDRST_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
950 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
951 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
952 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
953
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
954 /** @defgroup RCC_PLL_Configuration PLL Configuration
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
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
958 /** @brief Macros to enable or disable the main PLL.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
959 * @note After enabling the main PLL, the application software should wait on
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
960 * PLLRDY flag to be set indicating that PLL clock is stable and can
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
961 * be used as system clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
962 * @note The main PLL can not be disabled if it is used as system clock source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
963 * @note The main PLL is disabled by hardware when entering STOP and STANDBY modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
964 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
965 #define __HAL_RCC_PLL_ENABLE() (*(__IO uint32_t *) RCC_CR_PLLON_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
966 #define __HAL_RCC_PLL_DISABLE() (*(__IO uint32_t *) RCC_CR_PLLON_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
967
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
968 /** @brief Macro to configure the main PLL clock source, multiplication and division factors.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
969 * @note This function must be used only when the main PLL is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
970 * @param __RCC_PLLSource__: specifies the PLL entry clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
971 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
972 * @arg RCC_PLLSOURCE_HSI: HSI oscillator clock selected as PLL clock entry
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
973 * @arg RCC_PLLSOURCE_HSE: HSE oscillator clock selected as PLL clock entry
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
974 * @note This clock source (RCC_PLLSource) is common for the main PLL and PLLI2S.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
975 * @param __PLLM__: specifies the division factor for PLL VCO input clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
976 * This parameter must be a number between Min_Data = 2 and Max_Data = 63.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
977 * @note You have to set the PLLM parameter correctly to ensure that the VCO input
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
978 * frequency ranges from 1 to 2 MHz. It is recommended to select a frequency
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
979 * of 2 MHz to limit PLL jitter.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
980 * @param __PLLN__: specifies the multiplication factor for PLL VCO output clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
981 * This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
982 * @note You have to set the PLLN parameter correctly to ensure that the VCO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
983 * output frequency is between 192 and 432 MHz.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
984 * @param __PLLP__: specifies the division factor for main system clock (SYSCLK)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
985 * This parameter must be a number in the range {2, 4, 6, or 8}.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
986 * @note You have to set the PLLP parameter correctly to not exceed 168 MHz on
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
987 * the System clock frequency.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
988 * @param __PLLQ__: specifies the division factor for OTG FS, SDIO and RNG clocks
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
989 * This parameter must be a number between Min_Data = 2 and Max_Data = 15.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
990 * @note If the USB OTG FS is used in your application, you have to set the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
991 * PLLQ parameter correctly to have 48 MHz clock for the USB. However,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
992 * the SDIO and RNG need a frequency lower than or equal to 48 MHz to work
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
993 * correctly.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
994 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
995 #define __HAL_RCC_PLL_CONFIG(__RCC_PLLSource__, __PLLM__, __PLLN__, __PLLP__, __PLLQ__)\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
996 (RCC->PLLCFGR = (0x20000000 | (__PLLM__) | ((__PLLN__) << POSITION_VAL(RCC_PLLCFGR_PLLN)) | \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
997 ((((__PLLP__) >> 1) -1) << POSITION_VAL(RCC_PLLCFGR_PLLP)) | (__RCC_PLLSource__) | \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
998 ((__PLLQ__) << POSITION_VAL(RCC_PLLCFGR_PLLQ))))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
999 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1000 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1001 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1002
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1003 /** @defgroup RCC_PLL_I2S_Configuration PLL I2S Configuration
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1004 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1005 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1006
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1007 /** @brief Macro to configure the I2S clock source (I2SCLK).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1008 * @note This function must be called before enabling the I2S APB clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1009 * @param __SOURCE__: specifies the I2S clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1010 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1011 * @arg RCC_I2SCLKSOURCE_PLLI2S: PLLI2S clock used as I2S clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1012 * @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1013 * used as I2S clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1014 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1015 #define __HAL_RCC_I2S_CONFIG(__SOURCE__) (*(__IO uint32_t *) RCC_CFGR_I2SSRC_BB = (__SOURCE__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1016
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1017 /** @brief Macros to enable or disable the PLLI2S.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1018 * @note The PLLI2S is disabled by hardware when entering STOP and STANDBY modes.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1019 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1020 #define __HAL_RCC_PLLI2S_ENABLE() (*(__IO uint32_t *) RCC_CR_PLLI2SON_BB = ENABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1021 #define __HAL_RCC_PLLI2S_DISABLE() (*(__IO uint32_t *) RCC_CR_PLLI2SON_BB = DISABLE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1022
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1023 /** @brief Macro to configure the PLLI2S clock multiplication and division factors .
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1024 * @note This macro must be used only when the PLLI2S is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1025 * @note PLLI2S clock source is common with the main PLL (configured in
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1026 * HAL_RCC_ClockConfig() API).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1027 * @param __PLLI2SN__: specifies the multiplication factor for PLLI2S VCO output clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1028 * This parameter must be a number between Min_Data = 192 and Max_Data = 432.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1029 * @note You have to set the PLLI2SN parameter correctly to ensure that the VCO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1030 * output frequency is between Min_Data = 192 and Max_Data = 432 MHz.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1031 * @param __PLLI2SR__: specifies the division factor for I2S clock
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1032 * This parameter must be a number between Min_Data = 2 and Max_Data = 7.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1033 * @note You have to set the PLLI2SR parameter correctly to not exceed 192 MHz
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1034 * on the I2S clock frequency.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1035 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1036 #define __HAL_RCC_PLLI2S_CONFIG(__PLLI2SN__, __PLLI2SR__) (RCC->PLLI2SCFGR = ((__PLLI2SN__) << POSITION_VAL(RCC_PLLI2SCFGR_PLLI2SN)) | ((__PLLI2SR__) << POSITION_VAL(RCC_PLLI2SCFGR_PLLI2SR)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1037 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1038 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1039 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1040
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1041 /** @defgroup RCC_Get_Clock_source Get Clock source
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1042 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1043 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1044
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1045 /** @brief Macro to get the clock source used as system clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1046 * @retval The clock source used as system clock. The returned value can be one
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1047 * of the following:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1048 * - RCC_CFGR_SWS_HSI: HSI used as system clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1049 * - RCC_CFGR_SWS_HSE: HSE used as system clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1050 * - RCC_CFGR_SWS_PLL: PLL used as system clock.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1051 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1052 #define __HAL_RCC_GET_SYSCLK_SOURCE() ((uint32_t)(RCC->CFGR & RCC_CFGR_SWS))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1053
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1054 /** @brief Macro to get the oscillator used as PLL clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1055 * @retval The oscillator used as PLL clock source. The returned value can be one
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1056 * of the following:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1057 * - RCC_PLLSOURCE_HSI: HSI oscillator is used as PLL clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1058 * - RCC_PLLSOURCE_HSE: HSE oscillator is used as PLL clock source.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1059 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1060 #define __HAL_RCC_GET_PLL_OSCSOURCE() ((uint32_t)(RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1061 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1062 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1063 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1064
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1065 /** @defgroup RCC_Flags_Interrupts_Management Flags Interrupts Management
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1066 * @brief macros to manage the specified RCC Flags and interrupts.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1067 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1068 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1069
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1070 /** @brief Enable RCC interrupt (Perform Byte access to RCC_CIR[14:8] bits to enable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1071 * the selected interrupts).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1072 * @param __INTERRUPT__: specifies the RCC interrupt sources to be enabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1073 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1074 * @arg RCC_IT_LSIRDY: LSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1075 * @arg RCC_IT_LSERDY: LSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1076 * @arg RCC_IT_HSIRDY: HSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1077 * @arg RCC_IT_HSERDY: HSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1078 * @arg RCC_IT_PLLRDY: Main PLL ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1079 * @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1080 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1081 #define __HAL_RCC_ENABLE_IT(__INTERRUPT__) (*(__IO uint8_t *) RCC_CIR_BYTE1_ADDRESS |= (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1082
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1083 /** @brief Disable RCC interrupt (Perform Byte access to RCC_CIR[14:8] bits to disable
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1084 * the selected interrupts).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1085 * @param __INTERRUPT__: specifies the RCC interrupt sources to be disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1086 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1087 * @arg RCC_IT_LSIRDY: LSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1088 * @arg RCC_IT_LSERDY: LSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1089 * @arg RCC_IT_HSIRDY: HSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1090 * @arg RCC_IT_HSERDY: HSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1091 * @arg RCC_IT_PLLRDY: Main PLL ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1092 * @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1093 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1094 #define __HAL_RCC_DISABLE_IT(__INTERRUPT__) (*(__IO uint8_t *) RCC_CIR_BYTE1_ADDRESS &= ~(__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1095
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1096 /** @brief Clear the RCC's interrupt pending bits (Perform Byte access to RCC_CIR[23:16]
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1097 * bits to clear the selected interrupt pending bits.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1098 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1099 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1100 * @arg RCC_IT_LSIRDY: LSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1101 * @arg RCC_IT_LSERDY: LSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1102 * @arg RCC_IT_HSIRDY: HSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1103 * @arg RCC_IT_HSERDY: HSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1104 * @arg RCC_IT_PLLRDY: Main PLL ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1105 * @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1106 * @arg RCC_IT_CSS: Clock Security System interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1107 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1108 #define __HAL_RCC_CLEAR_IT(__INTERRUPT__) (*(__IO uint8_t *) RCC_CIR_BYTE2_ADDRESS = (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1110 /** @brief Check the RCC's interrupt has occurred or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1111 * @param __INTERRUPT__: specifies the RCC interrupt source to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1112 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1113 * @arg RCC_IT_LSIRDY: LSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1114 * @arg RCC_IT_LSERDY: LSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1115 * @arg RCC_IT_HSIRDY: HSI ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1116 * @arg RCC_IT_HSERDY: HSE ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1117 * @arg RCC_IT_PLLRDY: Main PLL ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1118 * @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1119 * @arg RCC_IT_CSS: Clock Security System interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1120 * @retval The new state of __INTERRUPT__ (TRUE or FALSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1121 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1122 #define __HAL_RCC_GET_IT(__INTERRUPT__) ((RCC->CIR & (__INTERRUPT__)) == (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1123
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1124 /** @brief Set RMVF bit to clear the reset flags: RCC_FLAG_PINRST, RCC_FLAG_PORRST,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1125 * RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_WWDGRST and RCC_FLAG_LPWRRST.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1126 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1127 #define __HAL_RCC_CLEAR_RESET_FLAGS() (RCC->CSR |= RCC_CSR_RMVF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1128
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1129 /** @brief Check RCC flag is set or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1130 * @param __FLAG__: specifies the flag to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1131 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1132 * @arg RCC_FLAG_HSIRDY: HSI oscillator clock ready.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1133 * @arg RCC_FLAG_HSERDY: HSE oscillator clock ready.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1134 * @arg RCC_FLAG_PLLRDY: Main PLL clock ready.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1135 * @arg RCC_FLAG_PLLI2SRDY: PLLI2S clock ready.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1136 * @arg RCC_FLAG_LSERDY: LSE oscillator clock ready.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1137 * @arg RCC_FLAG_LSIRDY: LSI oscillator clock ready.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1138 * @arg RCC_FLAG_BORRST: POR/PDR or BOR reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1139 * @arg RCC_FLAG_PINRST: Pin reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1140 * @arg RCC_FLAG_PORRST: POR/PDR reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1141 * @arg RCC_FLAG_SFTRST: Software reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1142 * @arg RCC_FLAG_IWDGRST: Independent Watchdog reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1143 * @arg RCC_FLAG_WWDGRST: Window Watchdog reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1144 * @arg RCC_FLAG_LPWRRST: Low Power reset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1145 * @retval The new state of __FLAG__ (TRUE or FALSE).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1146 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1147 #define RCC_FLAG_MASK ((uint8_t)0x1F)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1148 #define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5) == 1)? RCC->CR :((((__FLAG__) >> 5) == 2) ? RCC->BDCR :((((__FLAG__) >> 5) == 3)? RCC->CSR :RCC->CIR))) & ((uint32_t)1 << ((__FLAG__) & RCC_FLAG_MASK)))!= 0)? 1 : 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1150 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1151 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1152 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1153
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1154 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1155 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1156 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1157
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1158 /* Include RCC HAL Extension module */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1159 #include "stm32f4xx_hal_rcc_ex.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1160
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1161 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1162 /** @addtogroup RCC_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1163 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1164 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1165
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1166 /** @addtogroup RCC_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1167 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1168 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1169 /* Initialization and de-initialization functions ******************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1170 void HAL_RCC_DeInit(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1171 HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1172 HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);
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 /** @addtogroup RCC_Exported_Functions_Group2
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 /* Peripheral Control functions ************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1181 void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1182 void HAL_RCC_EnableCSS(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1183 void HAL_RCC_DisableCSS(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1184 uint32_t HAL_RCC_GetSysClockFreq(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1185 uint32_t HAL_RCC_GetHCLKFreq(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1186 uint32_t HAL_RCC_GetPCLK1Freq(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1187 uint32_t HAL_RCC_GetPCLK2Freq(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1188 void HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1189 void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1190
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1191 /* CSS NMI IRQ handler */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1192 void HAL_RCC_NMI_IRQHandler(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1193
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1194 /* User Callbacks in non blocking mode (IT mode) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1195 void HAL_RCC_CSSCallback(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1196
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1197 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1198 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1199 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1200
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1201 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1202 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1203 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1204
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1205 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1206 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1207 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1208 /** @defgroup RCC_Private_Constants RCC Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1209 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1210 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1211
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1212 /** @defgroup RCC_BitAddress_AliasRegion RCC BitAddress AliasRegion
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1213 * @brief RCC registers bit address in the alias region
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1214 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1215 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1216 #define RCC_OFFSET (RCC_BASE - PERIPH_BASE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1217 /* --- CR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1218 /* Alias word address of HSION bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1219 #define RCC_CR_OFFSET (RCC_OFFSET + 0x00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1220 #define RCC_HSION_BIT_NUMBER 0x00
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1221 #define RCC_CR_HSION_BB (PERIPH_BB_BASE + (RCC_CR_OFFSET * 32) + (RCC_HSION_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1222 /* Alias word address of CSSON bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1223 #define RCC_CSSON_BIT_NUMBER 0x13
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1224 #define RCC_CR_CSSON_BB (PERIPH_BB_BASE + (RCC_CR_OFFSET * 32) + (RCC_CSSON_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1225 /* Alias word address of PLLON bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1226 #define RCC_PLLON_BIT_NUMBER 0x18
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1227 #define RCC_CR_PLLON_BB (PERIPH_BB_BASE + (RCC_CR_OFFSET * 32) + (RCC_PLLON_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1228 /* Alias word address of PLLI2SON bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1229 #define RCC_PLLI2SON_BIT_NUMBER 0x1A
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1230 #define RCC_CR_PLLI2SON_BB (PERIPH_BB_BASE + (RCC_CR_OFFSET * 32) + (RCC_PLLI2SON_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1231
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1232 /* --- CFGR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1233 /* Alias word address of I2SSRC bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1234 #define RCC_CFGR_OFFSET (RCC_OFFSET + 0x08)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1235 #define RCC_I2SSRC_BIT_NUMBER 0x17
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1236 #define RCC_CFGR_I2SSRC_BB (PERIPH_BB_BASE + (RCC_CFGR_OFFSET * 32) + (RCC_I2SSRC_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1237
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1238 /* --- BDCR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1239 /* Alias word address of RTCEN bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1240 #define RCC_BDCR_OFFSET (RCC_OFFSET + 0x70)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1241 #define RCC_RTCEN_BIT_NUMBER 0x0F
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1242 #define RCC_BDCR_RTCEN_BB (PERIPH_BB_BASE + (RCC_BDCR_OFFSET * 32) + (RCC_RTCEN_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1243 /* Alias word address of BDRST bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1244 #define RCC_BDRST_BIT_NUMBER 0x10
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1245 #define RCC_BDCR_BDRST_BB (PERIPH_BB_BASE + (RCC_BDCR_OFFSET * 32) + (RCC_BDRST_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1246
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1247 /* --- CSR Register ---*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1248 /* Alias word address of LSION bit */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1249 #define RCC_CSR_OFFSET (RCC_OFFSET + 0x74)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1250 #define RCC_LSION_BIT_NUMBER 0x00
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1251 #define RCC_CSR_LSION_BB (PERIPH_BB_BASE + (RCC_CSR_OFFSET * 32) + (RCC_LSION_BIT_NUMBER * 4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1252
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1253 /* CR register byte 3 (Bits[23:16]) base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1254 #define RCC_CR_BYTE2_ADDRESS ((uint32_t)0x40023802)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1255
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1256 /* CIR register byte 2 (Bits[15:8]) base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1257 #define RCC_CIR_BYTE1_ADDRESS ((uint32_t)(RCC_BASE + 0x0C + 0x01))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1258
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1259 /* CIR register byte 3 (Bits[23:16]) base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1260 #define RCC_CIR_BYTE2_ADDRESS ((uint32_t)(RCC_BASE + 0x0C + 0x02))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1261
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1262 /* BDCR register base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1263 #define RCC_BDCR_BYTE0_ADDRESS (PERIPH_BASE + RCC_BDCR_OFFSET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1264
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1265 #define RCC_DBP_TIMEOUT_VALUE ((uint32_t)100)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1266 #define RCC_LSE_TIMEOUT_VALUE ((uint32_t)5000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1267 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1268 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1269 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1270
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1271 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1272 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1273 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1274
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1275 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1276 /** @addtogroup RCC_Private_Macros RCC Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1277 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1278 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1279
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1280 /** @defgroup RCC_IS_RCC_Definitions RCC Private macros to check input parameters
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1281 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1282 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1283 #define IS_RCC_OSCILLATORTYPE(OSCILLATOR) ((OSCILLATOR) <= 15)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1284
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1285 #define IS_RCC_HSE(HSE) (((HSE) == RCC_HSE_OFF) || ((HSE) == RCC_HSE_ON) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1286 ((HSE) == RCC_HSE_BYPASS))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1287
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1288 #define IS_RCC_LSE(LSE) (((LSE) == RCC_LSE_OFF) || ((LSE) == RCC_LSE_ON) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1289 ((LSE) == RCC_LSE_BYPASS))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1290
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1291 #define IS_RCC_HSI(HSI) (((HSI) == RCC_HSI_OFF) || ((HSI) == RCC_HSI_ON))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1292
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1293 #define IS_RCC_LSI(LSI) (((LSI) == RCC_LSI_OFF) || ((LSI) == RCC_LSI_ON))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1294
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1295 #define IS_RCC_PLL(PLL) (((PLL) == RCC_PLL_NONE) ||((PLL) == RCC_PLL_OFF) || ((PLL) == RCC_PLL_ON))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1296
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1297 #define IS_RCC_PLLSOURCE(SOURCE) (((SOURCE) == RCC_PLLSOURCE_HSI) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1298 ((SOURCE) == RCC_PLLSOURCE_HSE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1299
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1300 #define IS_RCC_SYSCLKSOURCE(SOURCE) (((SOURCE) == RCC_SYSCLKSOURCE_HSI) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1301 ((SOURCE) == RCC_SYSCLKSOURCE_HSE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1302 ((SOURCE) == RCC_SYSCLKSOURCE_PLLCLK))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1303 #define IS_RCC_PLLM_VALUE(VALUE) ((VALUE) <= 63)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1304
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1305 #define IS_RCC_PLLN_VALUE(VALUE) ((192 <= (VALUE)) && ((VALUE) <= 432))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1306
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1307 #define IS_RCC_PLLP_VALUE(VALUE) (((VALUE) == 2) || ((VALUE) == 4) || ((VALUE) == 6) || ((VALUE) == 8))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1308
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1309 #define IS_RCC_PLLQ_VALUE(VALUE) ((4 <= (VALUE)) && ((VALUE) <= 15))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1310
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1311 #define IS_RCC_PLLI2SN_VALUE(VALUE) ((192 <= (VALUE)) && ((VALUE) <= 432))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1312
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1313 #define IS_RCC_PLLI2SR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1314
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1315 #define IS_RCC_HCLK(HCLK) (((HCLK) == RCC_SYSCLK_DIV1) || ((HCLK) == RCC_SYSCLK_DIV2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1316 ((HCLK) == RCC_SYSCLK_DIV4) || ((HCLK) == RCC_SYSCLK_DIV8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1317 ((HCLK) == RCC_SYSCLK_DIV16) || ((HCLK) == RCC_SYSCLK_DIV64) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1318 ((HCLK) == RCC_SYSCLK_DIV128) || ((HCLK) == RCC_SYSCLK_DIV256) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1319 ((HCLK) == RCC_SYSCLK_DIV512))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1320
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1321 #define IS_RCC_CLOCKTYPE(CLK) ((1 <= (CLK)) && ((CLK) <= 15))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1322
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1323 #define IS_RCC_PCLK(PCLK) (((PCLK) == RCC_HCLK_DIV1) || ((PCLK) == RCC_HCLK_DIV2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1324 ((PCLK) == RCC_HCLK_DIV4) || ((PCLK) == RCC_HCLK_DIV8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1325 ((PCLK) == RCC_HCLK_DIV16))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1326
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1327 #define IS_RCC_MCO(MCOx) (((MCOx) == RCC_MCO1) || ((MCOx) == RCC_MCO2))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1328
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1329 #define IS_RCC_MCO1SOURCE(SOURCE) (((SOURCE) == RCC_MCO1SOURCE_HSI) || ((SOURCE) == RCC_MCO1SOURCE_LSE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1330 ((SOURCE) == RCC_MCO1SOURCE_HSE) || ((SOURCE) == RCC_MCO1SOURCE_PLLCLK))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1332 #define IS_RCC_MCO2SOURCE(SOURCE) (((SOURCE) == RCC_MCO2SOURCE_SYSCLK) || ((SOURCE) == RCC_MCO2SOURCE_PLLI2SCLK)|| \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1333 ((SOURCE) == RCC_MCO2SOURCE_HSE) || ((SOURCE) == RCC_MCO2SOURCE_PLLCLK))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1334
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1335 #define IS_RCC_MCODIV(DIV) (((DIV) == RCC_MCODIV_1) || ((DIV) == RCC_MCODIV_2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1336 ((DIV) == RCC_MCODIV_3) || ((DIV) == RCC_MCODIV_4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1337 ((DIV) == RCC_MCODIV_5))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1338 #define IS_RCC_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x1F)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1339
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1340 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1341 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1342 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1343
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1344 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1345 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1346 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1347
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1348 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1349 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1350 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1351
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1352 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1353 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1354 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1355
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1356 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1357 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1358 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1359
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1360 #endif /* __STM32F4xx_HAL_RCC_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1361
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1362 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/