cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

New Contributor

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?

0 Likes
Reply
1 Solution
Moderator
Moderator

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.

View solution in original post

0 Likes
Reply
2 Replies
Moderator
Moderator

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.

View solution in original post

0 Likes
Reply
New Contributor

Hi MuralR_36,

          Thanks for your reply.

0 Likes
Reply