This is the errata:
Symptoms
RTC registers will not contain the correct/expected value if read.
Conditions
The RTC has been idle.
Consequences
RTC configuration cannot be determined by reading RTC registers.
Workaround
Execute the below code before you use RTC.
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
NRF_CLOCK->TASKS_LFCLKSTART = 1;
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {}
NRF_RTC0->TASKS_STOP = 0;
My questions:
- Idle for how long time? Idle after it has been used before or does it also have to be done after every mcu reset, i.e. before the first time the RTC is used after boot?
- Do I have to re-do this every time after I have stopped the LFCLK? Or after every time I have stopped the RTC when I want to start it again?
- Can an arbitrary amount of time pass between line 3 and 4?
- Can line 4 (TASKS_STOP) be reordered, i.e. be executed before the LFCLK is started instead, or while it is being started (e.g. if using LFXO as source, it is ok to run line 4 once LFCLKSTAT says running, e.g. before SRC has switched from RC to LFXO)?
- What "configuration" registers are affected? The only configuration register I see present on the RTC peripheral is the PRESCALER. Does this mean as long as I only write to this register and never read from it, I can ignore this errata?
- Is it a typo that 0 should be written to TASKS_STOP? According to the PS only 1 is a valid value to write to the TASKS_STOP register.
- Any code that can reproduce the issue? I cannot reproduce the issue no matter what I've tried so far.