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

no NRF_DRV_RTC_INT_COMPARE3 event when enable all 4 etc CC

Hi,

On PCA10040 SDK15.2,base on rtc example.

I got no   NRF_DRV_RTC_INT_COMPARE3 event when enable all 4 etc CC:

    err_code = nrf_drv_rtc_cc_set(&rtc,RTC_CH_CC0 ,250 ,true); 
    APP_ERROR_CHECK(err_code);
    err_code = nrf_drv_rtc_cc_set(&rtc,RTC_CH_CC1 ,500 ,true); 
    APP_ERROR_CHECK(err_code);
    err_code = nrf_drv_rtc_cc_set(&rtc,RTC_CH_CC2 ,750 ,true); 
    APP_ERROR_CHECK(err_code);
    err_code = nrf_drv_rtc_cc_set(&rtc,RTC_CH_CC3 ,1000 ,true); 
    APP_ERROR_CHECK(err_code);


    nrf_drv_rtc_int_enable(&rtc, NRF_RTC_INT_COMPARE0_MASK);
    nrf_drv_rtc_int_enable(&rtc, NRF_RTC_INT_COMPARE1_MASK);
    nrf_drv_rtc_int_enable(&rtc, NRF_RTC_INT_COMPARE2_MASK);
    nrf_drv_rtc_int_enable(&rtc, NRF_RTC_INT_COMPARE3_MASK);

static void rtc_handler(nrf_drv_rtc_int_type_t int_type)
{
    if (int_type == NRF_DRV_RTC_INT_COMPARE0)
    {
        nrf_gpio_pin_set(3);
    }
    else if (int_type == NRF_DRV_RTC_INT_COMPARE1)
    {
        nrf_gpio_pin_clear(3);
    }
    else if (int_type == NRF_DRV_RTC_INT_COMPARE2)
    {
        nrf_gpio_pin_set(3);
    }
    else if (int_type == NRF_DRV_RTC_INT_COMPARE3)
    {
        nrf_gpio_pin_clear(3);
        rtc_cc3_flag=1;
    }
}

Related