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 issue in SDK14.1.0 for nRF52810

Hello,

I am trying to implement PWM using PWM library using Timer 3 and 4. However, I am not able to use these timers at all as compilation gives this error: # Error 1

../../../../../../components/drivers_nrf/timer/nrf_drv_timer.c:274:13: error: 'irq_handler' defined but not used [-Werror=unused-function] static void irq_handler(NRF_TIMER_Type * p_reg, ^~~~~~~~~~~ cc1.exe: all warnings being treated as errors make: *** [_build/nrf52810_xxaa/nrf_drv_timer.c.o] Error 1

While using Timer 3 with Timer 1 or Timer 2 gives following error: # Error 2

In file included from ../../../main.c:58:0: e:\nrf5\components\drivers_nrf\timer\nrf_drv_timer.h:89:34: error: 'NRF_TIMER3' undeclared here (not in a function) .p_reg = CONCAT_2(NRF_TIMER, id),
^ e:\nrf5\components\libraries\util\nordic_common.h:114:31: note: in definition of macro 'CONCAT_2_' #define CONCAT_2_(p1, p2) p1##p2 ^~ e:\nrf5\components\drivers_nrf\timer\nrf_drv_timer.h:89:25: note: in expansion of macro 'CONCAT_2' .p_reg = CONCAT_2(NRF_TIMER, id),
^~~~~~~~ e:\nrf5\components\libraries\pwm\app_pwm.h:85:50: note: in expansion of macro 'NRF_DRV_TIMER_INSTANCE' const nrf_drv_timer_t m_pwm_##name##timer = NRF_DRV_TIMER_INSTANCE(num);
^~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:782:1: note: in expansion of macro 'APP_PWM_INSTANCE' APP_PWM_INSTANCE(PWM2,3); // Create the instance "PWM2" using TIMER2. ^~~~~~~~~~~~~~~~ e:\nrf5\components\drivers_nrf\hal\nrf_timer.h:103:50: error: 'TIMER3_CC_NUM' undeclared here (not in a function) #define NRF_TIMER_CC_CHANNEL_COUNT(id) CONCAT_3(TIMER, id, CC_NUM) ^ e:\nrf5\components\libraries\util\nordic_common.h:133:31: note: in definition of macro 'CONCAT_3' #define CONCAT_3
(p1, p2, p3) p1##p2##p3 ^~ e:\nrf5\components\drivers_nrf\hal\nrf_timer.h:103:41: note: in expansion of macro 'CONCAT_3' #define NRF_TIMER_CC_CHANNEL_COUNT(id) CONCAT_3(TIMER, id, CC_NUM) ^~~~~~~~ e:\nrf5\components\drivers_nrf\timer\nrf_drv_timer.h:91:25: note: in expansion of macro 'NRF_TIMER_CC_CHANNEL_COUNT' .cc_channel_count = NRF_TIMER_CC_CHANNEL_COUNT(id),
^~~~~~~~~~~~~~~~~~~~~~~~~~ e:\nrf5\components\libraries\pwm\app_pwm.h:85:50: note: in expansion of macro 'NRF_DRV_TIMER_INSTANCE' const nrf_drv_timer_t m_pwm
##name##_timer = NRF_DRV_TIMER_INSTANCE(num);
^~~~~~~~~~~~~~~~~~~~~~ ../../../main.c:782:1: note: in expansion of macro 'APP_PWM_INSTANCE' APP_PWM_INSTANCE(PWM2,3); // Create the instance "PWM2" using TIMER2.

My PWM configurations are correct as the whole setup works perfectly fine with Timers 1 and 2 and with all other timers from SDK14.0. The issue seems specific to SDK14.1.0

Any suggestions???

Thanks

Related