<?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>Hardware interrupt example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/172/hardware-interrupt-example</link><description>Hello! I am newbie, I am using nordic nrf51822a board. Can anyone give me hardware interrupt example code and tell me how to enable it?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Aug 2013 11:48:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/172/hardware-interrupt-example" /><item><title>RE: Hardware interrupt example</title><link>https://devzone.nordicsemi.com/thread/948?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2013 11:48:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:302b0f4f-880c-4f89-a563-a941e911081d</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;To clean things up, I&amp;#39;d be happy if you could evaluate the answer you have received and accept it if you feel it&amp;#39;s sufficient. If not, it might be useful to expand your question a little and provide further information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware interrupt example</title><link>https://devzone.nordicsemi.com/thread/951?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2013 11:23:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22bc7281-6f11-402f-8c6f-d31e52c3feeb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The interrupt handler is located in the file startup_nrf51.s under the comment &amp;quot;; External Interrupts&amp;quot;. These should be declared in your source file (let&amp;#39;s say main.c) in this fashion: &amp;quot;void PERIPHERALX_IRQHandler(void){ .. }&amp;quot;&lt;/p&gt;
&lt;p&gt;When enabling the IRQ, using NVIC-functions, they take in the type &amp;quot;IRQn_Type&amp;quot;. This is declared in nrf51.h, line 82.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware interrupt example</title><link>https://devzone.nordicsemi.com/thread/952?ContentTypeID=1</link><pubDate>Sun, 28 Jul 2013 23:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:487c282f-a0cf-47b5-af10-664b58643908</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;Thank you Sir! can you also tell me where can I find the IRQ hander function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware interrupt example</title><link>https://devzone.nordicsemi.com/thread/950?ContentTypeID=1</link><pubDate>Sun, 28 Jul 2013 23:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2835a3c6-a102-4c1f-8fa1-77916de180f5</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;Thank you Sir! can you also tell me where can I find the IRQ hander function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware interrupt example</title><link>https://devzone.nordicsemi.com/thread/949?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2013 08:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f12ccd2-4370-4e43-99f6-ca5b0ba5aebb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Interrupts are essentially enabled by using two steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable the interrupt vector using NVIC_EnableIRQ(IRQ_type)&lt;/li&gt;
&lt;li&gt;Set the appropriate bit in NRF_wantedperipheral-&amp;gt;INTENSET = MASK_ENABLE;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#39;m attaching a small example on how to setup the ADC w/ISR.&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adc_5F00_isr_5F00_example.zip"&gt;adc_isr_example.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>