How to set the PWM signal frequency?

I tried the pwm_driver application example. How can I increase or change the generated signal frequency? I know that I can change it with the PERIOD value. But I have the need to increase it more than this. Currently it is about 90KHz. I want to increase it by the factor of 10 or 100 because I want to use it as a clock for another IC.



Please refer to section 11.6 in RSL10_hardware_reference.pdf available in RSL10 Documentation Package

Based on stated, you can change PWM frequency in following ways:

  • Increase SLOWCLK frequency. It can be done by CLK_DIV_CFG0_SLOWCLK_PRESCALE bit field in the CLK_DIV_CFG0 register. The default is 1MHz. Please refer to section in RSL10_hardware_reference.pdf available in RSL10 Documentation Package
  • Reduce the value of CLK_DIV_CFG1_PWM0CLK_PRESCALE bit for PWM0 in CLK_DIV_CFG1 register.
    The default value is 0x00.
  • There is another parameter in PWM0 period cycle for PWM0. The PWM_driver sample code uses 100. You can reduce this to increase PWM frequency. Below is an example.
    image image

Thank you for using our Community Forum.

Thanks for the hint.

In the meantime I decided to use the DIO CLKOUT feature to get my clock. This creates an app. 8MHz clock on the pin which is perfect to drive the gray-scale clock of the attached TLC5955 chip.

With PWM you can reach about 500KHz max. So, in case no real PWM is necessary, the CLKOUT mode of the DIO is the better and perfect solution.



Thank you for your suggestion and for using our Community Forum.