I am able to use the 2 channel mode of each PWM giving me a total of six PWM that I can set individual duty cycle PWM!
I now find I need 8 PWM with individual duty cycles! Can anyone point me in the direction has sample code for using them?
/** Config is for PWM2 using both PWM channels on pins 24 and 25 with a frequency of 1/(20000uS) = 50Hz */
app_pwm_config_t pwm_config1 = {
.pins = {24, 25},
.pin_polarity = {APP_PWM_POLARITY_ACTIVE_HIGH, APP_PWM_POLARITY_ACTIVE_LOW},
.num_of_channels = 2,
.period_us = 20000L
};
And this is were I write the values to the PWM!
while (app_pwm_channel_duty_set(&PWM1, 0, val1) == NRF_ERROR_BUSY);
while (app_pwm_channel_duty_set(&PWM1, 1,val2) == NRF_ERROR_BUSY);
Thanks!