<?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>How can I get interrupts from the RADIO?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/906/how-can-i-get-interrupts-from-the-radio</link><description>Hello, 
 I&amp;#39;m using nRF51822 to implement a proprietary radio protocol. My first attempt, in the receiver, was polling the EVENTS_* registers. An example: 
 
NRF_RADIO-&amp;gt;EVENTS_READY = 0UL;
NRF_RADIO-&amp;gt;TASKS_RXEN = 1UL;
while (NRF_RADIO-&amp;gt;EVENTS_READY</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Nov 2013 10:57:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/906/how-can-i-get-interrupts-from-the-radio" /><item><title>RE: How can I get interrupts from the RADIO?</title><link>https://devzone.nordicsemi.com/thread/4405?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 10:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b8ae9af-6754-4949-8224-10e045fd0fe9</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;In addition to enabling an interrupt in the NVIC, you must also set which events in a peripheral that should generate interrupts. This is done in the INTEN register, accessible through the -SET and -CLR aliases. To for example make the READY- and ADDRESS-events generate interrupts, you&amp;#39;d do this in your init:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
void init(void)
{
    NRF_RADIO-&amp;gt;INTENSET = RADIO_INTENSET_READY_Enabled &amp;lt;&amp;lt; RADIO_INTENSET_READY_Pos | 
                          RADIO_INTENSET_ADDRESS_Enabled &amp;lt;&amp;lt; RADIO_INTENSET_ADDRESS_Pos;
    
	NVIC_SetPriority(RADIO_IRQn, 1);
	NVIC_ClearPendingIRQ(RADIO_IRQn);
	NVIC_EnableIRQ(RADIO_IRQn);
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Be aware that you can also use the SHORTS register to directly connect an event with a task in the same peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>