<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110312/wrong-rtc-period-unless-breakpoint-hits-during-setup</link><description>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&amp;#39;t have a LF crystal oscillator</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 May 2024 12:13:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110312/wrong-rtc-period-unless-breakpoint-hits-during-setup" /><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/482016?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 12:13:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60aef41b-9d82-443e-b59b-a02249c84dad</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Gabriel&lt;/p&gt;
&lt;p&gt;Do you happen to have RTT logging enabled?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If yes, could you try to disable it (or switch to UART logging) and see if the problem persists?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As soon as you have been able to reproduce it on a DK please let me know, and I will try to reproduce it here. I can make the case private in case you don&amp;#39;t want to share your firmware in a public case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/481952?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 09:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74429b43-d6a2-4923-939a-d04d079476bc</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;Hi Torbjorn,&lt;/p&gt;
&lt;p&gt;Thanks for your help, I am currently still working on this issue and so far I&amp;nbsp;made&amp;nbsp;this observations&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1 - If I debug, I get the right period&lt;/p&gt;
&lt;p&gt;2 - I tried to use RTC, Timers and FreeRTOS software timers and I always get the same wrong period when not debugging&lt;/p&gt;
&lt;p&gt;3 - I also tried changing GCC optimization flags with no luck&lt;/p&gt;
&lt;p&gt;I am working on creating a DK version of our firmware so you guys can reproduce this issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/481539?ContentTypeID=1</link><pubDate>Thu, 02 May 2024 12:02:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1899c8b-bb6f-4d1b-8ff9-cbc2d5c76a31</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Gabriel&lt;/p&gt;
&lt;p&gt;Jared is on vacation, and I will help you out with this in the mean time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess you are using FreeRTOS?&amp;nbsp;&lt;br /&gt;I don&amp;#39;t have a lot of experience with FreeRTOS, but could it be that the FreeRTOS init is altering your clock or RTC settings?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to register a repeated callback&amp;nbsp; using FreeRTOS instead, to see if the interval is correct in this case?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/481113?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 13:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:943ce642-f6b4-419d-9cb5-52dcfbf030a6</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;I tried with RTC0 and RTC2 and still got the wrong period when not debugging&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/481110?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 13:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7cb49b4-5abd-4b78-b3e2-eca101a07f0e</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;To add more information, I get the wrong period when I don&amp;#39;t debug but I get the right period if I am in debug session&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/479682?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 11:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1e5bbba-39a5-46cd-91c2-8e316841103b</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you try to change RTC source to RTC2 and see if you see the same issue?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/479644?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 09:03:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7200e44a-aa51-4135-9163-ef9e443160ee</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;I added the project files to the original post, I tested with another value and where I was supposed to get&amp;nbsp;0x6aa/32768 = 52ms I actually get 128ms&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Wrong RTC period unless breakpoint hits during setup</title><link>https://devzone.nordicsemi.com/thread/479409?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 11:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f3b1e04-9ed6-4632-8d9f-abc9943b5c82</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That sounds strange,&lt;/p&gt;
&lt;p&gt;Can you share a minimal project so I could try to reproduce it?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>