2020-02-23 06:37 AM
I compiled example from st cube. I found in clock configuration this parameters:
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV6;
RCC_OscInitStruct.PLL.PLLN = 85;
This give to sysclk 177Mhz and it exceeds max frequency... when I set parameters to:
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV5;
RCC_OscInitStruct.PLL.PLLN = 68;
cubemx and calculation inside example show me 170Mhz, but then Hrtim stop generate 100kHz signal (its around 96kHz and it's unstable...). Period is calculated as:
/* Formula below works for PWM frequency > 83kHz (with prescaler ratio = 1) */
#define TIMA_PERIOD ((uint16_t)(((uint64_t)HRTIM_INPUT_CLOCK * 32) / TIMA_PWM_FREQ))
where
TIMA_PWM_FREQ = 100000
HRTIM_INPUT_CLOCK = 170000000
Another thing to errata?
Solved! Go to Solution.
2020-02-23 10:59 AM
My mistake... I put wrong define for oscillator... BTW, HSE define should be correct for board example, on stm32g474 NUCLEO it have define 8Mhz, when it is 24Mhz.
2020-02-23 10:59 AM
My mistake... I put wrong define for oscillator... BTW, HSE define should be correct for board example, on stm32g474 NUCLEO it have define 8Mhz, when it is 24Mhz.
2020-03-24 09:36 AM
Hi @MSzaj.1 ,
Thanks for bringing this error to our attention.
This is reported internally to be fixed in coming STM32CubeG4 packages.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.