<?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>nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60549/nrf52832-rtc-to-timestamp</link><description>Hello, 
 I am using nRF52832 chip for freeRTOS project and using RTC2. I have SDK15.2. I want to have timestamp from RTC as hex format. I searched almost all forums but i have nothing. I just found https://github.com/NordicPlayground/nrf5-calendar-example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 11:25:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60549/nrf52832-rtc-to-timestamp" /><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/247308?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 11:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:143792bd-84b4-463e-8810-6ab972ed46d0</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll need to change&amp;nbsp;&lt;span&gt;CLOCK_LFCLKSRC_SRC_Xtal&amp;nbsp;to&amp;nbsp;CLOCK_LFCLKSRC_SRC_RC in order to use the internal RC oscillator. The RC oscillator will also have to calibrate, so you should enable the calibration timer as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/247218?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 07:15:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b58ca1ee-c393-427e-b4c7-5f28ab04aa6b</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I deleted defined&amp;nbsp;&lt;span&gt;RTC2_IRQHandler&amp;nbsp;in calendar header file and problem solved.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But code stops in this part :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_CLOCK-&amp;gt;LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos;&lt;br /&gt;NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED = 0;&lt;br /&gt;NRF_CLOCK-&amp;gt;TASKS_LFCLKSTART = 1;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When i comment here, code works but timestamp is false.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think its about hw. It does not have external clock. Is there any way to define internal clock?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/247202?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 06:11:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ae77532-3cea-460d-b548-edcc338c61e1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Well, it seems like you have defined RTC2_IRQHandler multiple times in your project. Please find out which one you need for your project and remove the other one. What do you mean by &amp;quot;Then I change the header file, code just stop&amp;quot;? Where does it stop exactly, and how does it stop? Have you tried debugging to find out if you can see an error of some kind?&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: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/247058?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 11:12:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ad21bb6-a1cf-4eef-8b33-ce35a7fcde9c</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;Edit :&amp;nbsp;NRF_DRV_RTC_INSTANCE(2)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/247057?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 11:10:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1197a774-f830-45ab-b5ef-c1584a764154</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;ı implemented the calendar example to my project but i have an error when header file is like this :&lt;/p&gt;
&lt;p&gt;#define CAL_RTC NRF_RTC2&lt;br /&gt;#define CAL_RTC_IRQn RTC2_IRQn&lt;br /&gt;#define CAL_RTC_IRQHandler RTC2_IRQHandler&lt;br /&gt;#define CAL_RTC_IRQ_Priority 3&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Error is&amp;nbsp;Output/.../....o: in function `RTC2_IRQHandler&amp;#39;:multiple definition of `RTC2_IRQHandler&amp;#39;;&lt;/p&gt;
&lt;p&gt;...\nRF5_SDK_15.2.0_9412b96\modules\nrfx\drivers\src/nrfx_rtc.c:343: first defined here&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then i change the header file, code just stop :&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define CAL_RTC NRF_RTC0&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#define CAL_RTC_IRQn RTC0_IRQn&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#define CAL_RTC_IRQHandler RTC0_IRQHandler&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#define CAL_RTC_IRQ_Priority 3&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is my implementation :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;void NrfInit(void)&lt;br /&gt;{&lt;br /&gt; /* Select the 32 kHz crystal and start the 32 kHz clock */&lt;br /&gt; NRF_CLOCK-&amp;gt;LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos;&lt;br /&gt; NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED = 0;&lt;br /&gt; NRF_CLOCK-&amp;gt;TASKS_LFCLKSTART = 1;&lt;br /&gt; //while(NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED == 0);&lt;br /&gt; &lt;br /&gt; /* Configure the RTC for 1 minute wakeup (default) */&lt;br /&gt; CAL_RTC-&amp;gt;PRESCALER = 0xFFF;&lt;br /&gt; CAL_RTC-&amp;gt;EVTENSET = RTC_EVTENSET_COMPARE0_Msk;&lt;br /&gt; CAL_RTC-&amp;gt;INTENSET = RTC_INTENSET_COMPARE0_Msk;&lt;br /&gt; CAL_RTC-&amp;gt;CC[0] = m_rtc_increment * 8;&lt;br /&gt; CAL_RTC-&amp;gt;TASKS_START = 1;&lt;br /&gt; NVIC_SetPriority(CAL_RTC_IRQn, CAL_RTC_IRQ_Priority);&lt;br /&gt; NVIC_EnableIRQ(CAL_RTC_IRQn); &lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&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;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;void CAL_RTC_IRQHandler(void)&lt;br /&gt;{&lt;br /&gt; if(CAL_RTC-&amp;gt;EVENTS_COMPARE[0])&lt;br /&gt; {&lt;br /&gt; CAL_RTC-&amp;gt;EVENTS_COMPARE[0] = 0;&lt;br /&gt; &lt;br /&gt; CAL_RTC-&amp;gt;TASKS_CLEAR = 1;&lt;br /&gt; &lt;br /&gt; m_time += m_rtc_increment;&lt;br /&gt; if(cal_event_callback) cal_event_callback();&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/247034?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 10:23:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e42fa7ed-a9fd-42de-b72b-b3eb39da0267</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;I still think you should look at the calendar example to see how the RTC is initialized and how the timestamp function(s) are implemented, and then implement that into your project with this accelerometer sensor data.&lt;/p&gt;
&lt;p&gt;Please be more specific with what you&amp;#39;re having trouble with.&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: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/246780?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 11:20:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcf46e89-a228-48f8-9710-3489d381e832</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;I am reading&amp;nbsp;accelerometer sensor datas and trying to find max 5 value in 10 secs. I have to know when i get this 5 max values so i want to put timestamp info after values.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/246766?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 10:57:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:758a383a-7209-476d-bf98-4d6f983bd277</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Then how do you want to interface with the RTC setting the timestamp? I assume you&amp;#39;d like to see the timestamp in a terminal or another display of some kind? Please provide some details on what you&amp;#39;d like to achieve. You could always modify the nrf5 calendar example by removing the UART functions in order to reduce it to just using the RTC to do the timestamps, but that would mean that you won&amp;#39;t be able to see the timestamps anywhere.&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: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/246672?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 06:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86657bf3-6f88-422d-a7b7-afac7399a31c</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t want to use bluetooth and UART. I just want to set timestamp based on RTC.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/246668?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 06:32:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6622b620-b2c7-4c77-8701-f406dfff56be</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but you&amp;#39;d like to do timestamps over BLE, correct? What kind of device are you planning on communicating with? Please provide some more details on what exactly you&amp;#39;d like to achieve to help me understand what you need assistance with.&lt;/p&gt;
&lt;p&gt;I suggest implementing the calendar example in one of our Bluetooth examples. Maybe our &lt;a href="https://github.com/NordicPlayground/nRF5x-custom-ble-service-tutorial"&gt;custom ble service example &lt;/a&gt;might help you, showing how you implement your own services and characteristics (calendar service for example) in BLE examples.&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: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/246624?ContentTypeID=1</link><pubDate>Sat, 25 Apr 2020 15:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef0e68bf-e2f6-4f56-9a28-6cec8b799d87</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I saw examples based on uptading time with bluetooth and i meant that in my problem, my fault.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t want to use UART too. The best thing to do is to modify the code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 rtc to timestamp</title><link>https://devzone.nordicsemi.com/thread/246251?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 12:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00101079-a577-4a43-a36c-a302cf444a43</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The nrf5-calendar-example does not use Bluetooth. It just uses UART and RTC. Is there any particular reason you can&amp;#39;t use this example as a base?&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>