Hello Smit, In regard to the desired accuracy, this seems very tight and I can assure you that we will not be able to meet it under normal uses. Even slight changes in temperature and or voltage can cause small changes in the frequency due to gate delays and transistor performance within not only the clocking circuit within the MCU but also within the logic of the PWM module. Also, this is dependent on the tolerance/stability of the crystal you are using which, in most cases, would use up a significant portion of the variation tolerance you are requesting. Finally, one should also consider jitter within the PLL and clock tree in general. For your initial attempt at generating a PWM, what was the resulting PWM output (as CB had asked)? Given this we may be able to assess if this is the best you can do or if there is room for optimization and improvement even if not enough to achieve the tolerance you are looking for.
↧