summaryrefslogtreecommitdiff
path: root/ports/stm32/modmachine.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/stm32/modmachine.c')
-rw-r--r--ports/stm32/modmachine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c
index 02a6f2a4b..6b7849bb9 100644
--- a/ports/stm32/modmachine.c
+++ b/ports/stm32/modmachine.c
@@ -377,7 +377,7 @@ STATIC mp_obj_t machine_freq(size_t n_args, const mp_obj_t *args) {
// even if we don't use the PLL for the system clock, we still need it for USB, RNG and SDIO
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
- RCC_OscInitStruct.HSEState = RCC_HSE_ON;
+ RCC_OscInitStruct.HSEState = MICROPY_HW_CLK_HSE_STATE;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = m;
@@ -500,7 +500,7 @@ STATIC mp_obj_t machine_sleep(void) {
// reconfigure the system clock after waking up
// enable HSE
- __HAL_RCC_HSE_CONFIG(RCC_HSE_ON);
+ __HAL_RCC_HSE_CONFIG(MICROPY_HW_CLK_HSE_STATE);
while (!__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY)) {
}