Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
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

PWM setup on the NRF52DK

Hello all,

Four leds are connected to the GPIO (22-25) and gpio are defined and with a simple method within the while loop I can see them working

    nrf_gpio_pin_write(GPIO_PIN_22, 1);
    nrf_gpio_pin_write(GPIO_PIN_23, 1);
    nrf_gpio_pin_write(GPIO_PIN_24, 1);
    nrf_gpio_pin_write(GPIO_PIN_25, 1);

Next is to use the PWM and I am looking at the pwm_driver example that comes with the 17.1.0 SDK examples and in the SDK config.h the PWM setup can be seen and modified, however, when looking into my application, I cannot see the setup configuring in the SDK config.h , with regard to the PWM only the following can be seen :"  // <e> PWM_CONFIG_LOG_ENABLED - Enables logging in the module."

Indeed, I am missing the "nrfx_pwm.c" in the "nRF_Drivers" folder, however, will the "SDK setup" adopt its config, if that file is added?

Anyway, I am not sure where to find the right driver file? Looked at the "legacy" but somehow it is not there, indeed, I am would like to use the onboard PWM hardware, if possible...

Any ideas how to get the files in order and start using the PWM driver?

Any help is much appreciated.

Best.

Parents
  • Hi MuRa,

    I have worked on the nrf52 chip, Where the PWM signals can be routed to all the GPIO pins I believe. 

    For adding the PWM support to our project, we have to add those required configurations into our project's  sdk_config.h file as well as to add corresponding files to the project.

    [

    From the project explorer, right-click and select the add existing files, navigate and select the pwm driver, so that we can use the PWM SDK functions into our project.

    nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src/nrfx_pwm.c

Reply
  • Hi MuRa,

    I have worked on the nrf52 chip, Where the PWM signals can be routed to all the GPIO pins I believe. 

    For adding the PWM support to our project, we have to add those required configurations into our project's  sdk_config.h file as well as to add corresponding files to the project.

    [

    From the project explorer, right-click and select the add existing files, navigate and select the pwm driver, so that we can use the PWM SDK functions into our project.

    nRF5_SDK_17.0.2_d674dde/modules/nrfx/drivers/src/nrfx_pwm.c

Children
No Data
Related