cancel
Showing results for 
Search instead for 
Did you mean: 

PWM period in spc560b54

Aranj.1
Associate

Hi,

How can i adjust PWM period in SPC560b54 using spc5 studio wizard?

system clock=32MHZ

peripheral clock=16MHZ

eMIOS0 Global prescaler=20

eMIOS0 pwm counter Bus=counter_bus_A

in eMIOS0 CH23 counter BUS settings:

prescaler=1

period=?

For period 400KHZ, How can i select period in eMIOS0 CH23 counter BUS settings?

1 ACCEPTED SOLUTION

Accepted Solutions
zambrano.luigi
Senior III

Hi,

the eMIOS modules are clocked by the periph_set3_clk. The clock in input to each eMIOS channels is periph_set3_clk/GPRE where the GPRE is the global prescaler. Each channel has an internal prescaler. So, the counter of each prescaler is clocked by (periph_set3_clk/GPRE)/(inernal prescaler). If you select in the eMIOS graphic interface a period = N, this means that eMIOS frequency will be ((periph_set3_clk/GPRE)/(inernal prescaler))/N.

Regards,

Luigi

View solution in original post

1 REPLY 1
zambrano.luigi
Senior III

Hi,

the eMIOS modules are clocked by the periph_set3_clk. The clock in input to each eMIOS channels is periph_set3_clk/GPRE where the GPRE is the global prescaler. Each channel has an internal prescaler. So, the counter of each prescaler is clocked by (periph_set3_clk/GPRE)/(inernal prescaler). If you select in the eMIOS graphic interface a period = N, this means that eMIOS frequency will be ((periph_set3_clk/GPRE)/(inernal prescaler))/N.

Regards,

Luigi