<?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>how to use rtc    in nrf52840 dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61294/how-to-use-rtc-in-nrf52840-dongle</link><description>Timer A with a 10-minute interval, timer B with a 4-hour interval, and timer C with a 10-second interval are required, and A and B should also run out of time in low power mode. Timer C only needs to flow for 10 seconds and remains (while generating a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 May 2020 11:00:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61294/how-to-use-rtc-in-nrf52840-dongle" /><item><title>RE: how to use rtc    in nrf52840 dongle</title><link>https://devzone.nordicsemi.com/thread/249676?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 11:00:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e98e60a-4cd0-4c32-9cbb-dc51109a1972</guid><dc:creator>calivan</dc:creator><description>&lt;p&gt;thank you&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you know any example I can refer to? I use nrf52840 dongle.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in your code,&amp;nbsp; &amp;#39;counter&amp;#39; isn&amp;#39;t reset?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use rtc    in nrf52840 dongle</title><link>https://devzone.nordicsemi.com/thread/249649?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 10:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca8ee0cd-d6ce-4957-b349-70b25086fd49</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Typically the timeout needs to be set such that the RTC doesn&amp;#39;t overflow, and depending on the prescaler value that may happen after 512 seconds. In your case I would have setup a timeout value of 60seconds and use a counter that increments, something like:&lt;/p&gt;
&lt;p&gt;static uint32_t counter;&lt;br /&gt;&lt;br /&gt;1minute_timeout_handler()&lt;br /&gt;{&lt;br /&gt;counter++;&lt;br /&gt;if(counter%10 == 0)&lt;br /&gt;&amp;nbsp; 10minute_timeout_handler();&lt;br /&gt;if(counter%240 == 0)&lt;br /&gt;&amp;nbsp; 4hours_timeout_handler();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use rtc    in nrf52840 dongle</title><link>https://devzone.nordicsemi.com/thread/249595?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 06:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6838f15-36fc-498c-853c-5d5773b9d591</guid><dc:creator>calivan</dc:creator><description>&lt;p&gt;&lt;span&gt;If I use timer A as RTC1 and after A becomes 0 and APP-TIMER C is set to 10 seconds and counted, should I reset A when C is 0?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Is it correct that APP-TIMER uses RTC1?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Then can I use both timer A and B as RTC1?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use rtc    in nrf52840 dongle</title><link>https://devzone.nordicsemi.com/thread/249387?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 09:14:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47cc9f1b-d1ae-4148-80be-48fd6fbb3898</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="89972" url="~/f/nordic-q-a/61294/how-to-use-rtc-in-nrf52840-dongle"]should I not use APP_TIMER in my case?[/quote]
&lt;p&gt;Why? APP_TIMER(2) seems to be a perfect fit for your case.&lt;/p&gt;
&lt;p&gt;Hint: You can stop timers in event handlers, e.g. one could stop timer C in the ble disconnect event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>