<?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>time counter</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27415/time-counter</link><description>Hi everybody !!
i m working in a project with NRF52 SDK 11, i need a help, i want to create a funtion that working with RTC to count a tick and to convert it into time then reset the count without interruption but i don&amp;#39;t find the right structure to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Nov 2017 15:29:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27415/time-counter" /><item><title>RE: time counter</title><link>https://devzone.nordicsemi.com/thread/108282?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 15:29:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2db2f73-0cf2-4ac5-ae40-598118589406</guid><dc:creator>omar </dc:creator><description>&lt;p&gt;thank you, this is helpful&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: time counter</title><link>https://devzone.nordicsemi.com/thread/108281?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 15:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a073bc2d-3876-46c6-b38f-020d1481968e</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Once I posted my answer, I realized that you might be looking for something like this instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_RTCx-&amp;gt;TASK_START;  
tick = NRF_RTCx-&amp;gt; COUNTER;  
NRF_RTCx-&amp;gt;TASK_CLEAR;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Take look at &lt;a href="https://devzone.nordicsemi.com/question/51827/hw-control-for-rtc/"&gt;this post&lt;/a&gt;, that might be useful.&lt;br /&gt;
Also, you can take a look at my answer in &lt;a href="https://devzone.nordicsemi.com/question/174690/how-to-covert-app_timer-ticks-to-ms/?answer=174885#post-id-174885"&gt;this post&lt;/a&gt; about converting ticks to time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: time counter</title><link>https://devzone.nordicsemi.com/thread/108280?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 15:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba9e8d74-5747-473a-a868-aad99b1a0843</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi Omar!&lt;/p&gt;
&lt;p&gt;Did you take a look at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/rtc_example.html?cp=4_0_8_4_5_23"&gt;RTC example&lt;/a&gt; in our SDK?&lt;br /&gt;
The Real Time Counter Example enables the real-time clock with a TICK frequency of 8 Hz.
The TICK interrupt handler clears the interrupt request and toggles LED 1. The COMPARE0 handler
clears the interrupt request and sets LED 2 to 1.&lt;/p&gt;
&lt;p&gt;If you take a look at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/group__nrf__rtc.html?cp=4_0_8_6_7_16"&gt;RTC driver&lt;/a&gt; in the infocenter you should find all the information you need.&lt;br /&gt;
The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/group__nrf__drv__rtc.html#ga11514b9c3003367ab718677d42112dc5"&gt;nrf_drv_rtc_counter_get()&lt;/a&gt; function can be used to retrieve the current counter value.&lt;br /&gt;
You can use the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/group__nrf__drv__rtc.html#gaa53566eb68add4f278833f6a620bde41"&gt;nrf_drv_rtc_counter_clear()&lt;/a&gt; function to clear the counter value.&lt;/p&gt;
&lt;p&gt;Let me know if you still have any questions.&lt;br /&gt;
Best regards,&lt;br /&gt;
Joakim.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>