<?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>Is there a possible clash of RTC1 usage?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15107/is-there-a-possible-clash-of-rtc1-usage</link><description>I have an mBed application that uses the S130 SoftDevice and polls data from a couple of other connected peripherals via I2C &amp;amp; SPI. 
 I use a Ticker object, which seems to basically be a wrapper around the Nordic app_timer implementation and exposes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Aug 2016 13:04:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15107/is-there-a-possible-clash-of-rtc1-usage" /><item><title>RE: Is there a possible clash of RTC1 usage?</title><link>https://devzone.nordicsemi.com/thread/57705?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 13:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1876949-6f5e-4030-9e3e-f7db07a51df3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I apologize for not replying sooner. Yes, disabling all interrupts will cause the SoftDevice to assert. You can use &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___n_r_f___n_v_i_c___f_u_n_c_t_i_o_n_s.html#ga3cb70a461e2e1421bd812c5c0d5ad0c0"&gt;sd_nvic_critical_region_enter&lt;/a&gt; to disable interrupts going to the application, but interrupts will still be forwared to the SoftDevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a possible clash of RTC1 usage?</title><link>https://devzone.nordicsemi.com/thread/57704?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2016 14:39:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d58602f6-89b7-44b1-b3b3-be56de08a16e</guid><dc:creator>seajayshore</dc:creator><description>&lt;p&gt;There is quite a lot of radio usage in the app. Some data is sent every ~30ms (minimum normal connection interval for iOS).
But I think I&amp;#39;m preventing the ADC from being read at a moment where radio transfer could occur. (I&amp;#39;m using a radio-notification callback to set a flag that dictates if the ADC and other things can be polled).
Still strange delays can occur in the I2C transfer, possibly now due to a ticker/RTC1 interrupt happening quite rapidly.
Can you tell me, it&amp;#39;s definitely not a good idea to disable interrupts briefly on this nRF51822 M0 right? You can only disable ALL interrupts on an M0 I believe, so this would cause the Softdevice to fail too...?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a possible clash of RTC1 usage?</title><link>https://devzone.nordicsemi.com/thread/57703?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2016 08:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aca2013-25bf-4028-84d0-a84436653cbd</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Is this issue correlated with a lot of radio activity? The SoftDevice will interrupt the application whenever there is any radio activity, which will explain the timing variations you&amp;#39;re seeing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a possible clash of RTC1 usage?</title><link>https://devzone.nordicsemi.com/thread/57702?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 16:28:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a2f927a-9f30-475e-a746-026c4ad1bcfe</guid><dc:creator>seajayshore</dc:creator><description>&lt;p&gt;You may well be right... My ADC (I2C device) code currently has no error checking on some read/write operations and is called most frequently of all the devices.&lt;/p&gt;
&lt;p&gt;I noticed on my scope that it seems various interrupts can cause timing variations on the I2C comms lines and, whilst most of the time this is benign between-packet delays (which I2C can presumably handle), it may well get interrupted at exactly the wrong moment and cause something strange to happen... Perhaps even causing the ADC itself to go into some weird error mode...&lt;/p&gt;
&lt;p&gt;I&amp;#39;m exploring. Thanks for the help. Please let me know if the above theory sounds strange to you... I&amp;#39;ll explore what happens after a fix in any case.&lt;/p&gt;
&lt;p&gt;(BTW I&amp;#39;ve asked on mBed but it&amp;#39;s a bit sparsely populated since the mbedOS split and I&amp;#39;m not getting many responses).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a possible clash of RTC1 usage?</title><link>https://devzone.nordicsemi.com/thread/57701?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2016 14:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:781f8a96-5b3a-4ee5-ad04-482bafe2818d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I am pretty confident that an interrupt from the SPI peripheral will never collide with an interrupt from the RTC0 peripheral if they occur at the same time, this is taken care of by the peripheral bus.&lt;/p&gt;
&lt;p&gt;I am not that familiar with mBED, but if the SoftDevice is still running then I think this is due to some unhandled error somewhere in your application. The SoftDevice only uses RTC0 so it cannot be tha cause of the issue. This could also be a bug in the Ticker implementation.&lt;/p&gt;
&lt;p&gt;I think that I would be a good idea to post this on the &lt;a href="https://forums.mbed.com/"&gt;mBED forum&lt;/a&gt; as there are&amp;#39;nt that many mBED users here on DevZone.&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>