2017-01-11 12:13 AM
Hello,
where can i change the MCU Clock to 16MHz?
In the Workbench its not possilbe.
Can i change the Value in the Control Stage Parameters.h file?
/* ext. clock frequency */
#define EXT_CLK_8_MHZto
#define EXT_CLK_16_MHZ
with friedly greetings
Eric
2017-01-24 11:52 PM
Hello, the Problem is solved.
The define (#define EXT_CLK_8_MHZ) doesnt change anything.
You have to change the HSE Value in stm32f30x.h
from
#define HSE_VALUE ((uint32_t)8000000)
to
#define HSE_VALUE ((uint32_t)16000000)
and the RCC_CFGR_PLLEXTPRE_PREDIV1 factor in system_stm32f30x.c
from
/* PLL configuration */
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLMULL9);to
/* PLL configuration */
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1_Div2 | RCC_CFGR_PLLMULL9);