<?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>Interrupt handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41157/interrupt-handler</link><description>Hi, 
 I use the nRF52840 DK with Segger IDE. 
 I would like to use different peripherals on the MCU (GPIO, SPI, Timers etc), but I would like to avoid using the Nordic SDK, because I find the documentation quite confusing and lacks descriptions. 
 I would</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Dec 2018 12:24:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41157/interrupt-handler" /><item><title>RE: Interrupt handler</title><link>https://devzone.nordicsemi.com/thread/160192?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 12:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c83fb9d-59e5-4943-b13a-5ecb166ee888</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Take a look at the example under &amp;quot;examples\peripheral\rtc&amp;quot;. You will need to declare a void function for &amp;quot;RTC0_IRQHandler&amp;quot;, see the declarations of irq_handler and nrfx_rtc_0_irq_handler in nrfx_rtc.c, and the define in line 104 in nrfx_irqs_nrf52840.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// TIMER0_IRQn
#define nrfx_timer_0_irq_handler    TIMER0_IRQHandler&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if NRFX_CHECK(NRFX_RTC0_ENABLED)
void nrfx_rtc_0_irq_handler(void)
{
    irq_handler(NRF_RTC0, NRFX_RTC0_INST_IDX, NRF_RTC_CC_CHANNEL_COUNT(0));
}
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can also take a look at this snippet &lt;a href="https://github.com/andenore/NordicSnippets/blob/master/examples/rtc/main.c"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt handler</title><link>https://devzone.nordicsemi.com/thread/160147?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 09:36:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8210658-da08-4f3b-8e82-d53075e84f95</guid><dc:creator>mosgaard2000</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;I am looking for some info to actually setup the interrupts handler in the code. I have set all the registers to run the RTC and that seems to work ok, but I would then like to catch the interrupts on the TICK event, but I can&amp;#39;t find any info about how to setup the interrupt handler in the code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt handler</title><link>https://devzone.nordicsemi.com/thread/159966?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 13:10:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cdb5361-37f5-4731-8763-0b8ec5c5695a</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is much easier to use our drivers directly, the GPIO driver is documented &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__nrf__gpio.html"&gt;here&lt;/a&gt;. We have an example which demonstrates interrupts on pin changes in our SDK, documented &lt;a href="https://devzone.nordicsemi.com/support-private/support/218894/demonstrates%20interrupts%20on%20PIN_IN%20change"&gt;here&lt;/a&gt;. If you still want to address the registers directly you will need to look up the registers in the Product Specification, &lt;a href="https://www.nordicsemi.com/-/media/DocLib/Other/Product_Spec/nRF52840PSv10.pdf?la=en"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>