STM32G474 Nucleo. Overclock example for HRTIM problem
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?
