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

6 PWM, 6 SAADC, Timers allocation question

Hi, nRF52 Board, S132. Now, I want 6 pwm, 6 adc .

nRF52 has 5Timers, Timer0-Timer4. Now, I allocation these timers as follows:

//TIMER0 is used by softDevice

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

APP_PWM_INSTANCE(PWM2,2); // Create the instance "PWM2" using TIMER2.

APP_PWM_INSTANCE(PWM3,3); // Create the instance "PWM3" using TIMER3.

static const nrf_drv_timer_t m_timer = NRF_DRV_TIMER_INSTANCE(4); // TIMER4

It can not work. But, if I remove the timer4, it can work normally. Why ? I have enable it in nrf_drv_config.h. #define TIMER4_ENABLED 1

Thanks!

Related