This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Higher frequency response from app_pwm_library

I implemented the app_pwm_library, but it seems to "top out" at 500Khz?  Here is a summary of my code.  Is there a set of routines that have a higher speed?

APP_PWM_INSTANCE(PWM1,1);            // Create the instance "PWM1" using TIMER1.

...

ret_code_t err_code;

/* 1-channel PWM, 2 us (500khz)*/
app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(2, PWM_PIN);
/* Initialize and enable PWM. */
err_code = app_pwm_init(&PWM1, &pwm1_cfg, 0);
APP_ERROR_CHECK(err_code);
...

app_pwm_enable(&PWM1);

...

while (app_pwm_channel_duty_set(&PWM1, 0, value) == NRF_ERROR_BUSY);

Thanks for any help!

Parents Reply Children
Related