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

'NRFX_PWM0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_PWM_INSTANCE'?

I am integrating PWM into my project which uses SDK_15.2.0.

My config.sh contains:

#define NRFX_PWM_ENABLED 1

#define NRFX_PWM0_ENABLED 1

and I have included nrfx_pwm.c.

Compiling the project I get this error:

'NRFX_PWM0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_PWM_INSTANCE'?

Trying to sort this problem out, I realized that the nrfx_pwm.c is completely grayed out. It starts with:

#if NRFX_CHECK(NRFX_PWM_ENABLED)
....

 Hence, apparently NRFX_PWM_ENABLED is not defined.

How do I fix this?

Parents Reply
  • Hi Simonr

    I've been facing same problem in the ble_app_blinky_pca_s132 example when trying to use PWM in it and no matter what's enabled or not, still having same error. I've already enabled all of the sdk_config.h configs needed, also included all of the header files.

    Do you think it could be a problem related to SDK17.0.2 and SES or maybe I'm missing something.

    Thank you.

Children
No Data
Related