How to set PWM generator to 7.5HZ on the 20706-A2 API of WICED Studio 6.2.1

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
iats_3604431
Level 1
Level 1

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
1 Solution
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

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
2 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

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.

0 Likes

Hi MuralR_36,

          Thanks for your reply.

0 Likes