|
@ -180,6 +180,50 @@ const clock_scale_t hse_16mhz_3v3[CLOCK_3V3_END] = { |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const clock_scale_t hse_25mhz_3v3[CLOCK_3V3_END] = { |
|
|
|
|
|
{ /* 48MHz */ |
|
|
|
|
|
.pllm = 25, |
|
|
|
|
|
.plln = 96, |
|
|
|
|
|
.pllp = 2, |
|
|
|
|
|
.pllq = 2, |
|
|
|
|
|
.hpre = RCC_CFGR_HPRE_DIV_NONE, |
|
|
|
|
|
.ppre1 = RCC_CFGR_PPRE_DIV_4, |
|
|
|
|
|
.ppre2 = RCC_CFGR_PPRE_DIV_2, |
|
|
|
|
|
.power_save = 1, |
|
|
|
|
|
.flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | |
|
|
|
|
|
FLASH_ACR_LATENCY_3WS, |
|
|
|
|
|
.apb1_frequency = 12000000, |
|
|
|
|
|
.apb2_frequency = 24000000, |
|
|
|
|
|
}, |
|
|
|
|
|
{ /* 120MHz */ |
|
|
|
|
|
.pllm = 25, |
|
|
|
|
|
.plln = 240, |
|
|
|
|
|
.pllp = 2, |
|
|
|
|
|
.pllq = 5, |
|
|
|
|
|
.hpre = RCC_CFGR_HPRE_DIV_NONE, |
|
|
|
|
|
.ppre1 = RCC_CFGR_PPRE_DIV_4, |
|
|
|
|
|
.ppre2 = RCC_CFGR_PPRE_DIV_2, |
|
|
|
|
|
.power_save = 1, |
|
|
|
|
|
.flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | |
|
|
|
|
|
FLASH_ACR_LATENCY_3WS, |
|
|
|
|
|
.apb1_frequency = 30000000, |
|
|
|
|
|
.apb2_frequency = 60000000, |
|
|
|
|
|
}, |
|
|
|
|
|
{ /* 168MHz */ |
|
|
|
|
|
.pllm = 25, |
|
|
|
|
|
.plln = 336, |
|
|
|
|
|
.pllp = 2, |
|
|
|
|
|
.pllq = 7, |
|
|
|
|
|
.hpre = RCC_CFGR_HPRE_DIV_NONE, |
|
|
|
|
|
.ppre1 = RCC_CFGR_PPRE_DIV_4, |
|
|
|
|
|
.ppre2 = RCC_CFGR_PPRE_DIV_2, |
|
|
|
|
|
.flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | |
|
|
|
|
|
FLASH_ACR_LATENCY_5WS, |
|
|
|
|
|
.apb1_frequency = 42000000, |
|
|
|
|
|
.apb2_frequency = 84000000, |
|
|
|
|
|
}, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
void rcc_osc_ready_int_clear(enum rcc_osc osc) |
|
|
void rcc_osc_ready_int_clear(enum rcc_osc osc) |
|
|
{ |
|
|
{ |
|
|
switch (osc) { |
|
|
switch (osc) { |
|
|