This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I put float value in the period when I create pwm?

Hello

I am using app_pwm control. When creating PWM, I am using the code as below, can I put float value in period?

app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(period_us, 27);
// ex)app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(5.5, 27);

I think I can only enter  INT value at the period, but I want to control the frequency more closely. Is there a way to do this?

Thank you.

Related