nRF52832 :- I am not getting interrupt for Timer NRF_TIMER_CC_CHANNEL4

Hello,

I am working with nRF5 SDK v17.1.0 and using nRF52832DK board. I want to use the hardware timer in continuous mode and also want to use all 6 compare channels of the timer. But I am only able to get interrupts for 0 to 3 compare channels i.e for only 4 compare channels. My code is below

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void timer_init()
{
uint32_t time_ms = 50, time = 0;
nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
err_code = nrf_drv_timer_init(&TIMER_TEST, &timer_cfg, timer_event_handler);
APP_ERROR_CHECK(err_code);
time = nrf_drv_timer_us_to_ticks(&TIMER_TEST, time_ms);
nrf_drv_timer_extended_compare(
&TIMER_TEST, NRF_TIMER_CC_CHANNEL0, time, 0, true);
time = nrf_drv_timer_us_to_ticks(&TIMER_TEST, time_ms + 15);
nrf_drv_timer_extended_compare(
&TIMER_TEST, NRF_TIMER_CC_CHANNEL1, time, 0, true);
time_ms += 50;
time = nrf_drv_timer_us_to_ticks(&TIMER_TEST,time_ms );
nrf_drv_timer_extended_compare(
&TIMER_TEST, NRF_TIMER_CC_CHANNEL2, time, 0, true);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The above code is working fine. But when I just add NRF_TIMER_EVENT_COMPARE4 in init and in IRQ, I have the below observations:

1. Not getting interrupt for NRF_TIMER_EVENT_COMPARE4

2. for CC0, CC1, CC2, and CC3 I get interrupted only once (not getting continuous)

Please help to enable CC4 & CC5 and let me know what corrections need to be done in the code so that my timer will work in continuous mode for all 6 compared channels.

Best Regards,

Sanket Chadawar