We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentba52cf2 commit088209cCopy full SHA for 088209c
cores/arduino/stm32/clock.h
@@ -37,6 +37,7 @@ typedef enum {
37
uint32_tgetCurrentMillis(void);
38
uint32_tgetCurrentMicros(void);
39
40
+voidconfigIPClock(void);
41
voidenableClock(sourceClock_tsource);
42
voidconfigHSECapacitorTuning(void);
43
cores/arduino/stm32/usb/usbd_if.c
@@ -151,7 +151,6 @@ WEAK void USBD_reenumerate(void)
151
* do not manage the internal pull-up, so manage
152
* internal pull-up manually.
153
*/
154
-__HAL_RCC_SYSCFG_CLK_ENABLE();
155
LL_SYSCFG_DisableUSBPullUp();
156
delay(USBD_ENUM_DELAY);
157
LL_SYSCFG_EnableUSBPullUp();
libraries/SrcWrapper/src/stm32/clock.c
@@ -152,6 +152,28 @@ void configHSECapacitorTuning(void)
#endif
}
+/**
+ * @brief This function enables clocks for some system IP
+ * @param None
158
+ * @retval None
159
+ */
160
+voidconfigIPClock(void)
161
+{
162
+#ifdefHSEM_BASE
163
+__HAL_RCC_HSEM_CLK_ENABLE();
164
+#endif
165
+
166
+#if defined(__HAL_RCC_PWR_CLK_ENABLE)
167
+/* Enable PWR clock, needed for example: voltage scaling, low power ... */
168
+__HAL_RCC_PWR_CLK_ENABLE();
169
170
171
+#if defined(__HAL_RCC_SYSCFG_CLK_ENABLE)
172
+/* Enable SYSCFG clock, needed for example: Pin remap or Analog switch ... */
173
+__HAL_RCC_SYSCFG_CLK_ENABLE();
174
175
+}
176
177
#ifdef__cplusplus
178
179
libraries/SrcWrapper/src/stm32/hw_config.c
@@ -26,6 +26,8 @@ extern "C" {
26
27
voidhw_config_init(void)
28
{
29
+configIPClock();
30
31
/* Init DWT if present */
32
#ifdefDWT_BASE
33
dwt_init();
@@ -34,17 +36,8 @@ void hw_config_init(void)
34
36
/* Initialize the HAL */
35
HAL_Init();
-#ifdefHSEM_BASE
-__HAL_RCC_HSEM_CLK_ENABLE();
-#endif
-
configHSECapacitorTuning();
-#if defined(__HAL_RCC_PWR_CLK_ENABLE)
44
-/* Enable PWR clock, needed for example: voltage scaling, low power ... */
45
-__HAL_RCC_PWR_CLK_ENABLE();
46
47
48
/* Configure the system clock */
49
SystemClock_Config();
50
libraries/SrcWrapper/src/stm32/pinmap.c
@@ -74,7 +74,6 @@ void pin_function(PinName pin, int function)
74
75
/* Handle pin remap if any */
76
#if defined(LL_SYSCFG_PIN_RMP_PA11)&& defined(LL_SYSCFG_PIN_RMP_PA12)|| defined(SYSCFG_CFGR1_PA11_PA12_RMP)
77
78
switch (pin&PNAME_MASK) {
79
#if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
80
/* Disable PIN pair PA11/12 mapped instead of PA9/10 */
libraries/SrcWrapper/src/stm32/uart.c
@@ -272,12 +272,6 @@ void uart_init(serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t par
272
273
274
275
-#if defined(STM32F091xC)|| defined (STM32F098xx)
276
-/* Enable SYSCFG Clock */
277
-/* Required to get SYSCFG interrupt status register */
278
279
280
281
/* Configure UART GPIO pins */
282
pinmap_pinout(obj->pin_tx,PinMap_UART_TX);
283
if (uart_rx!=NP) {