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

PWM

Hi,

i am working on nrf52dk. i want to include "pwm" example in "ble_app_uart" example . i have included all the header files. and functions in "ble_app_uart" example.

the error shown is  " 'NRFX_TIMER2_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER_INSTANCE'? "

Parents
  • Hi,

    Have you enabled the PWM instance in the SDK config file and included the paths to the pwm source files in the project settings?

    regards

    Jared 

  •  i have added 

    "

    #include "app_error.h"
    #include "bsp.h"
    #include "nrf_delay.h"
    #include "app_pwm.h"

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

    static volatile bool ready_flag; // A flag indicating PWM status.

    void pwm_ready_callback(uint32_t pwm_id) // PWM callback function
    {
    ready_flag = true;
    }

    "

    and in sdkconfig.h configured pwm as 

    #ifndef APP_PWM_ENABLED
    #define APP_PWM_ENABLED 1
    #endif

    i have not included  any paths to pwm source files in project settings.

    can you tell me which path i have to include to run pwm in "ble_app_uart"

Reply
  •  i have added 

    "

    #include "app_error.h"
    #include "bsp.h"
    #include "nrf_delay.h"
    #include "app_pwm.h"

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

    static volatile bool ready_flag; // A flag indicating PWM status.

    void pwm_ready_callback(uint32_t pwm_id) // PWM callback function
    {
    ready_flag = true;
    }

    "

    and in sdkconfig.h configured pwm as 

    #ifndef APP_PWM_ENABLED
    #define APP_PWM_ENABLED 1
    #endif

    i have not included  any paths to pwm source files in project settings.

    can you tell me which path i have to include to run pwm in "ble_app_uart"

Children
Related