<?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>Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25887/set-rtc-in-nrf52832</link><description>My application is built using the nRF52832 device.
The system must only be &amp;quot;active&amp;quot; between certain times (5am through to 9pm). 
 I am a newbie and have no idea how to set the RTC of the nRF52832.
I could either set the time in a text string OR set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Oct 2017 12:08:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25887/set-rtc-in-nrf52832" /><item><title>RE: Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/thread/101957?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2017 12:08:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e486fdc-79d2-406b-8f2d-95dfea686fe3</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Where did you find the function &lt;code&gt;date_time_set_timestamp()&lt;/code&gt; ?&lt;/p&gt;
&lt;p&gt;Did you test the  nrf-calendar example? In the nrf-calender example the current time is set with the function nrf_cal_set_time(),  &lt;code&gt;nrf_cal_set_time(year, month, day, hour, minute, second);&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/thread/101956?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2017 05:24:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e505045-bc49-4265-b094-2f0efdf18a8f</guid><dc:creator>Declan</dc:creator><description>&lt;p&gt;How can I set the current PC time into:
void date_time_set_timestamp(uint32_t timestamp)
{
uint32_t RTC2_counter;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;RTC2_counter = NRF_RTC2-&amp;gt;COUNTER;
if(timestamp &amp;lt; (RTC2_counter / 8))
{
    date_time_clock_timestamp = 0;
}
else
{
    date_time_clock_timestamp = timestamp - (RTC2_counter / 8);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/thread/101955?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2017 05:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4b2382f-bab4-4cc2-9c0d-2446733c700d</guid><dc:creator>Declan</dc:creator><description>&lt;p&gt;Thanks, it&amp;#39;s building the logic that I do not understand. I must keep track of the hours in a day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/thread/101954?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 21:13:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4390e328-ea83-422e-9cca-8f1520de9d46</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Well, I think what Sigurd was trying to say in not so many words is that the RTC peripheral you see on the nRF52 is a real time counter, not a real time clock/calendar. You can use it to keep track of ticks at almost any interval you want, but you have to build the logic on top of it if you want to use it as a clock/calendar. The example he is pointing you to is a way to do that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/thread/101953?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 18:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:760942e3-9553-49da-ac5e-577b98a9c4e3</guid><dc:creator>Declan</dc:creator><description>&lt;p&gt;0
Declan gravatar image
Declan
1 ●1 ●3
answered 18 mins ago
Thanks, but sorry - &amp;quot;nrf-calendar-example&amp;quot; makes no sense to me. I am very new to the whole Nordic / Keil environment. I desperately need assistance in being able to set the time and read(get) the time as per above. Any help would be greatly appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set RTC in nRF52832</title><link>https://devzone.nordicsemi.com/thread/101952?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 17:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0eca47f-830c-45ad-b388-f63db23fe503</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For keeping track of time on the nRF52, I would recommend taking a look at the &lt;a href="https://github.com/NordicSemiconductor/nrf5-calendar-example"&gt;nrf-calendar-example we have on Github&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>