I am trying to generate pwm output with 1 Khz and variable duty cycle using Emios for fan control.
When I try to configure pwm module it is showing pwm period in ticks. How many ticks should I use for generating 1Khz pwm? Clock for Emios is used as 120Mhz
Assuming no division of the clock is done
eMIOS CLOCK->120Mhz
1S -> 120Mhz(120 000 000 ticks)
1Khz = (1/1000)S ->120000000 * (1 / 1000) = 120000 ticks
but the max tick is 65534
I did the same calculation but since tick count in exceeding max value so not able to use this 120000 value. Also, if I try to deselect tick and try to enter value in seconds, it is giving me error " The channels use counter bus that only support in ticks unit."
You already know how to calculate.
In this case, you need to divide the emios clock source so that the tick value does not exceed 65534.