<?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>Timer interrupt problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7916/timer-interrupt-problem</link><description>Dear Nordic developers, 
 I&amp;#39;m trying radio reciever example. I want to stay 7 ms in listening mode, if there is no event turn off the radio. For that I&amp;#39;m using timer interrupt. Please see the code bellow, I&amp;#39;m using radio reciever code 
 static uint32_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Jul 2015 07:32:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7916/timer-interrupt-problem" /><item><title>RE: Timer interrupt problem</title><link>https://devzone.nordicsemi.com/thread/28296?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2015 07:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18479abf-37bd-4c89-842a-5395258dbdb3</guid><dc:creator>chinargor</dc:creator><description>&lt;p&gt;Hi, Thanks for your advice, it was really helpful, I have already implemented in a way you told me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt problem</title><link>https://devzone.nordicsemi.com/thread/28295?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2015 10:46:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff0e9233-5d08-4d3f-8198-a9a602c91169</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Please see edited answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt problem</title><link>https://devzone.nordicsemi.com/thread/28294?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2015 09:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa7af6d8-308c-4a34-907a-d343a3617525</guid><dc:creator>chinargor</dc:creator><description>&lt;p&gt;Hi Øyvind,&lt;/p&gt;
&lt;p&gt;Thanks for your response.
I change to TIMER1 it doesn&amp;#39;t help.
I can debugg and see that the program enters to a interrupt handling function and I assume It should set flag1 to 1. But when it returns to a while loop it doesn&amp;#39;t break the loop, I really don&amp;#39;t understand why. I even tried the same example by removing radio and using only the timer, but no difference.
I would really appreciate any advice.&lt;/p&gt;
&lt;p&gt;Thanks Gor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt problem</title><link>https://devzone.nordicsemi.com/thread/28293?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2015 08:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa68114c-94b9-45b5-89aa-a092028a2d0c</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since you&amp;#39;re not receiving any packets the radio is not going to send an EVENTS_END, but instead it will wait for a packet to come. You can see that this stalling in while(NRD_RADIO-&amp;gt;EVENTS_END == 0U) occurs in the base receiver example as well. A solution for this is to add a timeout, a set amount of time that your radio will listen.&lt;/p&gt;
&lt;p&gt;In pseudocode:
&lt;code&gt;while(NRF_RADIO-&amp;gt;EVENTS_END == 0U &amp;amp;&amp;amp; some_counter &amp;lt; some_number)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>