Wrong RTC period unless breakpoint hits during setup

fw1.zip

Hi,

I ran into a problem with nRF52840 based firmware development

I initialize the RTC with

Prescaler = 0

CC[0] = 0x19fd

I tried clock source synthesized from HFCLK and RC oscillator and got the same result (we don't have a LF crystal oscillator)

It should produce a period of 0x19fd/32768 = 203ms but I observe by toggling a pin in the IRQ Handler that the actual period is 112ms

If I breakpoint in my code after initializing the RTC and then let go, I get the right period 203ms

I am currently working on replacing the RTC with Timer for debug

Do you have any errata or known issue regarding RTC setup ?

How can I solve this issue ? I can provide the project if needed

Thanks,

Gabriel

Related