Skip to content

Commit 8c8f26f

Browse files
committed
In some STM32H7 BSP variants, initialized RCC_PeriphCLKInitStruct instances as empty
1 parent 787afbb commit 8c8f26f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hw/bsp/stm32h7/boards/stm32h723nucleo/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static inline void board_stm32h7_clock_init(void)
111111
separate. However, the main system PLL (PLL1) doesn't have a direct
112112
connection to the USB peripheral clock to generate 48 MHz, so we do this
113113
dance. This will connect PLL1's Q output to the USB peripheral clock. */
114-
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct;
114+
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = { 0 };
115115

116116
RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB;
117117
RCC_PeriphCLKInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLL;

hw/bsp/stm32h7/boards/stm32h743nucleo/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static inline void board_stm32h7_clock_init(void)
102102
separate. However, the main system PLL (PLL1) doesn't have a direct
103103
connection to the USB peripheral clock to generate 48 MHz, so we do this
104104
dance. This will connect PLL1's Q output to the USB peripheral clock. */
105-
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct;
105+
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = { 0 };
106106

107107
RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB;
108108
RCC_PeriphCLKInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLL;

0 commit comments

Comments
 (0)