AnsweredAssumed Answered

PWM configuration structure

Question asked by Mike on Apr 3, 2015
Latest reply on May 18, 2015 by Erwan Y
I am using SPC560D40L3 with SPC5Studio. I am trying to generate a PWM signal. Using Application configuration, I configured the HAL drivers to generate a PWM of 5Hz. Here, I configured the clock frequency and period for the PWM using application configuration which gets stored to structure 'PWMConfig pwm_config'.

Now I want to use a runtime value for PWM frequency i.e. my device will get input for PWM frequency (say via UART) and will use the same for 'PWMConfig pwm_config'. How to pass the clock frequency and period values (derived from PWM frequency) to this structure? Is there any other way to implement this?

Thanks in advance.