<?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>nrf calendar</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67927/nrf-calendar</link><description>can i genrate milliseconds using nrf calendar example?? that is only printing upto seconds i want milliseconds too??</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Nov 2020 06:37:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67927/nrf-calendar" /><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/279621?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 06:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b80499a-bf57-4a22-a386-c4fe31659431</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Torbjørn seems to have answered you in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/56315/nordic-calendar-example-https-github-com-nordicplayground-nrf5-calendar-example-related-issue"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/279358?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 19:01:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:047bf1bb-7da6-4caf-a416-9e676a183aed</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;omg i learned so much about rtc from you guys thanks and sorry for keep bugging you i grasped everything about that nrf calender except one thing why are&amp;nbsp; you using this function and what is the purpose of this function&lt;/p&gt;
&lt;p&gt;void nrf_cal_set_callback(void (*callback)(void), uint32_t interval)&lt;br /&gt;{&lt;br /&gt;// Set the calendar callback, and set the callback interval in seconds&lt;br /&gt;cal_event_callback = callback;&lt;br /&gt;m_rtc_increment = interval;&lt;br /&gt;m_time += CAL_RTC-&amp;gt;COUNTER / 8;&lt;br /&gt;CAL_RTC-&amp;gt;TASKS_CLEAR = 1;&lt;br /&gt;CAL_RTC-&amp;gt;CC[0] = interval * 8;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;},&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and also count=CAL_RTC-&amp;gt;COUNTER /32.768; how can i print these&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and also what happens when overflow occurs and how can i rectify that&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;REGARDS&lt;/p&gt;
&lt;p&gt;MANIKANDAN V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/279133?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 08:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4d8bcb1-11f3-491f-b61c-119e177cda9b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;Not by using the RTC peripheral, no. The most power efficient solution, I think would be to find a second low power MCU that is dedicated to tracking time at millisecond accuracy. If you insist on&amp;nbsp;&lt;strong&gt;only&amp;nbsp;&lt;/strong&gt;using the nRF52, you will&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;have to use the TIMER peripheral in order to achieve millisecond accuracy.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&amp;nbsp;&lt;/strong&gt;I&amp;#39;m sorry, I was mistaken regarding the RTC.&amp;nbsp;If you change the prescaler to 0 in the calendar example the RTC will run at the full 32.768kHz clock speed, and&amp;nbsp;if you divide the RTC counter value by 32.768 you should get the current time in milliseconds.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The important factor is that you need to update all references to the&amp;nbsp;&lt;span&gt;CAL_RTC-&amp;gt;&lt;/span&gt;&lt;span&gt;COUNTER register, since this value will now be much higher (rather than increase by 8 every second it will increase by 32768 every second).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, the maximum time the RTC can run without being cleared will be much shorter, since the 24-bit RTC counter will overflow in 512 seconds when the prescaler is 0.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/278985?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 12:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cae1cee5-651b-43f5-9c64-bff643bea5d0</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;power consumption is important to me is any any alternate&amp;nbsp; way to get milli seconds&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/278942?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 09:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06eddca4-28b9-496c-8f9a-232527e4c099</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;strong&gt;&lt;span&gt;return_time&lt;/span&gt; = m_time + CAL_RTC-&amp;gt;COUNTER / 8;&amp;nbsp;&lt;/strong&gt;function stores the current timestamp in seconds. If you want to edit this to store in milliseconds instead, you will have to use the TIMER peripheral instead, as the RTC is not accurate enough to count milliseconds.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/278875?ContentTypeID=1</link><pubDate>Sat, 07 Nov 2020 05:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c2aa577-8286-4d18-a980-f22091cd19f5</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;can u please explain what does this function does&amp;nbsp;&amp;nbsp; &amp;nbsp; return_time = m_time + CAL_RTC-&amp;gt;COUNTER / 8;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/278362?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 06:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7f7da99-612b-4ce5-916c-92733498514c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, you will have to implement the millisecond parameter yourself in the nRF calendar example, as it is not a part of the calendar example by default. Please check out these previous DevZone tickets that &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/53902/clarification-about-nrf-calaendar-example"&gt;clarify some general points&lt;/a&gt; on the calendar example, and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/57827/nrf5-calendar-example-questions/"&gt;answers some questions on the example itself&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/278243?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 11:10:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:005bcc7f-e45a-469f-aecf-65f5590b6a6e</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;in &lt;strong&gt;nrf_cal_get_time_string()&amp;nbsp; hery are using this&amp;nbsp; function&amp;nbsp;&amp;nbsp;&lt;/strong&gt;strftime(cal_string,80,&amp;quot;%F-%H:%M;%S&amp;quot;,nrf_cal_get_time()); to get the time and date but i dont know how are calculating date and time. and also there is no command to get millisecond in timer.h too&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf calendar</title><link>https://devzone.nordicsemi.com/thread/278233?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 10:19:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbd9dd5a-fe4a-4a72-b2ea-e8671bd973ff</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see why that should be a problem, but you&amp;#39;ll have to implement that into the project, as it is not there by default.&amp;nbsp;You can start out by checking out the&lt;strong&gt; while (true)&lt;/strong&gt;&amp;nbsp;loop in the main() function of the nrf_calendar example. There you can see how seconds and minutes are set, and you can implement milliseconds in a similar fashion. You will also have to edit the &lt;strong&gt;nrf_cal_get_time_string()&lt;/strong&gt; function in &lt;strong&gt;nrf_calendar.c&lt;/strong&gt; to use milliseconds as well.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>