Frequency PWM calculation vs real
Hi,
I would like to understand why I don't have the right frequency on my PWM. I am working on STM32F103RG.
I would like to have a 8Khz PWM on Timer 3 channel 1, so I have configure my HSI to 8Mhz. APB2 Timer is set to 8Mhz. Prescaler to 10 and ARR to 100.
So theoretically, my frequency PWM is 8Mhz, but when I measure it, I have 7.22khz. Around 10% from 8Khz. And HSI can have around 2% tolerance so this not the problem...
Some one have this problem ? Why I can't be able to have 8Khz ?
