Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 3 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /** |
1 | /** |
| 2 | ****************************************************************************** |
2 | ****************************************************************************** |
| 3 | * @file stm32f1xx_ll_bus.h |
3 | * @file stm32f1xx_ll_bus.h |
| 4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
| 5 | * @brief Header file of BUS LL module. |
5 | * @brief Header file of BUS LL module. |
| 6 | 6 | ||
| 7 | @verbatim |
7 | @verbatim |
| 8 | ##### RCC Limitations ##### |
8 | ##### RCC Limitations ##### |
| 9 | ============================================================================== |
9 | ============================================================================== |
| 10 | [..] |
10 | [..] |
| 11 | A delay between an RCC peripheral clock enable and the effective peripheral |
11 | A delay between an RCC peripheral clock enable and the effective peripheral |
| 12 | enabling should be taken into account in order to manage the peripheral read/write |
12 | enabling should be taken into account in order to manage the peripheral read/write |
| 13 | from/to registers. |
13 | from/to registers. |
| 14 | (+) This delay depends on the peripheral mapping. |
14 | (+) This delay depends on the peripheral mapping. |
| 15 | (++) AHB & APB peripherals, 1 dummy read is necessary |
15 | (++) AHB & APB peripherals, 1 dummy read is necessary |
| 16 | 16 | ||
| 17 | [..] |
17 | [..] |
| 18 | Workarounds: |
18 | Workarounds: |
| 19 | (#) For AHB & APB peripherals, a dummy read to the peripheral register has been |
19 | (#) For AHB & APB peripherals, a dummy read to the peripheral register has been |
| 20 | inserted in each LL_{BUS}_GRP{x}_EnableClock() function. |
20 | inserted in each LL_{BUS}_GRP{x}_EnableClock() function. |
| 21 | 21 | ||
| 22 | @endverbatim |
22 | @endverbatim |
| 23 | ****************************************************************************** |
23 | ****************************************************************************** |
| 24 | * @attention |
24 | * @attention |
| 25 | * |
25 | * |
| 26 | * <h2><center>© Copyright (c) 2016 STMicroelectronics. |
26 | * Copyright (c) 2016 STMicroelectronics. |
| 27 | * All rights reserved.</center></h2> |
27 | * All rights reserved. |
| 28 | * |
28 | * |
| 29 | * This software component is licensed by ST under BSD 3-Clause license, |
29 | * This software is licensed under terms that can be found in the LICENSE file in |
| 30 | * the "License"; You may not use this file except in compliance with the |
30 | * the root directory of this software component. |
| 31 | * License. You may obtain a copy of the License at: |
31 | * If no LICENSE file comes with this software, it is provided AS-IS. |
| 32 | * opensource.org/licenses/BSD-3-Clause |
32 | ****************************************************************************** |
| 33 | * |
33 | */ |
| 34 | ****************************************************************************** |
34 | |
| 35 | */ |
35 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| 36 | 36 | #ifndef __STM32F1xx_LL_BUS_H |
|
| 37 | /* Define to prevent recursive inclusion -------------------------------------*/ |
37 | #define __STM32F1xx_LL_BUS_H |
| 38 | #ifndef __STM32F1xx_LL_BUS_H |
38 | |
| 39 | #define __STM32F1xx_LL_BUS_H |
39 | #ifdef __cplusplus |
| 40 | 40 | extern "C" { |
|
| 41 | #ifdef __cplusplus |
41 | #endif |
| 42 | extern "C" { |
42 | |
| 43 | #endif |
43 | /* Includes ------------------------------------------------------------------*/ |
| 44 | 44 | #include "stm32f1xx.h" |
|
| 45 | /* Includes ------------------------------------------------------------------*/ |
45 | |
| 46 | #include "stm32f1xx.h" |
46 | /** @addtogroup STM32F1xx_LL_Driver |
| 47 | 47 | * @{ |
|
| 48 | /** @addtogroup STM32F1xx_LL_Driver |
48 | */ |
| 49 | * @{ |
49 | |
| 50 | */ |
50 | #if defined(RCC) |
| 51 | 51 | ||
| 52 | #if defined(RCC) |
52 | /** @defgroup BUS_LL BUS |
| 53 | 53 | * @{ |
|
| 54 | /** @defgroup BUS_LL BUS |
54 | */ |
| 55 | * @{ |
55 | |
| 56 | */ |
56 | /* Private types -------------------------------------------------------------*/ |
| 57 | 57 | /* Private variables ---------------------------------------------------------*/ |
|
| 58 | /* Private types -------------------------------------------------------------*/ |
58 | |
| 59 | /* Private variables ---------------------------------------------------------*/ |
59 | /* Private constants ---------------------------------------------------------*/ |
| 60 | 60 | #if defined(RCC_AHBRSTR_OTGFSRST) || defined(RCC_AHBRSTR_ETHMACRST) |
|
| 61 | /* Private constants ---------------------------------------------------------*/ |
61 | #define RCC_AHBRSTR_SUPPORT |
| 62 | #if defined(RCC_AHBRSTR_OTGFSRST) || defined(RCC_AHBRSTR_ETHMACRST) |
62 | #endif /* RCC_AHBRSTR_OTGFSRST || RCC_AHBRSTR_ETHMACRST */ |
| 63 | #define RCC_AHBRSTR_SUPPORT |
63 | |
| 64 | #endif /* RCC_AHBRSTR_OTGFSRST || RCC_AHBRSTR_ETHMACRST */ |
64 | /* Private macros ------------------------------------------------------------*/ |
| 65 | 65 | ||
| 66 | /* Private macros ------------------------------------------------------------*/ |
66 | /* Exported types ------------------------------------------------------------*/ |
| 67 | 67 | /* Exported constants --------------------------------------------------------*/ |
|
| 68 | /* Exported types ------------------------------------------------------------*/ |
68 | /** @defgroup BUS_LL_Exported_Constants BUS Exported Constants |
| 69 | /* Exported constants --------------------------------------------------------*/ |
69 | * @{ |
| 70 | /** @defgroup BUS_LL_Exported_Constants BUS Exported Constants |
70 | */ |
| 71 | * @{ |
71 | |
| 72 | */ |
72 | /** @defgroup BUS_LL_EC_AHB1_GRP1_PERIPH AHB1 GRP1 PERIPH |
| 73 | 73 | * @{ |
|
| 74 | /** @defgroup BUS_LL_EC_AHB1_GRP1_PERIPH AHB1 GRP1 PERIPH |
74 | */ |
| 75 | * @{ |
75 | #define LL_AHB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
| 76 | */ |
76 | #define LL_AHB1_GRP1_PERIPH_CRC RCC_AHBENR_CRCEN |
| 77 | #define LL_AHB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
77 | #define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHBENR_DMA1EN |
| 78 | #define LL_AHB1_GRP1_PERIPH_CRC RCC_AHBENR_CRCEN |
78 | #if defined(DMA2) |
| 79 | #define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHBENR_DMA1EN |
79 | #define LL_AHB1_GRP1_PERIPH_DMA2 RCC_AHBENR_DMA2EN |
| 80 | #if defined(DMA2) |
80 | #endif /*DMA2*/ |
| 81 | #define LL_AHB1_GRP1_PERIPH_DMA2 RCC_AHBENR_DMA2EN |
81 | #if defined(ETH) |
| 82 | #endif /*DMA2*/ |
82 | #define LL_AHB1_GRP1_PERIPH_ETHMAC RCC_AHBENR_ETHMACEN |
| 83 | #if defined(ETH) |
83 | #define LL_AHB1_GRP1_PERIPH_ETHMACRX RCC_AHBENR_ETHMACRXEN |
| 84 | #define LL_AHB1_GRP1_PERIPH_ETHMAC RCC_AHBENR_ETHMACEN |
84 | #define LL_AHB1_GRP1_PERIPH_ETHMACTX RCC_AHBENR_ETHMACTXEN |
| 85 | #define LL_AHB1_GRP1_PERIPH_ETHMACRX RCC_AHBENR_ETHMACRXEN |
85 | #endif /*ETH*/ |
| 86 | #define LL_AHB1_GRP1_PERIPH_ETHMACTX RCC_AHBENR_ETHMACTXEN |
86 | #define LL_AHB1_GRP1_PERIPH_FLASH RCC_AHBENR_FLITFEN |
| 87 | #endif /*ETH*/ |
87 | #if defined(FSMC_Bank1) |
| 88 | #define LL_AHB1_GRP1_PERIPH_FLASH RCC_AHBENR_FLITFEN |
88 | #define LL_AHB1_GRP1_PERIPH_FSMC RCC_AHBENR_FSMCEN |
| 89 | #if defined(FSMC_Bank1) |
89 | #endif /*FSMC_Bank1*/ |
| 90 | #define LL_AHB1_GRP1_PERIPH_FSMC RCC_AHBENR_FSMCEN |
90 | #if defined(USB_OTG_FS) |
| 91 | #endif /*FSMC_Bank1*/ |
91 | #define LL_AHB1_GRP1_PERIPH_OTGFS RCC_AHBENR_OTGFSEN |
| 92 | #if defined(USB_OTG_FS) |
92 | #endif /*USB_OTG_FS*/ |
| 93 | #define LL_AHB1_GRP1_PERIPH_OTGFS RCC_AHBENR_OTGFSEN |
93 | #if defined(SDIO) |
| 94 | #endif /*USB_OTG_FS*/ |
94 | #define LL_AHB1_GRP1_PERIPH_SDIO RCC_AHBENR_SDIOEN |
| 95 | #if defined(SDIO) |
95 | #endif /*SDIO*/ |
| 96 | #define LL_AHB1_GRP1_PERIPH_SDIO RCC_AHBENR_SDIOEN |
96 | #define LL_AHB1_GRP1_PERIPH_SRAM RCC_AHBENR_SRAMEN |
| 97 | #endif /*SDIO*/ |
97 | /** |
| 98 | #define LL_AHB1_GRP1_PERIPH_SRAM RCC_AHBENR_SRAMEN |
98 | * @} |
| 99 | /** |
99 | */ |
| 100 | * @} |
100 | |
| 101 | */ |
101 | /** @defgroup BUS_LL_EC_APB1_GRP1_PERIPH APB1 GRP1 PERIPH |
| 102 | 102 | * @{ |
|
| 103 | /** @defgroup BUS_LL_EC_APB1_GRP1_PERIPH APB1 GRP1 PERIPH |
103 | */ |
| 104 | * @{ |
104 | #define LL_APB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
| 105 | */ |
105 | #define LL_APB1_GRP1_PERIPH_BKP RCC_APB1ENR_BKPEN |
| 106 | #define LL_APB1_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
106 | #if defined(CAN1) |
| 107 | #define LL_APB1_GRP1_PERIPH_BKP RCC_APB1ENR_BKPEN |
107 | #define LL_APB1_GRP1_PERIPH_CAN1 RCC_APB1ENR_CAN1EN |
| 108 | #if defined(CAN1) |
108 | #endif /*CAN1*/ |
| 109 | #define LL_APB1_GRP1_PERIPH_CAN1 RCC_APB1ENR_CAN1EN |
109 | #if defined(CAN2) |
| 110 | #endif /*CAN1*/ |
110 | #define LL_APB1_GRP1_PERIPH_CAN2 RCC_APB1ENR_CAN2EN |
| 111 | #if defined(CAN2) |
111 | #endif /*CAN2*/ |
| 112 | #define LL_APB1_GRP1_PERIPH_CAN2 RCC_APB1ENR_CAN2EN |
112 | #if defined(CEC) |
| 113 | #endif /*CAN2*/ |
113 | #define LL_APB1_GRP1_PERIPH_CEC RCC_APB1ENR_CECEN |
| 114 | #if defined(CEC) |
114 | #endif /*CEC*/ |
| 115 | #define LL_APB1_GRP1_PERIPH_CEC RCC_APB1ENR_CECEN |
115 | #if defined(DAC) |
| 116 | #endif /*CEC*/ |
116 | #define LL_APB1_GRP1_PERIPH_DAC1 RCC_APB1ENR_DACEN |
| 117 | #if defined(DAC) |
117 | #endif /*DAC*/ |
| 118 | #define LL_APB1_GRP1_PERIPH_DAC1 RCC_APB1ENR_DACEN |
118 | #define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1ENR_I2C1EN |
| 119 | #endif /*DAC*/ |
119 | #if defined(I2C2) |
| 120 | #define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1ENR_I2C1EN |
120 | #define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1ENR_I2C2EN |
| 121 | #if defined(I2C2) |
121 | #endif /*I2C2*/ |
| 122 | #define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1ENR_I2C2EN |
122 | #define LL_APB1_GRP1_PERIPH_PWR RCC_APB1ENR_PWREN |
| 123 | #endif /*I2C2*/ |
123 | #if defined(SPI2) |
| 124 | #define LL_APB1_GRP1_PERIPH_PWR RCC_APB1ENR_PWREN |
124 | #define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1ENR_SPI2EN |
| 125 | #if defined(SPI2) |
125 | #endif /*SPI2*/ |
| 126 | #define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1ENR_SPI2EN |
126 | #if defined(SPI3) |
| 127 | #endif /*SPI2*/ |
127 | #define LL_APB1_GRP1_PERIPH_SPI3 RCC_APB1ENR_SPI3EN |
| 128 | #if defined(SPI3) |
128 | #endif /*SPI3*/ |
| 129 | #define LL_APB1_GRP1_PERIPH_SPI3 RCC_APB1ENR_SPI3EN |
129 | #if defined(TIM12) |
| 130 | #endif /*SPI3*/ |
130 | #define LL_APB1_GRP1_PERIPH_TIM12 RCC_APB1ENR_TIM12EN |
| 131 | #if defined(TIM12) |
131 | #endif /*TIM12*/ |
| 132 | #define LL_APB1_GRP1_PERIPH_TIM12 RCC_APB1ENR_TIM12EN |
132 | #if defined(TIM13) |
| 133 | #endif /*TIM12*/ |
133 | #define LL_APB1_GRP1_PERIPH_TIM13 RCC_APB1ENR_TIM13EN |
| 134 | #if defined(TIM13) |
134 | #endif /*TIM13*/ |
| 135 | #define LL_APB1_GRP1_PERIPH_TIM13 RCC_APB1ENR_TIM13EN |
135 | #if defined(TIM14) |
| 136 | #endif /*TIM13*/ |
136 | #define LL_APB1_GRP1_PERIPH_TIM14 RCC_APB1ENR_TIM14EN |
| 137 | #if defined(TIM14) |
137 | #endif /*TIM14*/ |
| 138 | #define LL_APB1_GRP1_PERIPH_TIM14 RCC_APB1ENR_TIM14EN |
138 | #define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1ENR_TIM2EN |
| 139 | #endif /*TIM14*/ |
139 | #define LL_APB1_GRP1_PERIPH_TIM3 RCC_APB1ENR_TIM3EN |
| 140 | #define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1ENR_TIM2EN |
140 | #if defined(TIM4) |
| 141 | #define LL_APB1_GRP1_PERIPH_TIM3 RCC_APB1ENR_TIM3EN |
141 | #define LL_APB1_GRP1_PERIPH_TIM4 RCC_APB1ENR_TIM4EN |
| 142 | #if defined(TIM4) |
142 | #endif /*TIM4*/ |
| 143 | #define LL_APB1_GRP1_PERIPH_TIM4 RCC_APB1ENR_TIM4EN |
143 | #if defined(TIM5) |
| 144 | #endif /*TIM4*/ |
144 | #define LL_APB1_GRP1_PERIPH_TIM5 RCC_APB1ENR_TIM5EN |
| 145 | #if defined(TIM5) |
145 | #endif /*TIM5*/ |
| 146 | #define LL_APB1_GRP1_PERIPH_TIM5 RCC_APB1ENR_TIM5EN |
146 | #if defined(TIM6) |
| 147 | #endif /*TIM5*/ |
147 | #define LL_APB1_GRP1_PERIPH_TIM6 RCC_APB1ENR_TIM6EN |
| 148 | #if defined(TIM6) |
148 | #endif /*TIM6*/ |
| 149 | #define LL_APB1_GRP1_PERIPH_TIM6 RCC_APB1ENR_TIM6EN |
149 | #if defined(TIM7) |
| 150 | #endif /*TIM6*/ |
150 | #define LL_APB1_GRP1_PERIPH_TIM7 RCC_APB1ENR_TIM7EN |
| 151 | #if defined(TIM7) |
151 | #endif /*TIM7*/ |
| 152 | #define LL_APB1_GRP1_PERIPH_TIM7 RCC_APB1ENR_TIM7EN |
152 | #if defined(UART4) |
| 153 | #endif /*TIM7*/ |
153 | #define LL_APB1_GRP1_PERIPH_UART4 RCC_APB1ENR_UART4EN |
| 154 | #if defined(UART4) |
154 | #endif /*UART4*/ |
| 155 | #define LL_APB1_GRP1_PERIPH_UART4 RCC_APB1ENR_UART4EN |
155 | #if defined(UART5) |
| 156 | #endif /*UART4*/ |
156 | #define LL_APB1_GRP1_PERIPH_UART5 RCC_APB1ENR_UART5EN |
| 157 | #if defined(UART5) |
157 | #endif /*UART5*/ |
| 158 | #define LL_APB1_GRP1_PERIPH_UART5 RCC_APB1ENR_UART5EN |
158 | #define LL_APB1_GRP1_PERIPH_USART2 RCC_APB1ENR_USART2EN |
| 159 | #endif /*UART5*/ |
159 | #if defined(USART3) |
| 160 | #define LL_APB1_GRP1_PERIPH_USART2 RCC_APB1ENR_USART2EN |
160 | #define LL_APB1_GRP1_PERIPH_USART3 RCC_APB1ENR_USART3EN |
| 161 | #if defined(USART3) |
161 | #endif /*USART3*/ |
| 162 | #define LL_APB1_GRP1_PERIPH_USART3 RCC_APB1ENR_USART3EN |
162 | #if defined(USB) |
| 163 | #endif /*USART3*/ |
163 | #define LL_APB1_GRP1_PERIPH_USB RCC_APB1ENR_USBEN |
| 164 | #if defined(USB) |
164 | #endif /*USB*/ |
| 165 | #define LL_APB1_GRP1_PERIPH_USB RCC_APB1ENR_USBEN |
165 | #define LL_APB1_GRP1_PERIPH_WWDG RCC_APB1ENR_WWDGEN |
| 166 | #endif /*USB*/ |
166 | /** |
| 167 | #define LL_APB1_GRP1_PERIPH_WWDG RCC_APB1ENR_WWDGEN |
167 | * @} |
| 168 | /** |
168 | */ |
| 169 | * @} |
169 | |
| 170 | */ |
170 | /** @defgroup BUS_LL_EC_APB2_GRP1_PERIPH APB2 GRP1 PERIPH |
| 171 | 171 | * @{ |
|
| 172 | /** @defgroup BUS_LL_EC_APB2_GRP1_PERIPH APB2 GRP1 PERIPH |
172 | */ |
| 173 | * @{ |
173 | #define LL_APB2_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
| 174 | */ |
174 | #define LL_APB2_GRP1_PERIPH_ADC1 RCC_APB2ENR_ADC1EN |
| 175 | #define LL_APB2_GRP1_PERIPH_ALL (uint32_t)0xFFFFFFFFU |
175 | #if defined(ADC2) |
| 176 | #define LL_APB2_GRP1_PERIPH_ADC1 RCC_APB2ENR_ADC1EN |
176 | #define LL_APB2_GRP1_PERIPH_ADC2 RCC_APB2ENR_ADC2EN |
| 177 | #if defined(ADC2) |
177 | #endif /*ADC2*/ |
| 178 | #define LL_APB2_GRP1_PERIPH_ADC2 RCC_APB2ENR_ADC2EN |
178 | #if defined(ADC3) |
| 179 | #endif /*ADC2*/ |
179 | #define LL_APB2_GRP1_PERIPH_ADC3 RCC_APB2ENR_ADC3EN |
| 180 | #if defined(ADC3) |
180 | #endif /*ADC3*/ |
| 181 | #define LL_APB2_GRP1_PERIPH_ADC3 RCC_APB2ENR_ADC3EN |
181 | #define LL_APB2_GRP1_PERIPH_AFIO RCC_APB2ENR_AFIOEN |
| 182 | #endif /*ADC3*/ |
182 | #define LL_APB2_GRP1_PERIPH_GPIOA RCC_APB2ENR_IOPAEN |
| 183 | #define LL_APB2_GRP1_PERIPH_AFIO RCC_APB2ENR_AFIOEN |
183 | #define LL_APB2_GRP1_PERIPH_GPIOB RCC_APB2ENR_IOPBEN |
| 184 | #define LL_APB2_GRP1_PERIPH_GPIOA RCC_APB2ENR_IOPAEN |
184 | #define LL_APB2_GRP1_PERIPH_GPIOC RCC_APB2ENR_IOPCEN |
| 185 | #define LL_APB2_GRP1_PERIPH_GPIOB RCC_APB2ENR_IOPBEN |
185 | #define LL_APB2_GRP1_PERIPH_GPIOD RCC_APB2ENR_IOPDEN |
| 186 | #define LL_APB2_GRP1_PERIPH_GPIOC RCC_APB2ENR_IOPCEN |
186 | #if defined(GPIOE) |
| 187 | #define LL_APB2_GRP1_PERIPH_GPIOD RCC_APB2ENR_IOPDEN |
187 | #define LL_APB2_GRP1_PERIPH_GPIOE RCC_APB2ENR_IOPEEN |
| 188 | #if defined(GPIOE) |
188 | #endif /*GPIOE*/ |
| 189 | #define LL_APB2_GRP1_PERIPH_GPIOE RCC_APB2ENR_IOPEEN |
189 | #if defined(GPIOF) |
| 190 | #endif /*GPIOE*/ |
190 | #define LL_APB2_GRP1_PERIPH_GPIOF RCC_APB2ENR_IOPFEN |
| 191 | #if defined(GPIOF) |
191 | #endif /*GPIOF*/ |
| 192 | #define LL_APB2_GRP1_PERIPH_GPIOF RCC_APB2ENR_IOPFEN |
192 | #if defined(GPIOG) |
| 193 | #endif /*GPIOF*/ |
193 | #define LL_APB2_GRP1_PERIPH_GPIOG RCC_APB2ENR_IOPGEN |
| 194 | #if defined(GPIOG) |
194 | #endif /*GPIOG*/ |
| 195 | #define LL_APB2_GRP1_PERIPH_GPIOG RCC_APB2ENR_IOPGEN |
195 | #define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN |
| 196 | #endif /*GPIOG*/ |
196 | #if defined(TIM10) |
| 197 | #define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN |
197 | #define LL_APB2_GRP1_PERIPH_TIM10 RCC_APB2ENR_TIM10EN |
| 198 | #if defined(TIM10) |
198 | #endif /*TIM10*/ |
| 199 | #define LL_APB2_GRP1_PERIPH_TIM10 RCC_APB2ENR_TIM10EN |
199 | #if defined(TIM11) |
| 200 | #endif /*TIM10*/ |
200 | #define LL_APB2_GRP1_PERIPH_TIM11 RCC_APB2ENR_TIM11EN |
| 201 | #if defined(TIM11) |
201 | #endif /*TIM11*/ |
| 202 | #define LL_APB2_GRP1_PERIPH_TIM11 RCC_APB2ENR_TIM11EN |
202 | #if defined(TIM15) |
| 203 | #endif /*TIM11*/ |
203 | #define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN |
| 204 | #if defined(TIM15) |
204 | #endif /*TIM15*/ |
| 205 | #define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN |
205 | #if defined(TIM16) |
| 206 | #endif /*TIM15*/ |
206 | #define LL_APB2_GRP1_PERIPH_TIM16 RCC_APB2ENR_TIM16EN |
| 207 | #if defined(TIM16) |
207 | #endif /*TIM16*/ |
| 208 | #define LL_APB2_GRP1_PERIPH_TIM16 RCC_APB2ENR_TIM16EN |
208 | #if defined(TIM17) |
| 209 | #endif /*TIM16*/ |
209 | #define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN |
| 210 | #if defined(TIM17) |
210 | #endif /*TIM17*/ |
| 211 | #define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN |
211 | #define LL_APB2_GRP1_PERIPH_TIM1 RCC_APB2ENR_TIM1EN |
| 212 | #endif /*TIM17*/ |
212 | #if defined(TIM8) |
| 213 | #define LL_APB2_GRP1_PERIPH_TIM1 RCC_APB2ENR_TIM1EN |
213 | #define LL_APB2_GRP1_PERIPH_TIM8 RCC_APB2ENR_TIM8EN |
| 214 | #if defined(TIM8) |
214 | #endif /*TIM8*/ |
| 215 | #define LL_APB2_GRP1_PERIPH_TIM8 RCC_APB2ENR_TIM8EN |
215 | #if defined(TIM9) |
| 216 | #endif /*TIM8*/ |
216 | #define LL_APB2_GRP1_PERIPH_TIM9 RCC_APB2ENR_TIM9EN |
| 217 | #if defined(TIM9) |
217 | #endif /*TIM9*/ |
| 218 | #define LL_APB2_GRP1_PERIPH_TIM9 RCC_APB2ENR_TIM9EN |
218 | #define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN |
| 219 | #endif /*TIM9*/ |
219 | /** |
| 220 | #define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN |
220 | * @} |
| 221 | /** |
221 | */ |
| 222 | * @} |
222 | |
| 223 | */ |
223 | /** |
| 224 | 224 | * @} |
|
| 225 | /** |
225 | */ |
| 226 | * @} |
226 | |
| 227 | */ |
227 | /* Exported macro ------------------------------------------------------------*/ |
| 228 | 228 | ||
| 229 | /* Exported macro ------------------------------------------------------------*/ |
229 | /* Exported functions --------------------------------------------------------*/ |
| 230 | 230 | /** @defgroup BUS_LL_Exported_Functions BUS Exported Functions |
|
| 231 | /* Exported functions --------------------------------------------------------*/ |
231 | * @{ |
| 232 | /** @defgroup BUS_LL_Exported_Functions BUS Exported Functions |
232 | */ |
| 233 | * @{ |
233 | |
| 234 | */ |
234 | /** @defgroup BUS_LL_EF_AHB1 AHB1 |
| 235 | 235 | * @{ |
|
| 236 | /** @defgroup BUS_LL_EF_AHB1 AHB1 |
236 | */ |
| 237 | * @{ |
237 | |
| 238 | */ |
238 | /** |
| 239 | 239 | * @brief Enable AHB1 peripherals clock. |
|
| 240 | /** |
240 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_EnableClock\n |
| 241 | * @brief Enable AHB1 peripherals clock. |
241 | * AHBENR DMA1EN LL_AHB1_GRP1_EnableClock\n |
| 242 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_EnableClock\n |
242 | * AHBENR DMA2EN LL_AHB1_GRP1_EnableClock\n |
| 243 | * AHBENR DMA1EN LL_AHB1_GRP1_EnableClock\n |
243 | * AHBENR ETHMACEN LL_AHB1_GRP1_EnableClock\n |
| 244 | * AHBENR DMA2EN LL_AHB1_GRP1_EnableClock\n |
244 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_EnableClock\n |
| 245 | * AHBENR ETHMACEN LL_AHB1_GRP1_EnableClock\n |
245 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_EnableClock\n |
| 246 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_EnableClock\n |
246 | * AHBENR FLITFEN LL_AHB1_GRP1_EnableClock\n |
| 247 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_EnableClock\n |
247 | * AHBENR FSMCEN LL_AHB1_GRP1_EnableClock\n |
| 248 | * AHBENR FLITFEN LL_AHB1_GRP1_EnableClock\n |
248 | * AHBENR OTGFSEN LL_AHB1_GRP1_EnableClock\n |
| 249 | * AHBENR FSMCEN LL_AHB1_GRP1_EnableClock\n |
249 | * AHBENR SDIOEN LL_AHB1_GRP1_EnableClock\n |
| 250 | * AHBENR OTGFSEN LL_AHB1_GRP1_EnableClock\n |
250 | * AHBENR SRAMEN LL_AHB1_GRP1_EnableClock |
| 251 | * AHBENR SDIOEN LL_AHB1_GRP1_EnableClock\n |
251 | * @param Periphs This parameter can be a combination of the following values: |
| 252 | * AHBENR SRAMEN LL_AHB1_GRP1_EnableClock |
252 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
| 253 | * @param Periphs This parameter can be a combination of the following values: |
253 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
| 254 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
254 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
| 255 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
255 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
| 256 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
256 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
| 257 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
257 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
| 258 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
258 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
| 259 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
259 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
| 260 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
260 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
| 261 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
261 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
| 262 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
262 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
| 263 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
263 | * |
| 264 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
264 | * (*) value not defined in all devices. |
| 265 | * |
265 | * @retval None |
| 266 | * (*) value not defined in all devices. |
266 | */ |
| 267 | * @retval None |
267 | __STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs) |
| 268 | */ |
268 | { |
| 269 | __STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs) |
269 | __IO uint32_t tmpreg; |
| 270 | { |
270 | SET_BIT(RCC->AHBENR, Periphs); |
| 271 | __IO uint32_t tmpreg; |
271 | /* Delay after an RCC peripheral clock enabling */ |
| 272 | SET_BIT(RCC->AHBENR, Periphs); |
272 | tmpreg = READ_BIT(RCC->AHBENR, Periphs); |
| 273 | /* Delay after an RCC peripheral clock enabling */ |
273 | (void)tmpreg; |
| 274 | tmpreg = READ_BIT(RCC->AHBENR, Periphs); |
274 | } |
| 275 | (void)tmpreg; |
275 | |
| 276 | } |
276 | /** |
| 277 | 277 | * @brief Check if AHB1 peripheral clock is enabled or not |
|
| 278 | /** |
278 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_IsEnabledClock\n |
| 279 | * @brief Check if AHB1 peripheral clock is enabled or not |
279 | * AHBENR DMA1EN LL_AHB1_GRP1_IsEnabledClock\n |
| 280 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_IsEnabledClock\n |
280 | * AHBENR DMA2EN LL_AHB1_GRP1_IsEnabledClock\n |
| 281 | * AHBENR DMA1EN LL_AHB1_GRP1_IsEnabledClock\n |
281 | * AHBENR ETHMACEN LL_AHB1_GRP1_IsEnabledClock\n |
| 282 | * AHBENR DMA2EN LL_AHB1_GRP1_IsEnabledClock\n |
282 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_IsEnabledClock\n |
| 283 | * AHBENR ETHMACEN LL_AHB1_GRP1_IsEnabledClock\n |
283 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_IsEnabledClock\n |
| 284 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_IsEnabledClock\n |
284 | * AHBENR FLITFEN LL_AHB1_GRP1_IsEnabledClock\n |
| 285 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_IsEnabledClock\n |
285 | * AHBENR FSMCEN LL_AHB1_GRP1_IsEnabledClock\n |
| 286 | * AHBENR FLITFEN LL_AHB1_GRP1_IsEnabledClock\n |
286 | * AHBENR OTGFSEN LL_AHB1_GRP1_IsEnabledClock\n |
| 287 | * AHBENR FSMCEN LL_AHB1_GRP1_IsEnabledClock\n |
287 | * AHBENR SDIOEN LL_AHB1_GRP1_IsEnabledClock\n |
| 288 | * AHBENR OTGFSEN LL_AHB1_GRP1_IsEnabledClock\n |
288 | * AHBENR SRAMEN LL_AHB1_GRP1_IsEnabledClock |
| 289 | * AHBENR SDIOEN LL_AHB1_GRP1_IsEnabledClock\n |
289 | * @param Periphs This parameter can be a combination of the following values: |
| 290 | * AHBENR SRAMEN LL_AHB1_GRP1_IsEnabledClock |
290 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
| 291 | * @param Periphs This parameter can be a combination of the following values: |
291 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
| 292 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
292 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
| 293 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
293 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
| 294 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
294 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
| 295 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
295 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
| 296 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
296 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
| 297 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
297 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
| 298 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
298 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
| 299 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
299 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
| 300 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
300 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
| 301 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
301 | * |
| 302 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
302 | * (*) value not defined in all devices. |
| 303 | * |
303 | * @retval State of Periphs (1 or 0). |
| 304 | * (*) value not defined in all devices. |
304 | */ |
| 305 | * @retval State of Periphs (1 or 0). |
305 | __STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) |
| 306 | */ |
306 | { |
| 307 | __STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) |
307 | return (READ_BIT(RCC->AHBENR, Periphs) == Periphs); |
| 308 | { |
308 | } |
| 309 | return (READ_BIT(RCC->AHBENR, Periphs) == Periphs); |
309 | |
| 310 | } |
310 | /** |
| 311 | 311 | * @brief Disable AHB1 peripherals clock. |
|
| 312 | /** |
312 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_DisableClock\n |
| 313 | * @brief Disable AHB1 peripherals clock. |
313 | * AHBENR DMA1EN LL_AHB1_GRP1_DisableClock\n |
| 314 | * @rmtoll AHBENR CRCEN LL_AHB1_GRP1_DisableClock\n |
314 | * AHBENR DMA2EN LL_AHB1_GRP1_DisableClock\n |
| 315 | * AHBENR DMA1EN LL_AHB1_GRP1_DisableClock\n |
315 | * AHBENR ETHMACEN LL_AHB1_GRP1_DisableClock\n |
| 316 | * AHBENR DMA2EN LL_AHB1_GRP1_DisableClock\n |
316 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_DisableClock\n |
| 317 | * AHBENR ETHMACEN LL_AHB1_GRP1_DisableClock\n |
317 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_DisableClock\n |
| 318 | * AHBENR ETHMACRXEN LL_AHB1_GRP1_DisableClock\n |
318 | * AHBENR FLITFEN LL_AHB1_GRP1_DisableClock\n |
| 319 | * AHBENR ETHMACTXEN LL_AHB1_GRP1_DisableClock\n |
319 | * AHBENR FSMCEN LL_AHB1_GRP1_DisableClock\n |
| 320 | * AHBENR FLITFEN LL_AHB1_GRP1_DisableClock\n |
320 | * AHBENR OTGFSEN LL_AHB1_GRP1_DisableClock\n |
| 321 | * AHBENR FSMCEN LL_AHB1_GRP1_DisableClock\n |
321 | * AHBENR SDIOEN LL_AHB1_GRP1_DisableClock\n |
| 322 | * AHBENR OTGFSEN LL_AHB1_GRP1_DisableClock\n |
322 | * AHBENR SRAMEN LL_AHB1_GRP1_DisableClock |
| 323 | * AHBENR SDIOEN LL_AHB1_GRP1_DisableClock\n |
323 | * @param Periphs This parameter can be a combination of the following values: |
| 324 | * AHBENR SRAMEN LL_AHB1_GRP1_DisableClock |
324 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
| 325 | * @param Periphs This parameter can be a combination of the following values: |
325 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
| 326 | * @arg @ref LL_AHB1_GRP1_PERIPH_CRC |
326 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
| 327 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 |
327 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
| 328 | * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) |
328 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
| 329 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
329 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
| 330 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACRX (*) |
330 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
| 331 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMACTX (*) |
331 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
| 332 | * @arg @ref LL_AHB1_GRP1_PERIPH_FLASH |
332 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
| 333 | * @arg @ref LL_AHB1_GRP1_PERIPH_FSMC (*) |
333 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
| 334 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
334 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
| 335 | * @arg @ref LL_AHB1_GRP1_PERIPH_SDIO (*) |
335 | * |
| 336 | * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM |
336 | * (*) value not defined in all devices. |
| 337 | * |
337 | * @retval None |
| 338 | * (*) value not defined in all devices. |
338 | */ |
| 339 | * @retval None |
339 | __STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs) |
| 340 | */ |
340 | { |
| 341 | __STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs) |
341 | CLEAR_BIT(RCC->AHBENR, Periphs); |
| 342 | { |
342 | } |
| 343 | CLEAR_BIT(RCC->AHBENR, Periphs); |
343 | |
| 344 | } |
344 | #if defined(RCC_AHBRSTR_SUPPORT) |
| 345 | 345 | /** |
|
| 346 | #if defined(RCC_AHBRSTR_SUPPORT) |
346 | * @brief Force AHB1 peripherals reset. |
| 347 | /** |
347 | * @rmtoll AHBRSTR ETHMACRST LL_AHB1_GRP1_ForceReset\n |
| 348 | * @brief Force AHB1 peripherals reset. |
348 | * AHBRSTR OTGFSRST LL_AHB1_GRP1_ForceReset |
| 349 | * @rmtoll AHBRSTR ETHMACRST LL_AHB1_GRP1_ForceReset\n |
349 | * @param Periphs This parameter can be a combination of the following values: |
| 350 | * AHBRSTR OTGFSRST LL_AHB1_GRP1_ForceReset |
350 | * @arg @ref LL_AHB1_GRP1_PERIPH_ALL |
| 351 | * @param Periphs This parameter can be a combination of the following values: |
351 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
| 352 | * @arg @ref LL_AHB1_GRP1_PERIPH_ALL |
352 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
| 353 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
353 | * |
| 354 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
354 | * (*) value not defined in all devices. |
| 355 | * |
355 | * @retval None |
| 356 | * (*) value not defined in all devices. |
356 | */ |
| 357 | * @retval None |
357 | __STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs) |
| 358 | */ |
358 | { |
| 359 | __STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs) |
359 | SET_BIT(RCC->AHBRSTR, Periphs); |
| 360 | { |
360 | } |
| 361 | SET_BIT(RCC->AHBRSTR, Periphs); |
361 | |
| 362 | } |
362 | /** |
| 363 | 363 | * @brief Release AHB1 peripherals reset. |
|
| 364 | /** |
364 | * @rmtoll AHBRSTR ETHMACRST LL_AHB1_GRP1_ReleaseReset\n |
| 365 | * @brief Release AHB1 peripherals reset. |
365 | * AHBRSTR OTGFSRST LL_AHB1_GRP1_ReleaseReset |
| 366 | * @rmtoll AHBRSTR ETHMACRST LL_AHB1_GRP1_ReleaseReset\n |
366 | * @param Periphs This parameter can be a combination of the following values: |
| 367 | * AHBRSTR OTGFSRST LL_AHB1_GRP1_ReleaseReset |
367 | * @arg @ref LL_AHB1_GRP1_PERIPH_ALL |
| 368 | * @param Periphs This parameter can be a combination of the following values: |
368 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
| 369 | * @arg @ref LL_AHB1_GRP1_PERIPH_ALL |
369 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
| 370 | * @arg @ref LL_AHB1_GRP1_PERIPH_ETHMAC (*) |
370 | * |
| 371 | * @arg @ref LL_AHB1_GRP1_PERIPH_OTGFS (*) |
371 | * (*) value not defined in all devices. |
| 372 | * |
372 | * @retval None |
| 373 | * (*) value not defined in all devices. |
373 | */ |
| 374 | * @retval None |
374 | __STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs) |
| 375 | */ |
375 | { |
| 376 | __STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs) |
376 | CLEAR_BIT(RCC->AHBRSTR, Periphs); |
| 377 | { |
377 | } |
| 378 | CLEAR_BIT(RCC->AHBRSTR, Periphs); |
378 | #endif /* RCC_AHBRSTR_SUPPORT */ |
| 379 | } |
379 | |
| 380 | #endif /* RCC_AHBRSTR_SUPPORT */ |
380 | /** |
| 381 | 381 | * @} |
|
| 382 | /** |
382 | */ |
| 383 | * @} |
383 | |
| 384 | */ |
384 | /** @defgroup BUS_LL_EF_APB1 APB1 |
| 385 | 385 | * @{ |
|
| 386 | /** @defgroup BUS_LL_EF_APB1 APB1 |
386 | */ |
| 387 | * @{ |
387 | |
| 388 | */ |
388 | /** |
| 389 | 389 | * @brief Enable APB1 peripherals clock. |
|
| 390 | /** |
390 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_EnableClock\n |
| 391 | * @brief Enable APB1 peripherals clock. |
391 | * APB1ENR CAN1EN LL_APB1_GRP1_EnableClock\n |
| 392 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_EnableClock\n |
392 | * APB1ENR CAN2EN LL_APB1_GRP1_EnableClock\n |
| 393 | * APB1ENR CAN1EN LL_APB1_GRP1_EnableClock\n |
393 | * APB1ENR CECEN LL_APB1_GRP1_EnableClock\n |
| 394 | * APB1ENR CAN2EN LL_APB1_GRP1_EnableClock\n |
394 | * APB1ENR DACEN LL_APB1_GRP1_EnableClock\n |
| 395 | * APB1ENR CECEN LL_APB1_GRP1_EnableClock\n |
395 | * APB1ENR I2C1EN LL_APB1_GRP1_EnableClock\n |
| 396 | * APB1ENR DACEN LL_APB1_GRP1_EnableClock\n |
396 | * APB1ENR I2C2EN LL_APB1_GRP1_EnableClock\n |
| 397 | * APB1ENR I2C1EN LL_APB1_GRP1_EnableClock\n |
397 | * APB1ENR PWREN LL_APB1_GRP1_EnableClock\n |
| 398 | * APB1ENR I2C2EN LL_APB1_GRP1_EnableClock\n |
398 | * APB1ENR SPI2EN LL_APB1_GRP1_EnableClock\n |
| 399 | * APB1ENR PWREN LL_APB1_GRP1_EnableClock\n |
399 | * APB1ENR SPI3EN LL_APB1_GRP1_EnableClock\n |
| 400 | * APB1ENR SPI2EN LL_APB1_GRP1_EnableClock\n |
400 | * APB1ENR TIM12EN LL_APB1_GRP1_EnableClock\n |
| 401 | * APB1ENR SPI3EN LL_APB1_GRP1_EnableClock\n |
401 | * APB1ENR TIM13EN LL_APB1_GRP1_EnableClock\n |
| 402 | * APB1ENR TIM12EN LL_APB1_GRP1_EnableClock\n |
402 | * APB1ENR TIM14EN LL_APB1_GRP1_EnableClock\n |
| 403 | * APB1ENR TIM13EN LL_APB1_GRP1_EnableClock\n |
403 | * APB1ENR TIM2EN LL_APB1_GRP1_EnableClock\n |
| 404 | * APB1ENR TIM14EN LL_APB1_GRP1_EnableClock\n |
404 | * APB1ENR TIM3EN LL_APB1_GRP1_EnableClock\n |
| 405 | * APB1ENR TIM2EN LL_APB1_GRP1_EnableClock\n |
405 | * APB1ENR TIM4EN LL_APB1_GRP1_EnableClock\n |
| 406 | * APB1ENR TIM3EN LL_APB1_GRP1_EnableClock\n |
406 | * APB1ENR TIM5EN LL_APB1_GRP1_EnableClock\n |
| 407 | * APB1ENR TIM4EN LL_APB1_GRP1_EnableClock\n |
407 | * APB1ENR TIM6EN LL_APB1_GRP1_EnableClock\n |
| 408 | * APB1ENR TIM5EN LL_APB1_GRP1_EnableClock\n |
408 | * APB1ENR TIM7EN LL_APB1_GRP1_EnableClock\n |
| 409 | * APB1ENR TIM6EN LL_APB1_GRP1_EnableClock\n |
409 | * APB1ENR UART4EN LL_APB1_GRP1_EnableClock\n |
| 410 | * APB1ENR TIM7EN LL_APB1_GRP1_EnableClock\n |
410 | * APB1ENR UART5EN LL_APB1_GRP1_EnableClock\n |
| 411 | * APB1ENR UART4EN LL_APB1_GRP1_EnableClock\n |
411 | * APB1ENR USART2EN LL_APB1_GRP1_EnableClock\n |
| 412 | * APB1ENR UART5EN LL_APB1_GRP1_EnableClock\n |
412 | * APB1ENR USART3EN LL_APB1_GRP1_EnableClock\n |
| 413 | * APB1ENR USART2EN LL_APB1_GRP1_EnableClock\n |
413 | * APB1ENR USBEN LL_APB1_GRP1_EnableClock\n |
| 414 | * APB1ENR USART3EN LL_APB1_GRP1_EnableClock\n |
414 | * APB1ENR WWDGEN LL_APB1_GRP1_EnableClock |
| 415 | * APB1ENR USBEN LL_APB1_GRP1_EnableClock\n |
415 | * @param Periphs This parameter can be a combination of the following values: |
| 416 | * APB1ENR WWDGEN LL_APB1_GRP1_EnableClock |
416 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
| 417 | * @param Periphs This parameter can be a combination of the following values: |
417 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
| 418 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
418 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
| 419 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
419 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
| 420 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
420 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
| 421 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
421 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
| 422 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
422 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
| 423 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
423 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
| 424 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
424 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
| 425 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
425 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
| 426 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
426 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
| 427 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
427 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
| 428 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
428 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
| 429 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
429 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
| 430 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
430 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
| 431 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
431 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
| 432 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
432 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
| 433 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
433 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
| 434 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
434 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
| 435 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
435 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
| 436 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
436 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
| 437 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
437 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
| 438 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
438 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
| 439 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
439 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
| 440 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
440 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
| 441 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
441 | * |
| 442 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
442 | * (*) value not defined in all devices. |
| 443 | * |
443 | * @retval None |
| 444 | * (*) value not defined in all devices. |
444 | */ |
| 445 | * @retval None |
445 | __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) |
| 446 | */ |
446 | { |
| 447 | __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) |
447 | __IO uint32_t tmpreg; |
| 448 | { |
448 | SET_BIT(RCC->APB1ENR, Periphs); |
| 449 | __IO uint32_t tmpreg; |
449 | /* Delay after an RCC peripheral clock enabling */ |
| 450 | SET_BIT(RCC->APB1ENR, Periphs); |
450 | tmpreg = READ_BIT(RCC->APB1ENR, Periphs); |
| 451 | /* Delay after an RCC peripheral clock enabling */ |
451 | (void)tmpreg; |
| 452 | tmpreg = READ_BIT(RCC->APB1ENR, Periphs); |
452 | } |
| 453 | (void)tmpreg; |
453 | |
| 454 | } |
454 | /** |
| 455 | 455 | * @brief Check if APB1 peripheral clock is enabled or not |
|
| 456 | /** |
456 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_IsEnabledClock\n |
| 457 | * @brief Check if APB1 peripheral clock is enabled or not |
457 | * APB1ENR CAN1EN LL_APB1_GRP1_IsEnabledClock\n |
| 458 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_IsEnabledClock\n |
458 | * APB1ENR CAN2EN LL_APB1_GRP1_IsEnabledClock\n |
| 459 | * APB1ENR CAN1EN LL_APB1_GRP1_IsEnabledClock\n |
459 | * APB1ENR CECEN LL_APB1_GRP1_IsEnabledClock\n |
| 460 | * APB1ENR CAN2EN LL_APB1_GRP1_IsEnabledClock\n |
460 | * APB1ENR DACEN LL_APB1_GRP1_IsEnabledClock\n |
| 461 | * APB1ENR CECEN LL_APB1_GRP1_IsEnabledClock\n |
461 | * APB1ENR I2C1EN LL_APB1_GRP1_IsEnabledClock\n |
| 462 | * APB1ENR DACEN LL_APB1_GRP1_IsEnabledClock\n |
462 | * APB1ENR I2C2EN LL_APB1_GRP1_IsEnabledClock\n |
| 463 | * APB1ENR I2C1EN LL_APB1_GRP1_IsEnabledClock\n |
463 | * APB1ENR PWREN LL_APB1_GRP1_IsEnabledClock\n |
| 464 | * APB1ENR I2C2EN LL_APB1_GRP1_IsEnabledClock\n |
464 | * APB1ENR SPI2EN LL_APB1_GRP1_IsEnabledClock\n |
| 465 | * APB1ENR PWREN LL_APB1_GRP1_IsEnabledClock\n |
465 | * APB1ENR SPI3EN LL_APB1_GRP1_IsEnabledClock\n |
| 466 | * APB1ENR SPI2EN LL_APB1_GRP1_IsEnabledClock\n |
466 | * APB1ENR TIM12EN LL_APB1_GRP1_IsEnabledClock\n |
| 467 | * APB1ENR SPI3EN LL_APB1_GRP1_IsEnabledClock\n |
467 | * APB1ENR TIM13EN LL_APB1_GRP1_IsEnabledClock\n |
| 468 | * APB1ENR TIM12EN LL_APB1_GRP1_IsEnabledClock\n |
468 | * APB1ENR TIM14EN LL_APB1_GRP1_IsEnabledClock\n |
| 469 | * APB1ENR TIM13EN LL_APB1_GRP1_IsEnabledClock\n |
469 | * APB1ENR TIM2EN LL_APB1_GRP1_IsEnabledClock\n |
| 470 | * APB1ENR TIM14EN LL_APB1_GRP1_IsEnabledClock\n |
470 | * APB1ENR TIM3EN LL_APB1_GRP1_IsEnabledClock\n |
| 471 | * APB1ENR TIM2EN LL_APB1_GRP1_IsEnabledClock\n |
471 | * APB1ENR TIM4EN LL_APB1_GRP1_IsEnabledClock\n |
| 472 | * APB1ENR TIM3EN LL_APB1_GRP1_IsEnabledClock\n |
472 | * APB1ENR TIM5EN LL_APB1_GRP1_IsEnabledClock\n |
| 473 | * APB1ENR TIM4EN LL_APB1_GRP1_IsEnabledClock\n |
473 | * APB1ENR TIM6EN LL_APB1_GRP1_IsEnabledClock\n |
| 474 | * APB1ENR TIM5EN LL_APB1_GRP1_IsEnabledClock\n |
474 | * APB1ENR TIM7EN LL_APB1_GRP1_IsEnabledClock\n |
| 475 | * APB1ENR TIM6EN LL_APB1_GRP1_IsEnabledClock\n |
475 | * APB1ENR UART4EN LL_APB1_GRP1_IsEnabledClock\n |
| 476 | * APB1ENR TIM7EN LL_APB1_GRP1_IsEnabledClock\n |
476 | * APB1ENR UART5EN LL_APB1_GRP1_IsEnabledClock\n |
| 477 | * APB1ENR UART4EN LL_APB1_GRP1_IsEnabledClock\n |
477 | * APB1ENR USART2EN LL_APB1_GRP1_IsEnabledClock\n |
| 478 | * APB1ENR UART5EN LL_APB1_GRP1_IsEnabledClock\n |
478 | * APB1ENR USART3EN LL_APB1_GRP1_IsEnabledClock\n |
| 479 | * APB1ENR USART2EN LL_APB1_GRP1_IsEnabledClock\n |
479 | * APB1ENR USBEN LL_APB1_GRP1_IsEnabledClock\n |
| 480 | * APB1ENR USART3EN LL_APB1_GRP1_IsEnabledClock\n |
480 | * APB1ENR WWDGEN LL_APB1_GRP1_IsEnabledClock |
| 481 | * APB1ENR USBEN LL_APB1_GRP1_IsEnabledClock\n |
481 | * @param Periphs This parameter can be a combination of the following values: |
| 482 | * APB1ENR WWDGEN LL_APB1_GRP1_IsEnabledClock |
482 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
| 483 | * @param Periphs This parameter can be a combination of the following values: |
483 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
| 484 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
484 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
| 485 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
485 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
| 486 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
486 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
| 487 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
487 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
| 488 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
488 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
| 489 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
489 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
| 490 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
490 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
| 491 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
491 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
| 492 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
492 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
| 493 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
493 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
| 494 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
494 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
| 495 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
495 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
| 496 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
496 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
| 497 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
497 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
| 498 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
498 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
| 499 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
499 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
| 500 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
500 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
| 501 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
501 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
| 502 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
502 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
| 503 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
503 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
| 504 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
504 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
| 505 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
505 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
| 506 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
506 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
| 507 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
507 | * |
| 508 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
508 | * (*) value not defined in all devices. |
| 509 | * |
509 | * @retval State of Periphs (1 or 0). |
| 510 | * (*) value not defined in all devices. |
510 | */ |
| 511 | * @retval State of Periphs (1 or 0). |
511 | __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs) |
| 512 | */ |
512 | { |
| 513 | __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs) |
513 | return (READ_BIT(RCC->APB1ENR, Periphs) == Periphs); |
| 514 | { |
514 | } |
| 515 | return (READ_BIT(RCC->APB1ENR, Periphs) == Periphs); |
515 | |
| 516 | } |
516 | /** |
| 517 | 517 | * @brief Disable APB1 peripherals clock. |
|
| 518 | /** |
518 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_DisableClock\n |
| 519 | * @brief Disable APB1 peripherals clock. |
519 | * APB1ENR CAN1EN LL_APB1_GRP1_DisableClock\n |
| 520 | * @rmtoll APB1ENR BKPEN LL_APB1_GRP1_DisableClock\n |
520 | * APB1ENR CAN2EN LL_APB1_GRP1_DisableClock\n |
| 521 | * APB1ENR CAN1EN LL_APB1_GRP1_DisableClock\n |
521 | * APB1ENR CECEN LL_APB1_GRP1_DisableClock\n |
| 522 | * APB1ENR CAN2EN LL_APB1_GRP1_DisableClock\n |
522 | * APB1ENR DACEN LL_APB1_GRP1_DisableClock\n |
| 523 | * APB1ENR CECEN LL_APB1_GRP1_DisableClock\n |
523 | * APB1ENR I2C1EN LL_APB1_GRP1_DisableClock\n |
| 524 | * APB1ENR DACEN LL_APB1_GRP1_DisableClock\n |
524 | * APB1ENR I2C2EN LL_APB1_GRP1_DisableClock\n |
| 525 | * APB1ENR I2C1EN LL_APB1_GRP1_DisableClock\n |
525 | * APB1ENR PWREN LL_APB1_GRP1_DisableClock\n |
| 526 | * APB1ENR I2C2EN LL_APB1_GRP1_DisableClock\n |
526 | * APB1ENR SPI2EN LL_APB1_GRP1_DisableClock\n |
| 527 | * APB1ENR PWREN LL_APB1_GRP1_DisableClock\n |
527 | * APB1ENR SPI3EN LL_APB1_GRP1_DisableClock\n |
| 528 | * APB1ENR SPI2EN LL_APB1_GRP1_DisableClock\n |
528 | * APB1ENR TIM12EN LL_APB1_GRP1_DisableClock\n |
| 529 | * APB1ENR SPI3EN LL_APB1_GRP1_DisableClock\n |
529 | * APB1ENR TIM13EN LL_APB1_GRP1_DisableClock\n |
| 530 | * APB1ENR TIM12EN LL_APB1_GRP1_DisableClock\n |
530 | * APB1ENR TIM14EN LL_APB1_GRP1_DisableClock\n |
| 531 | * APB1ENR TIM13EN LL_APB1_GRP1_DisableClock\n |
531 | * APB1ENR TIM2EN LL_APB1_GRP1_DisableClock\n |
| 532 | * APB1ENR TIM14EN LL_APB1_GRP1_DisableClock\n |
532 | * APB1ENR TIM3EN LL_APB1_GRP1_DisableClock\n |
| 533 | * APB1ENR TIM2EN LL_APB1_GRP1_DisableClock\n |
533 | * APB1ENR TIM4EN LL_APB1_GRP1_DisableClock\n |
| 534 | * APB1ENR TIM3EN LL_APB1_GRP1_DisableClock\n |
534 | * APB1ENR TIM5EN LL_APB1_GRP1_DisableClock\n |
| 535 | * APB1ENR TIM4EN LL_APB1_GRP1_DisableClock\n |
535 | * APB1ENR TIM6EN LL_APB1_GRP1_DisableClock\n |
| 536 | * APB1ENR TIM5EN LL_APB1_GRP1_DisableClock\n |
536 | * APB1ENR TIM7EN LL_APB1_GRP1_DisableClock\n |
| 537 | * APB1ENR TIM6EN LL_APB1_GRP1_DisableClock\n |
537 | * APB1ENR UART4EN LL_APB1_GRP1_DisableClock\n |
| 538 | * APB1ENR TIM7EN LL_APB1_GRP1_DisableClock\n |
538 | * APB1ENR UART5EN LL_APB1_GRP1_DisableClock\n |
| 539 | * APB1ENR UART4EN LL_APB1_GRP1_DisableClock\n |
539 | * APB1ENR USART2EN LL_APB1_GRP1_DisableClock\n |
| 540 | * APB1ENR UART5EN LL_APB1_GRP1_DisableClock\n |
540 | * APB1ENR USART3EN LL_APB1_GRP1_DisableClock\n |
| 541 | * APB1ENR USART2EN LL_APB1_GRP1_DisableClock\n |
541 | * APB1ENR USBEN LL_APB1_GRP1_DisableClock\n |
| 542 | * APB1ENR USART3EN LL_APB1_GRP1_DisableClock\n |
542 | * APB1ENR WWDGEN LL_APB1_GRP1_DisableClock |
| 543 | * APB1ENR USBEN LL_APB1_GRP1_DisableClock\n |
543 | * @param Periphs This parameter can be a combination of the following values: |
| 544 | * APB1ENR WWDGEN LL_APB1_GRP1_DisableClock |
544 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
| 545 | * @param Periphs This parameter can be a combination of the following values: |
545 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
| 546 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
546 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
| 547 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
547 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
| 548 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
548 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
| 549 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
549 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
| 550 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
550 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
| 551 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
551 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
| 552 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
552 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
| 553 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
553 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
| 554 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
554 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
| 555 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
555 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
| 556 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
556 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
| 557 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
557 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
| 558 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
558 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
| 559 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
559 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
| 560 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
560 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
| 561 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
561 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
| 562 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
562 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
| 563 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
563 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
| 564 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
564 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
| 565 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
565 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
| 566 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
566 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
| 567 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
567 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
| 568 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
568 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
| 569 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
569 | * |
| 570 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
570 | * (*) value not defined in all devices. |
| 571 | * |
571 | * @retval None |
| 572 | * (*) value not defined in all devices. |
572 | */ |
| 573 | * @retval None |
573 | __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs) |
| 574 | */ |
574 | { |
| 575 | __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs) |
575 | CLEAR_BIT(RCC->APB1ENR, Periphs); |
| 576 | { |
576 | } |
| 577 | CLEAR_BIT(RCC->APB1ENR, Periphs); |
577 | |
| 578 | } |
578 | /** |
| 579 | 579 | * @brief Force APB1 peripherals reset. |
|
| 580 | /** |
580 | * @rmtoll APB1RSTR BKPRST LL_APB1_GRP1_ForceReset\n |
| 581 | * @brief Force APB1 peripherals reset. |
581 | * APB1RSTR CAN1RST LL_APB1_GRP1_ForceReset\n |
| 582 | * @rmtoll APB1RSTR BKPRST LL_APB1_GRP1_ForceReset\n |
582 | * APB1RSTR CAN2RST LL_APB1_GRP1_ForceReset\n |
| 583 | * APB1RSTR CAN1RST LL_APB1_GRP1_ForceReset\n |
583 | * APB1RSTR CECRST LL_APB1_GRP1_ForceReset\n |
| 584 | * APB1RSTR CAN2RST LL_APB1_GRP1_ForceReset\n |
584 | * APB1RSTR DACRST LL_APB1_GRP1_ForceReset\n |
| 585 | * APB1RSTR CECRST LL_APB1_GRP1_ForceReset\n |
585 | * APB1RSTR I2C1RST LL_APB1_GRP1_ForceReset\n |
| 586 | * APB1RSTR DACRST LL_APB1_GRP1_ForceReset\n |
586 | * APB1RSTR I2C2RST LL_APB1_GRP1_ForceReset\n |
| 587 | * APB1RSTR I2C1RST LL_APB1_GRP1_ForceReset\n |
587 | * APB1RSTR PWRRST LL_APB1_GRP1_ForceReset\n |
| 588 | * APB1RSTR I2C2RST LL_APB1_GRP1_ForceReset\n |
588 | * APB1RSTR SPI2RST LL_APB1_GRP1_ForceReset\n |
| 589 | * APB1RSTR PWRRST LL_APB1_GRP1_ForceReset\n |
589 | * APB1RSTR SPI3RST LL_APB1_GRP1_ForceReset\n |
| 590 | * APB1RSTR SPI2RST LL_APB1_GRP1_ForceReset\n |
590 | * APB1RSTR TIM12RST LL_APB1_GRP1_ForceReset\n |
| 591 | * APB1RSTR SPI3RST LL_APB1_GRP1_ForceReset\n |
591 | * APB1RSTR TIM13RST LL_APB1_GRP1_ForceReset\n |
| 592 | * APB1RSTR TIM12RST LL_APB1_GRP1_ForceReset\n |
592 | * APB1RSTR TIM14RST LL_APB1_GRP1_ForceReset\n |
| 593 | * APB1RSTR TIM13RST LL_APB1_GRP1_ForceReset\n |
593 | * APB1RSTR TIM2RST LL_APB1_GRP1_ForceReset\n |
| 594 | * APB1RSTR TIM14RST LL_APB1_GRP1_ForceReset\n |
594 | * APB1RSTR TIM3RST LL_APB1_GRP1_ForceReset\n |
| 595 | * APB1RSTR TIM2RST LL_APB1_GRP1_ForceReset\n |
595 | * APB1RSTR TIM4RST LL_APB1_GRP1_ForceReset\n |
| 596 | * APB1RSTR TIM3RST LL_APB1_GRP1_ForceReset\n |
596 | * APB1RSTR TIM5RST LL_APB1_GRP1_ForceReset\n |
| 597 | * APB1RSTR TIM4RST LL_APB1_GRP1_ForceReset\n |
597 | * APB1RSTR TIM6RST LL_APB1_GRP1_ForceReset\n |
| 598 | * APB1RSTR TIM5RST LL_APB1_GRP1_ForceReset\n |
598 | * APB1RSTR TIM7RST LL_APB1_GRP1_ForceReset\n |
| 599 | * APB1RSTR TIM6RST LL_APB1_GRP1_ForceReset\n |
599 | * APB1RSTR UART4RST LL_APB1_GRP1_ForceReset\n |
| 600 | * APB1RSTR TIM7RST LL_APB1_GRP1_ForceReset\n |
600 | * APB1RSTR UART5RST LL_APB1_GRP1_ForceReset\n |
| 601 | * APB1RSTR UART4RST LL_APB1_GRP1_ForceReset\n |
601 | * APB1RSTR USART2RST LL_APB1_GRP1_ForceReset\n |
| 602 | * APB1RSTR UART5RST LL_APB1_GRP1_ForceReset\n |
602 | * APB1RSTR USART3RST LL_APB1_GRP1_ForceReset\n |
| 603 | * APB1RSTR USART2RST LL_APB1_GRP1_ForceReset\n |
603 | * APB1RSTR USBRST LL_APB1_GRP1_ForceReset\n |
| 604 | * APB1RSTR USART3RST LL_APB1_GRP1_ForceReset\n |
604 | * APB1RSTR WWDGRST LL_APB1_GRP1_ForceReset |
| 605 | * APB1RSTR USBRST LL_APB1_GRP1_ForceReset\n |
605 | * @param Periphs This parameter can be a combination of the following values: |
| 606 | * APB1RSTR WWDGRST LL_APB1_GRP1_ForceReset |
606 | * @arg @ref LL_APB1_GRP1_PERIPH_ALL |
| 607 | * @param Periphs This parameter can be a combination of the following values: |
607 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
| 608 | * @arg @ref LL_APB1_GRP1_PERIPH_ALL |
608 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
| 609 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
609 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
| 610 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
610 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
| 611 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
611 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
| 612 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
612 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
| 613 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
613 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
| 614 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
614 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
| 615 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
615 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
| 616 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
616 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
| 617 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
617 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
| 618 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
618 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
| 619 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
619 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
| 620 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
620 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
| 621 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
621 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
| 622 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
622 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
| 623 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
623 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
| 624 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
624 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
| 625 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
625 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
| 626 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
626 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
| 627 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
627 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
| 628 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
628 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
| 629 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
629 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
| 630 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
630 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
| 631 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
631 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
| 632 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
632 | * |
| 633 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
633 | * (*) value not defined in all devices. |
| 634 | * |
634 | * @retval None |
| 635 | * (*) value not defined in all devices. |
635 | */ |
| 636 | * @retval None |
636 | __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) |
| 637 | */ |
637 | { |
| 638 | __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) |
638 | SET_BIT(RCC->APB1RSTR, Periphs); |
| 639 | { |
639 | } |
| 640 | SET_BIT(RCC->APB1RSTR, Periphs); |
640 | |
| 641 | } |
641 | /** |
| 642 | 642 | * @brief Release APB1 peripherals reset. |
|
| 643 | /** |
643 | * @rmtoll APB1RSTR BKPRST LL_APB1_GRP1_ReleaseReset\n |
| 644 | * @brief Release APB1 peripherals reset. |
644 | * APB1RSTR CAN1RST LL_APB1_GRP1_ReleaseReset\n |
| 645 | * @rmtoll APB1RSTR BKPRST LL_APB1_GRP1_ReleaseReset\n |
645 | * APB1RSTR CAN2RST LL_APB1_GRP1_ReleaseReset\n |
| 646 | * APB1RSTR CAN1RST LL_APB1_GRP1_ReleaseReset\n |
646 | * APB1RSTR CECRST LL_APB1_GRP1_ReleaseReset\n |
| 647 | * APB1RSTR CAN2RST LL_APB1_GRP1_ReleaseReset\n |
647 | * APB1RSTR DACRST LL_APB1_GRP1_ReleaseReset\n |
| 648 | * APB1RSTR CECRST LL_APB1_GRP1_ReleaseReset\n |
648 | * APB1RSTR I2C1RST LL_APB1_GRP1_ReleaseReset\n |
| 649 | * APB1RSTR DACRST LL_APB1_GRP1_ReleaseReset\n |
649 | * APB1RSTR I2C2RST LL_APB1_GRP1_ReleaseReset\n |
| 650 | * APB1RSTR I2C1RST LL_APB1_GRP1_ReleaseReset\n |
650 | * APB1RSTR PWRRST LL_APB1_GRP1_ReleaseReset\n |
| 651 | * APB1RSTR I2C2RST LL_APB1_GRP1_ReleaseReset\n |
651 | * APB1RSTR SPI2RST LL_APB1_GRP1_ReleaseReset\n |
| 652 | * APB1RSTR PWRRST LL_APB1_GRP1_ReleaseReset\n |
652 | * APB1RSTR SPI3RST LL_APB1_GRP1_ReleaseReset\n |
| 653 | * APB1RSTR SPI2RST LL_APB1_GRP1_ReleaseReset\n |
653 | * APB1RSTR TIM12RST LL_APB1_GRP1_ReleaseReset\n |
| 654 | * APB1RSTR SPI3RST LL_APB1_GRP1_ReleaseReset\n |
654 | * APB1RSTR TIM13RST LL_APB1_GRP1_ReleaseReset\n |
| 655 | * APB1RSTR TIM12RST LL_APB1_GRP1_ReleaseReset\n |
655 | * APB1RSTR TIM14RST LL_APB1_GRP1_ReleaseReset\n |
| 656 | * APB1RSTR TIM13RST LL_APB1_GRP1_ReleaseReset\n |
656 | * APB1RSTR TIM2RST LL_APB1_GRP1_ReleaseReset\n |
| 657 | * APB1RSTR TIM14RST LL_APB1_GRP1_ReleaseReset\n |
657 | * APB1RSTR TIM3RST LL_APB1_GRP1_ReleaseReset\n |
| 658 | * APB1RSTR TIM2RST LL_APB1_GRP1_ReleaseReset\n |
658 | * APB1RSTR TIM4RST LL_APB1_GRP1_ReleaseReset\n |
| 659 | * APB1RSTR TIM3RST LL_APB1_GRP1_ReleaseReset\n |
659 | * APB1RSTR TIM5RST LL_APB1_GRP1_ReleaseReset\n |
| 660 | * APB1RSTR TIM4RST LL_APB1_GRP1_ReleaseReset\n |
660 | * APB1RSTR TIM6RST LL_APB1_GRP1_ReleaseReset\n |
| 661 | * APB1RSTR TIM5RST LL_APB1_GRP1_ReleaseReset\n |
661 | * APB1RSTR TIM7RST LL_APB1_GRP1_ReleaseReset\n |
| 662 | * APB1RSTR TIM6RST LL_APB1_GRP1_ReleaseReset\n |
662 | * APB1RSTR UART4RST LL_APB1_GRP1_ReleaseReset\n |
| 663 | * APB1RSTR TIM7RST LL_APB1_GRP1_ReleaseReset\n |
663 | * APB1RSTR UART5RST LL_APB1_GRP1_ReleaseReset\n |
| 664 | * APB1RSTR UART4RST LL_APB1_GRP1_ReleaseReset\n |
664 | * APB1RSTR USART2RST LL_APB1_GRP1_ReleaseReset\n |
| 665 | * APB1RSTR UART5RST LL_APB1_GRP1_ReleaseReset\n |
665 | * APB1RSTR USART3RST LL_APB1_GRP1_ReleaseReset\n |
| 666 | * APB1RSTR USART2RST LL_APB1_GRP1_ReleaseReset\n |
666 | * APB1RSTR USBRST LL_APB1_GRP1_ReleaseReset\n |
| 667 | * APB1RSTR USART3RST LL_APB1_GRP1_ReleaseReset\n |
667 | * APB1RSTR WWDGRST LL_APB1_GRP1_ReleaseReset |
| 668 | * APB1RSTR USBRST LL_APB1_GRP1_ReleaseReset\n |
668 | * @param Periphs This parameter can be a combination of the following values: |
| 669 | * APB1RSTR WWDGRST LL_APB1_GRP1_ReleaseReset |
669 | * @arg @ref LL_APB1_GRP1_PERIPH_ALL |
| 670 | * @param Periphs This parameter can be a combination of the following values: |
670 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
| 671 | * @arg @ref LL_APB1_GRP1_PERIPH_ALL |
671 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
| 672 | * @arg @ref LL_APB1_GRP1_PERIPH_BKP |
672 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
| 673 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN1 (*) |
673 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
| 674 | * @arg @ref LL_APB1_GRP1_PERIPH_CAN2 (*) |
674 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
| 675 | * @arg @ref LL_APB1_GRP1_PERIPH_CEC (*) |
675 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
| 676 | * @arg @ref LL_APB1_GRP1_PERIPH_DAC1 (*) |
676 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
| 677 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 |
677 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
| 678 | * @arg @ref LL_APB1_GRP1_PERIPH_I2C2 (*) |
678 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
| 679 | * @arg @ref LL_APB1_GRP1_PERIPH_PWR |
679 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
| 680 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) |
680 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
| 681 | * @arg @ref LL_APB1_GRP1_PERIPH_SPI3 (*) |
681 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
| 682 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM12 (*) |
682 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
| 683 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM13 (*) |
683 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
| 684 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM14 (*) |
684 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
| 685 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 |
685 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
| 686 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM3 |
686 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
| 687 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM4 (*) |
687 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
| 688 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM5 (*) |
688 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
| 689 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM6 (*) |
689 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
| 690 | * @arg @ref LL_APB1_GRP1_PERIPH_TIM7 (*) |
690 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
| 691 | * @arg @ref LL_APB1_GRP1_PERIPH_UART4 (*) |
691 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
| 692 | * @arg @ref LL_APB1_GRP1_PERIPH_UART5 (*) |
692 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
| 693 | * @arg @ref LL_APB1_GRP1_PERIPH_USART2 |
693 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
| 694 | * @arg @ref LL_APB1_GRP1_PERIPH_USART3 (*) |
694 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
| 695 | * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) |
695 | * |
| 696 | * @arg @ref LL_APB1_GRP1_PERIPH_WWDG |
696 | * (*) value not defined in all devices. |
| 697 | * |
697 | * @retval None |
| 698 | * (*) value not defined in all devices. |
698 | */ |
| 699 | * @retval None |
699 | __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) |
| 700 | */ |
700 | { |
| 701 | __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) |
701 | CLEAR_BIT(RCC->APB1RSTR, Periphs); |
| 702 | { |
702 | } |
| 703 | CLEAR_BIT(RCC->APB1RSTR, Periphs); |
703 | |
| 704 | } |
704 | /** |
| 705 | 705 | * @} |
|
| 706 | /** |
706 | */ |
| 707 | * @} |
707 | |
| 708 | */ |
708 | /** @defgroup BUS_LL_EF_APB2 APB2 |
| 709 | 709 | * @{ |
|
| 710 | /** @defgroup BUS_LL_EF_APB2 APB2 |
710 | */ |
| 711 | * @{ |
711 | |
| 712 | */ |
712 | /** |
| 713 | 713 | * @brief Enable APB2 peripherals clock. |
|
| 714 | /** |
714 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_EnableClock\n |
| 715 | * @brief Enable APB2 peripherals clock. |
715 | * APB2ENR ADC2EN LL_APB2_GRP1_EnableClock\n |
| 716 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_EnableClock\n |
716 | * APB2ENR ADC3EN LL_APB2_GRP1_EnableClock\n |
| 717 | * APB2ENR ADC2EN LL_APB2_GRP1_EnableClock\n |
717 | * APB2ENR AFIOEN LL_APB2_GRP1_EnableClock\n |
| 718 | * APB2ENR ADC3EN LL_APB2_GRP1_EnableClock\n |
718 | * APB2ENR IOPAEN LL_APB2_GRP1_EnableClock\n |
| 719 | * APB2ENR AFIOEN LL_APB2_GRP1_EnableClock\n |
719 | * APB2ENR IOPBEN LL_APB2_GRP1_EnableClock\n |
| 720 | * APB2ENR IOPAEN LL_APB2_GRP1_EnableClock\n |
720 | * APB2ENR IOPCEN LL_APB2_GRP1_EnableClock\n |
| 721 | * APB2ENR IOPBEN LL_APB2_GRP1_EnableClock\n |
721 | * APB2ENR IOPDEN LL_APB2_GRP1_EnableClock\n |
| 722 | * APB2ENR IOPCEN LL_APB2_GRP1_EnableClock\n |
722 | * APB2ENR IOPEEN LL_APB2_GRP1_EnableClock\n |
| 723 | * APB2ENR IOPDEN LL_APB2_GRP1_EnableClock\n |
723 | * APB2ENR IOPFEN LL_APB2_GRP1_EnableClock\n |
| 724 | * APB2ENR IOPEEN LL_APB2_GRP1_EnableClock\n |
724 | * APB2ENR IOPGEN LL_APB2_GRP1_EnableClock\n |
| 725 | * APB2ENR IOPFEN LL_APB2_GRP1_EnableClock\n |
725 | * APB2ENR SPI1EN LL_APB2_GRP1_EnableClock\n |
| 726 | * APB2ENR IOPGEN LL_APB2_GRP1_EnableClock\n |
726 | * APB2ENR TIM10EN LL_APB2_GRP1_EnableClock\n |
| 727 | * APB2ENR SPI1EN LL_APB2_GRP1_EnableClock\n |
727 | * APB2ENR TIM11EN LL_APB2_GRP1_EnableClock\n |
| 728 | * APB2ENR TIM10EN LL_APB2_GRP1_EnableClock\n |
728 | * APB2ENR TIM15EN LL_APB2_GRP1_EnableClock\n |
| 729 | * APB2ENR TIM11EN LL_APB2_GRP1_EnableClock\n |
729 | * APB2ENR TIM16EN LL_APB2_GRP1_EnableClock\n |
| 730 | * APB2ENR TIM15EN LL_APB2_GRP1_EnableClock\n |
730 | * APB2ENR TIM17EN LL_APB2_GRP1_EnableClock\n |
| 731 | * APB2ENR TIM16EN LL_APB2_GRP1_EnableClock\n |
731 | * APB2ENR TIM1EN LL_APB2_GRP1_EnableClock\n |
| 732 | * APB2ENR TIM17EN LL_APB2_GRP1_EnableClock\n |
732 | * APB2ENR TIM8EN LL_APB2_GRP1_EnableClock\n |
| 733 | * APB2ENR TIM1EN LL_APB2_GRP1_EnableClock\n |
733 | * APB2ENR TIM9EN LL_APB2_GRP1_EnableClock\n |
| 734 | * APB2ENR TIM8EN LL_APB2_GRP1_EnableClock\n |
734 | * APB2ENR USART1EN LL_APB2_GRP1_EnableClock |
| 735 | * APB2ENR TIM9EN LL_APB2_GRP1_EnableClock\n |
735 | * @param Periphs This parameter can be a combination of the following values: |
| 736 | * APB2ENR USART1EN LL_APB2_GRP1_EnableClock |
736 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
| 737 | * @param Periphs This parameter can be a combination of the following values: |
737 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
| 738 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
738 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
| 739 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
739 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
| 740 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
740 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
| 741 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
741 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
| 742 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
742 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
| 743 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
743 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
| 744 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
744 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
| 745 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
745 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
| 746 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
746 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
| 747 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
747 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
| 748 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
748 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
| 749 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
749 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
| 750 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
750 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
| 751 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
751 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
| 752 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
752 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
| 753 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
753 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
| 754 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
754 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
| 755 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
755 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
| 756 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
756 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
| 757 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
757 | * |
| 758 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
758 | * (*) value not defined in all devices. |
| 759 | * |
759 | * @retval None |
| 760 | * (*) value not defined in all devices. |
760 | */ |
| 761 | * @retval None |
761 | __STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs) |
| 762 | */ |
762 | { |
| 763 | __STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs) |
763 | __IO uint32_t tmpreg; |
| 764 | { |
764 | SET_BIT(RCC->APB2ENR, Periphs); |
| 765 | __IO uint32_t tmpreg; |
765 | /* Delay after an RCC peripheral clock enabling */ |
| 766 | SET_BIT(RCC->APB2ENR, Periphs); |
766 | tmpreg = READ_BIT(RCC->APB2ENR, Periphs); |
| 767 | /* Delay after an RCC peripheral clock enabling */ |
767 | (void)tmpreg; |
| 768 | tmpreg = READ_BIT(RCC->APB2ENR, Periphs); |
768 | } |
| 769 | (void)tmpreg; |
769 | |
| 770 | } |
770 | /** |
| 771 | 771 | * @brief Check if APB2 peripheral clock is enabled or not |
|
| 772 | /** |
772 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_IsEnabledClock\n |
| 773 | * @brief Check if APB2 peripheral clock is enabled or not |
773 | * APB2ENR ADC2EN LL_APB2_GRP1_IsEnabledClock\n |
| 774 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_IsEnabledClock\n |
774 | * APB2ENR ADC3EN LL_APB2_GRP1_IsEnabledClock\n |
| 775 | * APB2ENR ADC2EN LL_APB2_GRP1_IsEnabledClock\n |
775 | * APB2ENR AFIOEN LL_APB2_GRP1_IsEnabledClock\n |
| 776 | * APB2ENR ADC3EN LL_APB2_GRP1_IsEnabledClock\n |
776 | * APB2ENR IOPAEN LL_APB2_GRP1_IsEnabledClock\n |
| 777 | * APB2ENR AFIOEN LL_APB2_GRP1_IsEnabledClock\n |
777 | * APB2ENR IOPBEN LL_APB2_GRP1_IsEnabledClock\n |
| 778 | * APB2ENR IOPAEN LL_APB2_GRP1_IsEnabledClock\n |
778 | * APB2ENR IOPCEN LL_APB2_GRP1_IsEnabledClock\n |
| 779 | * APB2ENR IOPBEN LL_APB2_GRP1_IsEnabledClock\n |
779 | * APB2ENR IOPDEN LL_APB2_GRP1_IsEnabledClock\n |
| 780 | * APB2ENR IOPCEN LL_APB2_GRP1_IsEnabledClock\n |
780 | * APB2ENR IOPEEN LL_APB2_GRP1_IsEnabledClock\n |
| 781 | * APB2ENR IOPDEN LL_APB2_GRP1_IsEnabledClock\n |
781 | * APB2ENR IOPFEN LL_APB2_GRP1_IsEnabledClock\n |
| 782 | * APB2ENR IOPEEN LL_APB2_GRP1_IsEnabledClock\n |
782 | * APB2ENR IOPGEN LL_APB2_GRP1_IsEnabledClock\n |
| 783 | * APB2ENR IOPFEN LL_APB2_GRP1_IsEnabledClock\n |
783 | * APB2ENR SPI1EN LL_APB2_GRP1_IsEnabledClock\n |
| 784 | * APB2ENR IOPGEN LL_APB2_GRP1_IsEnabledClock\n |
784 | * APB2ENR TIM10EN LL_APB2_GRP1_IsEnabledClock\n |
| 785 | * APB2ENR SPI1EN LL_APB2_GRP1_IsEnabledClock\n |
785 | * APB2ENR TIM11EN LL_APB2_GRP1_IsEnabledClock\n |
| 786 | * APB2ENR TIM10EN LL_APB2_GRP1_IsEnabledClock\n |
786 | * APB2ENR TIM15EN LL_APB2_GRP1_IsEnabledClock\n |
| 787 | * APB2ENR TIM11EN LL_APB2_GRP1_IsEnabledClock\n |
787 | * APB2ENR TIM16EN LL_APB2_GRP1_IsEnabledClock\n |
| 788 | * APB2ENR TIM15EN LL_APB2_GRP1_IsEnabledClock\n |
788 | * APB2ENR TIM17EN LL_APB2_GRP1_IsEnabledClock\n |
| 789 | * APB2ENR TIM16EN LL_APB2_GRP1_IsEnabledClock\n |
789 | * APB2ENR TIM1EN LL_APB2_GRP1_IsEnabledClock\n |
| 790 | * APB2ENR TIM17EN LL_APB2_GRP1_IsEnabledClock\n |
790 | * APB2ENR TIM8EN LL_APB2_GRP1_IsEnabledClock\n |
| 791 | * APB2ENR TIM1EN LL_APB2_GRP1_IsEnabledClock\n |
791 | * APB2ENR TIM9EN LL_APB2_GRP1_IsEnabledClock\n |
| 792 | * APB2ENR TIM8EN LL_APB2_GRP1_IsEnabledClock\n |
792 | * APB2ENR USART1EN LL_APB2_GRP1_IsEnabledClock |
| 793 | * APB2ENR TIM9EN LL_APB2_GRP1_IsEnabledClock\n |
793 | * @param Periphs This parameter can be a combination of the following values: |
| 794 | * APB2ENR USART1EN LL_APB2_GRP1_IsEnabledClock |
794 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
| 795 | * @param Periphs This parameter can be a combination of the following values: |
795 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
| 796 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
796 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
| 797 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
797 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
| 798 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
798 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
| 799 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
799 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
| 800 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
800 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
| 801 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
801 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
| 802 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
802 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
| 803 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
803 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
| 804 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
804 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
| 805 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
805 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
| 806 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
806 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
| 807 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
807 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
| 808 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
808 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
| 809 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
809 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
| 810 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
810 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
| 811 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
811 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
| 812 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
812 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
| 813 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
813 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
| 814 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
814 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
| 815 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
815 | * |
| 816 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
816 | * (*) value not defined in all devices. |
| 817 | * |
817 | * @retval State of Periphs (1 or 0). |
| 818 | * (*) value not defined in all devices. |
818 | */ |
| 819 | * @retval State of Periphs (1 or 0). |
819 | __STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs) |
| 820 | */ |
820 | { |
| 821 | __STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs) |
821 | return (READ_BIT(RCC->APB2ENR, Periphs) == Periphs); |
| 822 | { |
822 | } |
| 823 | return (READ_BIT(RCC->APB2ENR, Periphs) == Periphs); |
823 | |
| 824 | } |
824 | /** |
| 825 | 825 | * @brief Disable APB2 peripherals clock. |
|
| 826 | /** |
826 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_DisableClock\n |
| 827 | * @brief Disable APB2 peripherals clock. |
827 | * APB2ENR ADC2EN LL_APB2_GRP1_DisableClock\n |
| 828 | * @rmtoll APB2ENR ADC1EN LL_APB2_GRP1_DisableClock\n |
828 | * APB2ENR ADC3EN LL_APB2_GRP1_DisableClock\n |
| 829 | * APB2ENR ADC2EN LL_APB2_GRP1_DisableClock\n |
829 | * APB2ENR AFIOEN LL_APB2_GRP1_DisableClock\n |
| 830 | * APB2ENR ADC3EN LL_APB2_GRP1_DisableClock\n |
830 | * APB2ENR IOPAEN LL_APB2_GRP1_DisableClock\n |
| 831 | * APB2ENR AFIOEN LL_APB2_GRP1_DisableClock\n |
831 | * APB2ENR IOPBEN LL_APB2_GRP1_DisableClock\n |
| 832 | * APB2ENR IOPAEN LL_APB2_GRP1_DisableClock\n |
832 | * APB2ENR IOPCEN LL_APB2_GRP1_DisableClock\n |
| 833 | * APB2ENR IOPBEN LL_APB2_GRP1_DisableClock\n |
833 | * APB2ENR IOPDEN LL_APB2_GRP1_DisableClock\n |
| 834 | * APB2ENR IOPCEN LL_APB2_GRP1_DisableClock\n |
834 | * APB2ENR IOPEEN LL_APB2_GRP1_DisableClock\n |
| 835 | * APB2ENR IOPDEN LL_APB2_GRP1_DisableClock\n |
835 | * APB2ENR IOPFEN LL_APB2_GRP1_DisableClock\n |
| 836 | * APB2ENR IOPEEN LL_APB2_GRP1_DisableClock\n |
836 | * APB2ENR IOPGEN LL_APB2_GRP1_DisableClock\n |
| 837 | * APB2ENR IOPFEN LL_APB2_GRP1_DisableClock\n |
837 | * APB2ENR SPI1EN LL_APB2_GRP1_DisableClock\n |
| 838 | * APB2ENR IOPGEN LL_APB2_GRP1_DisableClock\n |
838 | * APB2ENR TIM10EN LL_APB2_GRP1_DisableClock\n |
| 839 | * APB2ENR SPI1EN LL_APB2_GRP1_DisableClock\n |
839 | * APB2ENR TIM11EN LL_APB2_GRP1_DisableClock\n |
| 840 | * APB2ENR TIM10EN LL_APB2_GRP1_DisableClock\n |
840 | * APB2ENR TIM15EN LL_APB2_GRP1_DisableClock\n |
| 841 | * APB2ENR TIM11EN LL_APB2_GRP1_DisableClock\n |
841 | * APB2ENR TIM16EN LL_APB2_GRP1_DisableClock\n |
| 842 | * APB2ENR TIM15EN LL_APB2_GRP1_DisableClock\n |
842 | * APB2ENR TIM17EN LL_APB2_GRP1_DisableClock\n |
| 843 | * APB2ENR TIM16EN LL_APB2_GRP1_DisableClock\n |
843 | * APB2ENR TIM1EN LL_APB2_GRP1_DisableClock\n |
| 844 | * APB2ENR TIM17EN LL_APB2_GRP1_DisableClock\n |
844 | * APB2ENR TIM8EN LL_APB2_GRP1_DisableClock\n |
| 845 | * APB2ENR TIM1EN LL_APB2_GRP1_DisableClock\n |
845 | * APB2ENR TIM9EN LL_APB2_GRP1_DisableClock\n |
| 846 | * APB2ENR TIM8EN LL_APB2_GRP1_DisableClock\n |
846 | * APB2ENR USART1EN LL_APB2_GRP1_DisableClock |
| 847 | * APB2ENR TIM9EN LL_APB2_GRP1_DisableClock\n |
847 | * @param Periphs This parameter can be a combination of the following values: |
| 848 | * APB2ENR USART1EN LL_APB2_GRP1_DisableClock |
848 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
| 849 | * @param Periphs This parameter can be a combination of the following values: |
849 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
| 850 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
850 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
| 851 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
851 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
| 852 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
852 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
| 853 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
853 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
| 854 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
854 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
| 855 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
855 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
| 856 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
856 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
| 857 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
857 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
| 858 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
858 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
| 859 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
859 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
| 860 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
860 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
| 861 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
861 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
| 862 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
862 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
| 863 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
863 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
| 864 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
864 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
| 865 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
865 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
| 866 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
866 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
| 867 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
867 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
| 868 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
868 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
| 869 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
869 | * |
| 870 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
870 | * (*) value not defined in all devices. |
| 871 | * |
871 | * @retval None |
| 872 | * (*) value not defined in all devices. |
872 | */ |
| 873 | * @retval None |
873 | __STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs) |
| 874 | */ |
874 | { |
| 875 | __STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs) |
875 | CLEAR_BIT(RCC->APB2ENR, Periphs); |
| 876 | { |
876 | } |
| 877 | CLEAR_BIT(RCC->APB2ENR, Periphs); |
877 | |
| 878 | } |
878 | /** |
| 879 | 879 | * @brief Force APB2 peripherals reset. |
|
| 880 | /** |
880 | * @rmtoll APB2RSTR ADC1RST LL_APB2_GRP1_ForceReset\n |
| 881 | * @brief Force APB2 peripherals reset. |
881 | * APB2RSTR ADC2RST LL_APB2_GRP1_ForceReset\n |
| 882 | * @rmtoll APB2RSTR ADC1RST LL_APB2_GRP1_ForceReset\n |
882 | * APB2RSTR ADC3RST LL_APB2_GRP1_ForceReset\n |
| 883 | * APB2RSTR ADC2RST LL_APB2_GRP1_ForceReset\n |
883 | * APB2RSTR AFIORST LL_APB2_GRP1_ForceReset\n |
| 884 | * APB2RSTR ADC3RST LL_APB2_GRP1_ForceReset\n |
884 | * APB2RSTR IOPARST LL_APB2_GRP1_ForceReset\n |
| 885 | * APB2RSTR AFIORST LL_APB2_GRP1_ForceReset\n |
885 | * APB2RSTR IOPBRST LL_APB2_GRP1_ForceReset\n |
| 886 | * APB2RSTR IOPARST LL_APB2_GRP1_ForceReset\n |
886 | * APB2RSTR IOPCRST LL_APB2_GRP1_ForceReset\n |
| 887 | * APB2RSTR IOPBRST LL_APB2_GRP1_ForceReset\n |
887 | * APB2RSTR IOPDRST LL_APB2_GRP1_ForceReset\n |
| 888 | * APB2RSTR IOPCRST LL_APB2_GRP1_ForceReset\n |
888 | * APB2RSTR IOPERST LL_APB2_GRP1_ForceReset\n |
| 889 | * APB2RSTR IOPDRST LL_APB2_GRP1_ForceReset\n |
889 | * APB2RSTR IOPFRST LL_APB2_GRP1_ForceReset\n |
| 890 | * APB2RSTR IOPERST LL_APB2_GRP1_ForceReset\n |
890 | * APB2RSTR IOPGRST LL_APB2_GRP1_ForceReset\n |
| 891 | * APB2RSTR IOPFRST LL_APB2_GRP1_ForceReset\n |
891 | * APB2RSTR SPI1RST LL_APB2_GRP1_ForceReset\n |
| 892 | * APB2RSTR IOPGRST LL_APB2_GRP1_ForceReset\n |
892 | * APB2RSTR TIM10RST LL_APB2_GRP1_ForceReset\n |
| 893 | * APB2RSTR SPI1RST LL_APB2_GRP1_ForceReset\n |
893 | * APB2RSTR TIM11RST LL_APB2_GRP1_ForceReset\n |
| 894 | * APB2RSTR TIM10RST LL_APB2_GRP1_ForceReset\n |
894 | * APB2RSTR TIM15RST LL_APB2_GRP1_ForceReset\n |
| 895 | * APB2RSTR TIM11RST LL_APB2_GRP1_ForceReset\n |
895 | * APB2RSTR TIM16RST LL_APB2_GRP1_ForceReset\n |
| 896 | * APB2RSTR TIM15RST LL_APB2_GRP1_ForceReset\n |
896 | * APB2RSTR TIM17RST LL_APB2_GRP1_ForceReset\n |
| 897 | * APB2RSTR TIM16RST LL_APB2_GRP1_ForceReset\n |
897 | * APB2RSTR TIM1RST LL_APB2_GRP1_ForceReset\n |
| 898 | * APB2RSTR TIM17RST LL_APB2_GRP1_ForceReset\n |
898 | * APB2RSTR TIM8RST LL_APB2_GRP1_ForceReset\n |
| 899 | * APB2RSTR TIM1RST LL_APB2_GRP1_ForceReset\n |
899 | * APB2RSTR TIM9RST LL_APB2_GRP1_ForceReset\n |
| 900 | * APB2RSTR TIM8RST LL_APB2_GRP1_ForceReset\n |
900 | * APB2RSTR USART1RST LL_APB2_GRP1_ForceReset |
| 901 | * APB2RSTR TIM9RST LL_APB2_GRP1_ForceReset\n |
901 | * @param Periphs This parameter can be a combination of the following values: |
| 902 | * APB2RSTR USART1RST LL_APB2_GRP1_ForceReset |
902 | * @arg @ref LL_APB2_GRP1_PERIPH_ALL |
| 903 | * @param Periphs This parameter can be a combination of the following values: |
903 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
| 904 | * @arg @ref LL_APB2_GRP1_PERIPH_ALL |
904 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
| 905 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
905 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
| 906 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
906 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
| 907 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
907 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
| 908 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
908 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
| 909 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
909 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
| 910 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
910 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
| 911 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
911 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
| 912 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
912 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
| 913 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
913 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
| 914 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
914 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
| 915 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
915 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
| 916 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
916 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
| 917 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
917 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
| 918 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
918 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
| 919 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
919 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
| 920 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
920 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
| 921 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
921 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
| 922 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
922 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
| 923 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
923 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
| 924 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
924 | * |
| 925 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
925 | * (*) value not defined in all devices. |
| 926 | * |
926 | * @retval None |
| 927 | * (*) value not defined in all devices. |
927 | */ |
| 928 | * @retval None |
928 | __STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs) |
| 929 | */ |
929 | { |
| 930 | __STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs) |
930 | SET_BIT(RCC->APB2RSTR, Periphs); |
| 931 | { |
931 | } |
| 932 | SET_BIT(RCC->APB2RSTR, Periphs); |
932 | |
| 933 | } |
933 | /** |
| 934 | 934 | * @brief Release APB2 peripherals reset. |
|
| 935 | /** |
935 | * @rmtoll APB2RSTR ADC1RST LL_APB2_GRP1_ReleaseReset\n |
| 936 | * @brief Release APB2 peripherals reset. |
936 | * APB2RSTR ADC2RST LL_APB2_GRP1_ReleaseReset\n |
| 937 | * @rmtoll APB2RSTR ADC1RST LL_APB2_GRP1_ReleaseReset\n |
937 | * APB2RSTR ADC3RST LL_APB2_GRP1_ReleaseReset\n |
| 938 | * APB2RSTR ADC2RST LL_APB2_GRP1_ReleaseReset\n |
938 | * APB2RSTR AFIORST LL_APB2_GRP1_ReleaseReset\n |
| 939 | * APB2RSTR ADC3RST LL_APB2_GRP1_ReleaseReset\n |
939 | * APB2RSTR IOPARST LL_APB2_GRP1_ReleaseReset\n |
| 940 | * APB2RSTR AFIORST LL_APB2_GRP1_ReleaseReset\n |
940 | * APB2RSTR IOPBRST LL_APB2_GRP1_ReleaseReset\n |
| 941 | * APB2RSTR IOPARST LL_APB2_GRP1_ReleaseReset\n |
941 | * APB2RSTR IOPCRST LL_APB2_GRP1_ReleaseReset\n |
| 942 | * APB2RSTR IOPBRST LL_APB2_GRP1_ReleaseReset\n |
942 | * APB2RSTR IOPDRST LL_APB2_GRP1_ReleaseReset\n |
| 943 | * APB2RSTR IOPCRST LL_APB2_GRP1_ReleaseReset\n |
943 | * APB2RSTR IOPERST LL_APB2_GRP1_ReleaseReset\n |
| 944 | * APB2RSTR IOPDRST LL_APB2_GRP1_ReleaseReset\n |
944 | * APB2RSTR IOPFRST LL_APB2_GRP1_ReleaseReset\n |
| 945 | * APB2RSTR IOPERST LL_APB2_GRP1_ReleaseReset\n |
945 | * APB2RSTR IOPGRST LL_APB2_GRP1_ReleaseReset\n |
| 946 | * APB2RSTR IOPFRST LL_APB2_GRP1_ReleaseReset\n |
946 | * APB2RSTR SPI1RST LL_APB2_GRP1_ReleaseReset\n |
| 947 | * APB2RSTR IOPGRST LL_APB2_GRP1_ReleaseReset\n |
947 | * APB2RSTR TIM10RST LL_APB2_GRP1_ReleaseReset\n |
| 948 | * APB2RSTR SPI1RST LL_APB2_GRP1_ReleaseReset\n |
948 | * APB2RSTR TIM11RST LL_APB2_GRP1_ReleaseReset\n |
| 949 | * APB2RSTR TIM10RST LL_APB2_GRP1_ReleaseReset\n |
949 | * APB2RSTR TIM15RST LL_APB2_GRP1_ReleaseReset\n |
| 950 | * APB2RSTR TIM11RST LL_APB2_GRP1_ReleaseReset\n |
950 | * APB2RSTR TIM16RST LL_APB2_GRP1_ReleaseReset\n |
| 951 | * APB2RSTR TIM15RST LL_APB2_GRP1_ReleaseReset\n |
951 | * APB2RSTR TIM17RST LL_APB2_GRP1_ReleaseReset\n |
| 952 | * APB2RSTR TIM16RST LL_APB2_GRP1_ReleaseReset\n |
952 | * APB2RSTR TIM1RST LL_APB2_GRP1_ReleaseReset\n |
| 953 | * APB2RSTR TIM17RST LL_APB2_GRP1_ReleaseReset\n |
953 | * APB2RSTR TIM8RST LL_APB2_GRP1_ReleaseReset\n |
| 954 | * APB2RSTR TIM1RST LL_APB2_GRP1_ReleaseReset\n |
954 | * APB2RSTR TIM9RST LL_APB2_GRP1_ReleaseReset\n |
| 955 | * APB2RSTR TIM8RST LL_APB2_GRP1_ReleaseReset\n |
955 | * APB2RSTR USART1RST LL_APB2_GRP1_ReleaseReset |
| 956 | * APB2RSTR TIM9RST LL_APB2_GRP1_ReleaseReset\n |
956 | * @param Periphs This parameter can be a combination of the following values: |
| 957 | * APB2RSTR USART1RST LL_APB2_GRP1_ReleaseReset |
957 | * @arg @ref LL_APB2_GRP1_PERIPH_ALL |
| 958 | * @param Periphs This parameter can be a combination of the following values: |
958 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
| 959 | * @arg @ref LL_APB2_GRP1_PERIPH_ALL |
959 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
| 960 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC1 |
960 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
| 961 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC2 (*) |
961 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
| 962 | * @arg @ref LL_APB2_GRP1_PERIPH_ADC3 (*) |
962 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
| 963 | * @arg @ref LL_APB2_GRP1_PERIPH_AFIO |
963 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
| 964 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOA |
964 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
| 965 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOB |
965 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
| 966 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOC |
966 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
| 967 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOD |
967 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
| 968 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOE (*) |
968 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
| 969 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOF (*) |
969 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
| 970 | * @arg @ref LL_APB2_GRP1_PERIPH_GPIOG (*) |
970 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
| 971 | * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 |
971 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
| 972 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM10 (*) |
972 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
| 973 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM11 (*) |
973 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
| 974 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM15 (*) |
974 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
| 975 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) |
975 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
| 976 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) |
976 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
| 977 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 |
977 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
| 978 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM8 (*) |
978 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
| 979 | * @arg @ref LL_APB2_GRP1_PERIPH_TIM9 (*) |
979 | * |
| 980 | * @arg @ref LL_APB2_GRP1_PERIPH_USART1 |
980 | * (*) value not defined in all devices. |
| 981 | * |
981 | * @retval None |
| 982 | * (*) value not defined in all devices. |
982 | */ |
| 983 | * @retval None |
983 | __STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs) |
| 984 | */ |
984 | { |
| 985 | __STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs) |
985 | CLEAR_BIT(RCC->APB2RSTR, Periphs); |
| 986 | { |
986 | } |
| 987 | CLEAR_BIT(RCC->APB2RSTR, Periphs); |
987 | |
| 988 | } |
988 | /** |
| 989 | 989 | * @} |
|
| 990 | /** |
990 | */ |
| 991 | * @} |
991 | |
| 992 | */ |
992 | |
| 993 | 993 | /** |
|
| 994 | 994 | * @} |
|
| 995 | /** |
995 | */ |
| 996 | * @} |
996 | |
| 997 | */ |
997 | /** |
| 998 | 998 | * @} |
|
| 999 | /** |
999 | */ |
| 1000 | * @} |
1000 | |
| 1001 | */ |
1001 | #endif /* defined(RCC) */ |
| 1002 | 1002 | ||
| 1003 | #endif /* defined(RCC) */ |
1003 | /** |
| 1004 | 1004 | * @} |
|
| 1005 | /** |
1005 | */ |
| 1006 | * @} |
1006 | |
| 1007 | */ |
1007 | #ifdef __cplusplus |
| 1008 | 1008 | } |
|
| 1009 | #ifdef __cplusplus |
1009 | #endif |
| 1010 | } |
1010 | |
| 1011 | #endif |
1011 | #endif /* __STM32F1xx_LL_BUS_H */ |
| 1012 | 1012 | ||
| 1013 | #endif /* __STM32F1xx_LL_BUS_H */ |
- | |
| 1014 | - | ||
| 1015 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
- | |