<?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>Integrating RTC with with SoftDevice(current Time Service) to generate time stamps</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54004/integrating-rtc-with-with-softdevice-current-time-service-to-generate-time-stamps</link><description>Hello, 
 I am trying to integrate the calendar example (using RTC 2), with a current time service(CTS) client and and custom service server on a nRF52940 DK. 
 I want to use the time data received from the phone as a reference for the on-board RTC to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Nov 2019 09:48:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54004/integrating-rtc-with-with-softdevice-current-time-service-to-generate-time-stamps" /><item><title>RE: Integrating RTC with with SoftDevice(current Time Service) to generate time stamps</title><link>https://devzone.nordicsemi.com/thread/218484?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 09:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d958532-31b7-4146-b307-a87c89d9d817</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;&amp;quot;&lt;span&gt;Until now I have been able to receive timestamps from the CTS and also advertise sensor data to the phone using the custom service. But I haven&amp;#39;t been able to use the local RTC to sync with time data from CTS and generate local timestamps using RTC interrupts.&amp;quot;&lt;br /&gt;&lt;br /&gt;You need to share exactly what it is that you&amp;#39;re trying to do and what fails, as I have no idea what you&amp;#39;re trying to do and what does not work other than the fact that you&amp;#39;re trying to synchronize an RTC timer over BLE and failing at it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;quot;I read&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/16934/nrf52-rtc-issue"&gt;this&lt;/a&gt;&amp;nbsp;on the forum. So does that mean I shouldn&amp;#39;t use a RTC COMPARE event with SoftDevice?&amp;quot;&lt;br /&gt;That issue is about the higher execution priority of the SoftDevice blocking the CPU from toggling a pin. What that uses should have done is to use the GPIOTE peripheral with PPI in order to toggle the output pin directly from the&amp;nbsp;RTC COMPARE event instead of waiting for the interrupt that the&amp;nbsp;RTC COMPARE event can generate.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;For the calendar library this is not really an issue as the&amp;nbsp;RTC COMPARE event&amp;nbsp;only happens once a second, and the SoftDevice will not block execution for a whole second. As long as the RTC&amp;#39;s ISR is service before the next&amp;nbsp;RTC COMPARE event&amp;nbsp;you&amp;#39;re good.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>