From bd3e8429e90f4af496004a1a62da7b1bac21bd91 Mon Sep 17 00:00:00 2001 From: Miguel Gazquez Date: Mon, 20 Jan 2025 17:25:42 +0100 Subject: [PATCH] CH32V30x: Fix PLL_MULTIPLICATION definition for ch32v303 --- ch32v003fun/ch32v003fun.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch32v003fun/ch32v003fun.h b/ch32v003fun/ch32v003fun.h index c5706dd2..376f7026 100644 --- a/ch32v003fun/ch32v003fun.h +++ b/ch32v003fun/ch32v003fun.h @@ -6073,7 +6073,7 @@ typedef struct #define RCC_PLLMULL14 ((uint32_t)0x00300000) /* PLL input clock*14 */ #define RCC_PLLMULL15 ((uint32_t)0x00340000) /* PLL input clock*15 */ #define RCC_PLLMULL16 ((uint32_t)0x00380000) /* PLL input clock*16 */ -#if defined(CH32V20x) +#if defined(CH32V20x) || defined(CH32V30x_D8) #define RCC_PLLMULL18 ((uint32_t)0x003C0000) /* PLL input clock*18 */ #endif @@ -13972,7 +13972,7 @@ void DefaultIRQHandler( void ) __attribute__((section(".text.vector_handler"))) #define PLL_MULTIPLICATION RCC_PLLMULL15 #elif FUNCONF_PLL_MULTIPLIER == 16 #define PLL_MULTIPLICATION RCC_PLLMULL16 - #elif defined(CH32V20x) && FUNCONF_PLL_MULTIPLIER == 18 + #elif (defined(CH32V20x) || defined(CH32V30x_D8)) && FUNCONF_PLL_MULTIPLIER == 18 #define PLL_MULTIPLICATION RCC_PLLMULL18 #else #error "Invalid PLL multiplier"