Implement PWM dithering 1 bit
Hi
I am working on stm32f070. The STM32F0 system clock = 48MHz,
I need to set the PWM frequency on 23437Hz.
Therefore, PWM resolution = 48MHz / 23437Hz = 2048 (11bit)
How to use PWM dithering technique to reach 12-bit resolution on PWM frequency 23.4KHz?
Preliminary thoughts PWMResolution + PWMDither_Resolution = 23.4kHz(11-bit resolution) + 1bits dithering resolution could be implemented to reach 12-bit resolution.
I have referred the example code X-CUBE-PWM-DITHR https://www.st.com/en/embedded-software/x-cube-pwm-dithr.html#overview
and this question https://community.st.com/s/question/0D50X0000BvhhhASQQ/bug-in-xcubepwmdithr?t=1594794784965
seems did not talk adjust duty cycle detail.
My question:
1.I need to enable two PWM channel dithering on TIM3 and TIM15. Can PWM Dithering be used on two TIM3/TIM15 on STM32F0 at the same time?
2. How to adjust the duty cycle in PWM Dithering?
3.How can I add only one extra bit of resolution using the dithering technique?
Can someone help me? Thanks in advance.
