Skip to content

Commit 5ac665e

Browse files
committed
feat(c5): configure 48MHz clock source
required for Nucleo-C562RE USB. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 2420b31 commit 5ac665e

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/variant_NUCLEO_C562RE.cpp‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,14 @@ void SystemClock_Config(void)
139139
if (HAL_UpdateCoreClock() != HAL_OK) {
140140
Error_Handler();
141141
}
142-
143-
/* Peripherals using PCLK3 (36 MHz):
144-
LPUART1
145-
*/
146-
147142
/* Peripherals using HSIDIV3 (48 MHz):
148143
USB
149144
*/
150145
if (HAL_RCC_HSIDIV3_Enable() != HAL_OK) {
151146
Error_Handler();
152147
}
153148

149+
HAL_RCC_CK48_SetKernelClkSource(HAL_RCC_CK48_CLK_SRC_HSIDIV3);
154150
}
155151

156152
#ifdef __cplusplus

0 commit comments

Comments
 (0)