<?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>using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/774/using-ant-with-rtc-timers---softdevice-conflicting-with-lfclk</link><description>We are trying to get the ANT feature to run based on RTC as follows: 
 a. Timer RTC0 or 1 (1 for this example - tick is disabled, compare is on.)
b. Timer initialized (all works very well).
c. Start timer - go for 10-second IRQ in compart cc[0] - works</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Nov 2014 11:08:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/774/using-ant-with-rtc-timers---softdevice-conflicting-with-lfclk" /><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3905?ContentTypeID=1</link><pubDate>Mon, 10 Nov 2014 11:08:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:311cad3e-7d21-4fb0-8e47-e1cf1d18ca30</guid><dc:creator>Vito</dc:creator><description>&lt;p&gt;&amp;quot;Considering point 1 above, if you need to use a 16 MHz timer, make sure to use TIMER1 or TIMER2 and not TIMER0.&amp;quot;
Why in this case you discourage use of TIMER0 for a 16MHz timer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3910?ContentTypeID=1</link><pubDate>Sat, 02 Nov 2013 14:48:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52555619-8746-45a0-8176-fb9490b6a3c8</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;Do to the gpio or ns_delay routines change when the sd is on?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3909?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2013 01:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5a8e1c1-bf33-47fc-8873-682ab90d04a2</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;sdk from ns website would not install. I have u.s. FE send me a copy that installed perfectly. I can now see the examples you reference. They look promising.
tks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3908?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 16:18:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4270af9-5fa5-4ec2-974a-a69fec617191</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;Will take looks..
tks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3907?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 16:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c63a7fb-1620-4d8e-87e9-3fbf0c49602f</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;You&amp;#39;re right that the HRM example (and several of the other examples) implement some debug output over UART, but I don&amp;#39;t see how that makes the example irrelevant. It still shows both how to use RTC for application timing and how to interface with the softdevice, both of which should be useful to your application.&lt;/p&gt;
&lt;p&gt;There is no specific example doing exactly what you need, but if you look at the modules available, especially app_timer, how they are used in the examples and make sure that you understand how the softdevice concept works, there shouldn&amp;#39;t be any problems doing what you want.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d recommend you to use app_timer for your needs, since that gives the possibility of having multiple application timers, but if you instead prefer to use RTC1 directly, you can look at the SDM example. Both use the RTC timer at the same time as using the softdevice, which should be no problem at all if you comply with the requirements from the SoftDevice specification and the Reference Manual.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3906?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 16:05:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ec1eeca-066f-4628-af80-4a9a5ec79200</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;HRM project, unless i misread, is implementing UART - which is of no interest.
I think we missed the boat here.&lt;/p&gt;
&lt;p&gt;We just want a process for one of the following (either is ok)..&lt;/p&gt;
&lt;p&gt;a. bring up a timing mechanism for a period of 1-20 minutes..
at comparator match, release the logic to bring up ANT, do some ant stuff, then, if needed shut ant down and restart the timer for the next cycle...&lt;/p&gt;
&lt;p&gt;--- or -- ideally!&lt;/p&gt;
&lt;p&gt;b. bring up ANT and timer together, allowing interrupt from any listening OR comparator, them handle the particular interrupts from Timer or Protocol events through IRQ routines...&lt;/p&gt;
&lt;p&gt;Is this possible???
HOW?
Specific Example???&lt;/p&gt;
&lt;p&gt;tks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3904?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 12:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee20c0d8-9b9c-418d-9274-56eb7506eeab</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m having a little trouble understanding the exact problem or question here, but I have a couple of comments:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;As you&amp;#39;ve found out, when the softdevice is enabled, some peripherals are either restricted or blocked. Those that are blocked can not be used at all when the softdevice is enabled, while the ones that are restricted can be used only through the softdevice&amp;#39;s API. The &lt;a href="https://www.nordicsemi.com/eng/content/download/13241/213110/file/S210_SoftDevice_Specification%20v1.0.pdf"&gt;S210 SoftDevice Specification&lt;/a&gt; provides a complete list of which peripherals are open, blocked and restricted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You seem to be using a very old version of the SDK. I&amp;#39;d strongly recommend you to upgrade to the latest version as soon as possible., which is currently &lt;a href="https://www.nordicsemi.com/eng/content/download/13246/213185/file/nrf51_sdk_v4_4_1_31827.msi"&gt;4.4.1&lt;/a&gt;. To ensure compatibility with all chip revisions, you should make sure to remove all references to the PERPOWER/PERRDY registers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The latest versions of the SDK also includes a number of examples all showing how to use a timer with the softdevice. For example the ant_hrm_tx project uses RTC1 to simulate a pulse event. I guess this should be a good example of how to use timers with the softdevice.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Edit: Specifically take a look at nrf51422\Board\nrf6310\ant\ant_hrm\hrm_tx\hrm_tx.c file, and the project it&amp;#39;s part of.&lt;/p&gt;
&lt;p&gt;Considering point 1 above, if you need to use a 16 MHz timer, make sure to use TIMER1 or TIMER2 and not TIMER0.&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;When calling softdevice functions, they may return errors in case something is not as expected. Always check error codes on all softdevice function calls! The header file definitions of the softdevice functions lists all the errors that can be returned, along with a short description of each one. If you have an error code that you want to relate to a define, you should take a look at ant_error.h, nrf_error.h, , nrf_error_sdm.h and nrf_error_soc.h, which contains all the error defines.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3903?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2013 00:02:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8810e61-e747-4f8f-9dfe-fcbc11f209b9</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;Update: 2013.10.30: 18:00 cdt/us&lt;/p&gt;
&lt;p&gt;Per discussion w/ NS, I understand that the examples using direct write to registers (in many) cases clobber the SD workings.  I understand that once the S210 is enabled, many of the calls in the examples are disqualified per direct writes (as we did above) to registers and may cause fault, interrups, or disabling of the SD processes.  NS explains that examples that do NOT use softdevice should be compatible with other examples that do NOT use SD.  If the SD is being enabled, the correct means to write to the comfig/starts/etc is to use SD calls... But the examples to not typically show how to do them.&lt;/p&gt;
&lt;p&gt;So - to rephrase the questions per above:
Is there a correct means to run rtc/timers in concert w/ the ANT stuff where they both can exist and (a. any or (b. either interrupt can be used to process cause for interrupt??&lt;/p&gt;
&lt;p&gt;Please explain &amp;amp; show??&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3902?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2013 03:58:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd428ca0-17ef-4d24-b47c-5aa3a2b1c938</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;Update - more surprises!
We moved over to HF timer to try it there..
Timer0 works like a charm but..could not get the ANT to start back up.&lt;/p&gt;
&lt;p&gt;We removed ALL  timer configs and startups (and all references to the timer) and cannot get the softdevice to start back up. Went back to prior versions of the source without the timer0 with no luck..&lt;/p&gt;
&lt;p&gt;we see:
while trying to start up the ant...&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;enabling the softdevice    error code  %d4097 (base + x1)&lt;/li&gt;
&lt;li&gt;the nvic_set_prior...           produces 0x1 error.&lt;/li&gt;
&lt;li&gt;subsequent enable_irq..   gets %d 0x2 code..&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;?? ANT THOUGHTS?? It seems like the IRQ evaporated??&lt;/p&gt;
&lt;p&gt;Is there an example of running ANT on a timer cycle??&lt;/p&gt;
&lt;p&gt;Thank you!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using ANT with RTC timers - softdevice conflicting with LFClk</title><link>https://devzone.nordicsemi.com/thread/3901?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2013 03:10:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a95c36f-6a10-4508-9205-d4af1ba90f01</guid><dc:creator>roger hayes</dc:creator><description>&lt;p&gt;-- note that in the code the &amp;quot;Colored&amp;quot; errors (yellow_error, etc) are produced by RGB leds on our pcb..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>