<?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>Radio state machine</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39759/radio-state-machine</link><description>Hi all ! 
 
 I&amp;#39;m struggling to get a frequency jumping protocol up and running and can&amp;#39;t figure out how to handle the following situation (please refer to the attached &amp;quot;pseudo code&amp;quot;): 
 
 1. When I start the radio to receive(or transmit) a packet I assert</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Oct 2018 12:34:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39759/radio-state-machine" /><item><title>RE: Radio state machine</title><link>https://devzone.nordicsemi.com/thread/154501?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 12:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8da2c3e9-dc2f-4ea8-b970-c47d86c5724d</guid><dc:creator>Kenneth</dc:creator><description>[quote user="ErcSic"]When it finishes the lower priority radio ISR gets to run and, hence , a packet is &amp;quot;received&amp;quot; in the RXRU state. What do you think ?[/quote]
&lt;p&gt;That make sense!&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have any really good suggestion here how to best handle this. Though I think it is best to have the same interrupt priority in this case, since both interact with the radio peripheral.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio state machine</title><link>https://devzone.nordicsemi.com/thread/154354?ContentTypeID=1</link><pubDate>Wed, 24 Oct 2018 19:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a53a1b3-d8de-42c4-9adb-f112cb90d961</guid><dc:creator>Eric</dc:creator><description>&lt;p&gt;Kenneth, thank you for the attention.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- I have only one shortcut enabled and that is between READY and START.&lt;/p&gt;
&lt;p&gt;- Yes, you are right; value 3 is RX&amp;nbsp;which, off course, makes sense due to the shortcut.&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;Since RXEN is &amp;quot;protected&amp;quot; by an assert that the radio is disabled, multiple calls should not be possible. Besides, every radio ISR is finished with a call to TASKS_DISABLE.&lt;/p&gt;
&lt;p&gt;Thinking further about this I can come up with one plausable expanation:&lt;/p&gt;
&lt;p&gt;Since it is not certain that a packet is transmitted in every slot (or on every frequency if you like) I cannot rely on the RX ISR to switch to the next frequency. Instead this is done by a timer interrupt. However, as it stands,&amp;nbsp; this interrupt has a higher priority than the radio interrupt. Consequently; if a packet is received &amp;quot;too late&amp;quot; the timer ISR has already disabled the radio, switched to the next frequency and initiated &amp;quot;a ramp up&amp;quot;. When it finishes the lower priority radio ISR gets to run and, hence , a packet is &amp;quot;received&amp;quot; in the RXRU state. What do you think ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In any case; what makes most sense as a design choise (and why ?):&lt;/p&gt;
&lt;p&gt;1. Timer IRQ has higher priority than the radio IRQ&lt;/p&gt;
&lt;p&gt;2. Radio IRQ has higher priority than the timer IRQ&lt;/p&gt;
&lt;p&gt;3. Both IRQs have the same priority&lt;/p&gt;
&lt;p&gt;4. Radio ISR is disabled. Everything is handled in the timer ISR.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any suggestion is most welcome&lt;/p&gt;
&lt;p&gt;\Eric&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio state machine</title><link>https://devzone.nordicsemi.com/thread/154304?ContentTypeID=1</link><pubDate>Wed, 24 Oct 2018 14:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77c95cec-acc9-48bd-845d-6a6a1061b518</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I think you will need to debug a bit further to understand when this is occurring. For instance what radio shorts do you have enabled, a STATE value of 3 is RX (not RXIDLE), is it possible you are triggering RXEN several times without stop or disable? Are you waiting for appropriate events before triggering new task/astate?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>