PWM

Top  Previous  Next
Got to SUB-20 page

PWM outputs are available on GPIO24..GPIO31 pins (see GPIO Header). Outputs are referenced as PWM_0 .. PWM_7.

PWM generation module shown below has configurable source clock, counter limit and separate comparator for each PWM output.

 

PWM

 

PWM module resolution and limit are configured with sub_pwm_config. Duty cycle of each PWM output can be set with sub_pwm_set.

PWM module output signal controls output driver of the corresponding GPIO (see GPIO Functions). To get high/low transition of the GPIO pin it should be configured to output state with sub_gpio_config. Otherwise PWM module will enable/disable internal pull-up.

Functions

sub_fpwm_config

sub_pwm_set