Skip to main content
Aranj.1
Visitor II
June 7, 2021
Solved

PWM period in spc560b54

  • June 7, 2021
  • 1 reply
  • 813 views

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?

    This topic has been closed for replies.
    Best answer by zambrano.luigi

    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

    1 reply

    zambrano.luigi
    zambrano.luigiBest answer
    ST Employee
    June 7, 2021

    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