<?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>Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15037/debugging-power-using-on-nrf52</link><description>Hi, 
 I&amp;#39;ve got an application running on an nRF52, and it&amp;#39;s calling sd_app_evt_wait() from the main loop - and it&amp;#39;s staying in that function pretty much all the time. 
 However, measuring the current drawn across the nRF current measurement jumper gives</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Jul 2016 11:58:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15037/debugging-power-using-on-nrf52" /><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57385?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 11:58:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d51fd98-ad92-4666-b07e-87af6d1ca72d</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ahh, thanks. Unfortunately I&amp;#39;m not using Keil - but even so it looks like it&amp;#39;s a matter of checking each individual peripheral in turn :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57384?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 11:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:108589ff-4c56-409d-a19a-6bf937c2287f</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Follow &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;this question&lt;/a&gt; to enable debug mode. In a Keil debug session you can press&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Peripherals -&amp;gt; System Viewer -&amp;gt; [YOUR DESIRED PERIPHERAL]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Set a breakpoint at sd_app_evt_wait() and observe the register values in the right hand bar. You can also use a multimeter to monitor current (a bit rough, won&amp;#39;t work for high speed changes, but sometimes enough to estimate).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57383?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 11:47:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfe8d88d-e8d4-4cd7-95c6-893aa9a67083</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ok, thanks! So is there a way to debug this? For instance suppose I forgot to stop TIMER1 but I didn&amp;#39;t know that - is there a register that I could read the value of that would tell me which devices were causing the HF clock to stay on - or do I have to check every single device individually?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57382?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 11:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec7d1701-09ca-4fa1-a2cc-6afce00fd64a</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Unfortunately no, as it is differs a lot depending on application. Essentially you just want to release resources when you are done using them. The &lt;a href="https://devzone.nordicsemi.com/tutorials/19/"&gt;application time tutorial&lt;/a&gt; explains how to do this for the applciation timer. For the  TIMER you will want to clear the timer and stop it by calling, make sure to also clear pending interrupts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_TIMER1-&amp;gt;TASKS_CLEAR = 1;
NRF_TIMER1-&amp;gt;TASKS_STOP = 1;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57381?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 10:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:823e6713-6f84-426e-8ba7-75c4e919572c</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Ok - thanks - do any of the examples in Nordic&amp;#39;s SDK do this, so I can see how it is done? All examples I&amp;#39;ve found so far just use &lt;code&gt;sd_app_evt_wait&lt;/code&gt; - so I assume that all of those will draw so much power they are not usable on a battery?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57387?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 10:31:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00843dac-26eb-4d53-8a24-e31eb56f5784</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Yes, this is right. You have to manually turn it off before calling sd_app_evt_wait if you do not need it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57386?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 09:52:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a70ecaa-0de6-43fd-9b1e-ed3a802f6f7c</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Thanks! But how do I do that? I was under the impression that HFCLK was turned off automatically by the hardware and/or &lt;code&gt;sd_app_evt_wait&lt;/code&gt; if it was possible to do it? I thought that if it was on, it was left on because some hardware was using it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging Power using on nRF52</title><link>https://devzone.nordicsemi.com/thread/57380?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 08:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cbac91d-e032-4893-a194-531453fb0392</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Likely you are running the HFCLK which consumes current on this order, try disabling it before you go to sleep.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>