<?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>NRF52 Bare metal - attaching interrupts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24134/nrf52-bare-metal---attaching-interrupts</link><description>I have been experimenting with using some peripherals on the nrf52832 without using the SDK. Primarily of interest to me right now is the low power comparator (LPCOMP). 
 There is a handy example here github.com/.../main.c but i am having trouble attaching</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Aug 2017 09:37:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24134/nrf52-bare-metal---attaching-interrupts" /><item><title>RE: NRF52 Bare metal - attaching interrupts</title><link>https://devzone.nordicsemi.com/thread/95027?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2017 09:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15f92c25-3091-43c8-b17c-4e3a4ba0982d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The github example does not look like it enables the interrupt, you can do this like below
Assuming that you have already enabled the events&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NVIC_SetPriority(COMP_LPCOMP_IRQn, priority);
NVIC_ClearPendingIRQ(COMP_LPCOMP_IRQn);
NVIC_EnableIRQ(COMP_LPCOMP_IRQn);

void COMP_LPCOMP_IRQHandler(void
{
    // handle your interrupt here
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>