This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is there an example code for using PWM on the nRF51822 with a SoftDevice?

I'm looking to add PWM functionality to my design to drive an LED. Examples exist for other devices, and those don't use the SoftDevice. Is there an example or some reference design for making the PWM module work with the nRF51822 and SD?

Parents
  • Hi i have a question .

    Do we still need to make main file when we are using this simple example which you have uploaded? and also can you please explain what is this done

    #if (PWM_NUM_CHANNELS == 1) void nrf_pwm_init(uint32_t io_select_pwm0, nrf_pwm_mode_t pwm_mode) { pwm_io_ch[0] = io_select_pwm0; nrf_gpio_cfg_output(io_select_pwm0); pwm_running[0] = 0;

    pwm_init_common();
    

    } what does io_select_pwm0 represents?

Reply
  • Hi i have a question .

    Do we still need to make main file when we are using this simple example which you have uploaded? and also can you please explain what is this done

    #if (PWM_NUM_CHANNELS == 1) void nrf_pwm_init(uint32_t io_select_pwm0, nrf_pwm_mode_t pwm_mode) { pwm_io_ch[0] = io_select_pwm0; nrf_gpio_cfg_output(io_select_pwm0); pwm_running[0] = 0;

    pwm_init_common();
    

    } what does io_select_pwm0 represents?

Children
No Data
Related