- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to set PWM generator to 7.5HZ.
i can set PWM generator to [integer] HZ, like 7HZ or 8HZ... by set PWM_INP_CLK_IN_HZ and PWM_FREQ_IN_HZ,
but the PWM_FREQ_IN_HZ can only set integer.
Does everybody know how to set PWM generator to 7.5HZ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The parameters PWM_INP_CLK_IN_HZ and PWM_FREQ_IN_HZ are passed into the wiced_hal_pwm_get_params() API. This API is defined to take only integer values as parameters. So even if you define PWM_INP_CLK_IN_HZ and PWM_FREQ_IN_HZ as floating point values, it would get type-casted to an integer value during compilation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The parameters PWM_INP_CLK_IN_HZ and PWM_FREQ_IN_HZ are passed into the wiced_hal_pwm_get_params() API. This API is defined to take only integer values as parameters. So even if you define PWM_INP_CLK_IN_HZ and PWM_FREQ_IN_HZ as floating point values, it would get type-casted to an integer value during compilation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MuralR_36,
Thanks for your reply.