<?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>CPU not going to sleep because of TIMER2 interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45321/cpu-not-going-to-sleep-because-of-timer2-interrupt</link><description>Hi, 
 the system we are using includes the nrf52832 SoC with an external ADC and en external crystal for HFCLK. running SoftDevice s132 v2 (based on SDK 11) 
 in our system we turn on the hfclk and ppi and TIMER2 to sample an external ADC in a cyclic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Mar 2019 13:57:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45321/cpu-not-going-to-sleep-because-of-timer2-interrupt" /><item><title>RE: CPU not going to sleep because of TIMER2 interrupt</title><link>https://devzone.nordicsemi.com/thread/178133?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 13:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d192a11c-07e6-4b4c-bc88-3928a1862724</guid><dc:creator>Samer Mattar</dc:creator><description>&lt;p&gt;I think the reason that this happened is because I used&amp;nbsp;nrf_drv_timer_uninit without nrf_drv_timer_disable that is because the&amp;nbsp;nrf_drv_timer_uninit function starts with&amp;nbsp;&lt;br /&gt;&lt;span&gt;nrf_drv_common_irq_disable&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;nrf_drv_get_IRQn&lt;/span&gt;&lt;span&gt;(p_instance-&amp;gt;&lt;/span&gt;&lt;span&gt;p_reg&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and then disables the timer this can result in theory&amp;nbsp;that the timer interrupt happens exactly&amp;nbsp;after the&amp;nbsp;nrf_drv_common_irq_disable was called and before&amp;nbsp;&lt;/span&gt;nrf_drv_timer_disable that will result in a pending interrupt that denies the WFE from entering sleep mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>