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

NRF52 reconfiguration of RTC2

Hi ,

I have used Calendar example running on RTC2 for my timing feature .

Below are the initializations for starting RTC2 for my clock . 

#define CAL_RTC NRF_RTC2
#define CAL_RTC_IRQn RTC2_IRQn
#define CAL_RTC_IRQHandler RTC2_IRQHandler
#define CAL_RTC_IRQ_Priority 4


CAL_RTC->PRESCALER = 0xFFF;
CAL_RTC->EVTENSET = RTC_EVTENSET_COMPARE0_Msk;
CAL_RTC->INTENSET = RTC_INTENSET_COMPARE0_Msk;
CAL_RTC->CC[0] = m_rtc_increment * 8;
CAL_RTC->TASKS_START = 1;
NVIC_SetPriority(CAL_RTC_IRQn, CAL_RTC_IRQ_Priority);
NVIC_EnableIRQ(CAL_RTC_IRQn);

how do I stop my RTC2 , reconfigure with same setting and start again during runtime ??

I need this feature for the purpose of  updating  timing parameters during runtime  .

Parents Reply Children
No Data
Related