I'm facing a problem i can't solve. It seem so simple but i think i need an other point of view.
For a project using a led driver (LED1642GW) i need a clock in 20MHz~30MHz.
I forgot this oscillator in my hardware so i want to generate it with my MCU (and it will be cheaper).
I made the most simple project for my stm32L476VGT:
- HSI (or MSI) speeded up to 80MHz through PLLCLK.
- TIM5 with PWM or CC on Channel 1
- PA0 on Alternate function (TIM5 ch5) with very high speed
Reference manual is saying that internal clock of the timer is APB (so 80MHz).
Despite of my differents trys, i don't managed to get an output signal at 20MHz.
With the example bellow i expected a signal at 80/80 = 1MHz but i only get 400kHz...
Here is some screens:
Did i miss something? Or does the GPIO not made for this purpose?