Hi,all.i want to use pwm in my code.And i init pwm with APP_PWM_INSTANCE(PWM1,1),then i get an error:identifier "TIMER1_INSTANCE_INDEX" is undefined.Can someone help me ?
Hi,all.i want to use pwm in my code.And i init pwm with APP_PWM_INSTANCE(PWM1,1),then i get an error:identifier "TIMER1_INSTANCE_INDEX" is undefined.Can someone help me ?
i found it,in nrf_drv_config.h,enabled option.
Every application is supposed to have it's own copy of nrf_drv_config.h. Then in this config file you need to enable peripheral that you want to use. In that case it's TIMER1 since PWM is configured to use that instance. Find TIMER1_ENABLED define and set it to 1.
Every application is supposed to have it's own copy of nrf_drv_config.h. Then in this config file you need to enable peripheral that you want to use. In that case it's TIMER1 since PWM is configured to use that instance. Find TIMER1_ENABLED define and set it to 1.