hi @semiconductor_user
As you said, the EMIOS module setting in ConfigTools are named as Clock_Divider Value, Master_Bus Prescaler, and Master BusAlternate Prescaler. How to know their relationship and their usage according to the formula provided in the thread shared above?
PWM frequency = CORE_CLK / Clock Divider Value / Master Bus Prescaler / period [ticks]
With this information, if we want a PWM of 1KHz and the clock frequency of our eMIOS is 48Mhz and we define the Clock Divider Value and the Master Bus Prescaler equal to 1, with this we would only need one parameter to obtain our 1KHz signal, which is the period [tick] which we can obtain by solving the formula given above:
period [tick] = CORE_CLK/1KHz, giving 48,000.
To set the Duty cycle [tick] of this signal, we assume a duty cycle of 100% is equal to the period [tick](48000 ticks), so a duty cycle of 40% will be equal to a (period [tick]*40)/100 = 19,200 ticks approx.
Additionally, with a 16-bit timer the maximum number of tick (ticksmax) is (2^16 − 1) = 65,535 ticks. If we configure the eMIOS with a fClock of 48MHz (fClock = CORE_CLK / Clock Divider Value / Master Bus Prescaler) we have a tick every 1/(fClock ) = 1/48MHz = 0.02083μs approx (it depends on your configurations).