<?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>sd_app_evt_wait() doesn&amp;#39;t give microamps consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7157/sd_app_evt_wait-doesn-t-give-microamps-consumption</link><description>Okay, I know there&amp;#39;s a lot of threads about the subject. I have tried to read them all, with no help. My device still consumes 1.4 mA. Resetting does not help, so I assume it&amp;#39;s not the debug-mode issue. 
 There&amp;#39;s a lot of mentions that I should put all</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 May 2015 07:53:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7157/sd_app_evt_wait-doesn-t-give-microamps-consumption" /><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25290?ContentTypeID=1</link><pubDate>Tue, 26 May 2015 07:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7407e6b7-6520-4b1d-adc2-f0c10dcc304a</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Jarmo&lt;/p&gt;
&lt;p&gt;I have updated the current consumption guide, UART section, in order to better address your concerns.&lt;/p&gt;
&lt;p&gt;I assume that current consumption is not important for you when you are debugging. Therefore, you can just make a condition to have the UART enabled constantly when debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25289?ContentTypeID=1</link><pubDate>Tue, 26 May 2015 05:13:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02afd4dc-d430-4804-8bf7-512e670b3b2f</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Thanks for that update! Yes, I know there&amp;#39;s leakages in the external circuitry, at some point we have to study the reasons. I looked your guide and it looks good :) However, could you quickly answer how do I need to re-enable UART after getting back from sd_app_evt_wait()? I mean that if I do as follows:&lt;/p&gt;
&lt;p&gt;NRF_UART0-&amp;gt;TASKS_STOPTX = 1;
NRF_UART0-&amp;gt;TASKS_STOPRX = 1;
NRF_UART0-&amp;gt;ENABLE = 0;
sd_app_evt_wait();
NRF_UART0-&amp;gt;ENABLE = 1;&lt;/p&gt;
&lt;p&gt;Is that enough to continue operating with UART, e.g. using your simple_uart_put() example code? Yes, no doubt this is a trivial question and there&amp;#39;s comprehensive documentation, but just to save a bit of my time... :)&lt;/p&gt;
&lt;p&gt;In my case I want to have debug access from UART (+FTDI/USB) but still want to minimize current consumption, of course.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25288?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 09:41:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2441e1d9-b298-4be2-b481-0955700f8fee</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Jarmo&lt;/p&gt;
&lt;p&gt;All peripherals are per default off, and only peripherals that have been explicitly enabled will be on at any time. I have updated the &lt;a href="https://devzone.nordicsemi.com/question/5186/how-to-minimize-current-consumption-for-ble-application-on-nrf51822/?answer=5187#post-id-5187"&gt;current consumption guide&lt;/a&gt;, section &amp;quot;Setup of SPI, UART, TWI interfaces&amp;quot; to more specifically address your concerns.&lt;/p&gt;
&lt;p&gt;If you get 48uA in System OFF, that is not normal, that should be ~0.6uA. This leads to that you have leakage current either on a connected GPIO or programming interface. Try to disconnect all external circuits from the nRF51 and disconnect any potentially connected programmer. Have you gone through all the points in the &amp;quot;Troubleshooting&amp;quot; section in the &lt;a href="https://devzone.nordicsemi.com/question/5186/how-to-minimize-current-consumption-for-ble-application-on-nrf51822/?answer=5187#post-id-5187"&gt;current consumption guide&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25287?ContentTypeID=1</link><pubDate>Thu, 21 May 2015 10:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b42825e7-52c6-4ef1-9fec-724e56bd41d2</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Thanks, it looks like UART was using most of the power. Now I can achieve acceptable level :)&lt;/p&gt;
&lt;p&gt;Yes, you are right that underscores are the traditional coding style for plain C. I got familiar with those at around 1988. It is really partially matter of what you get used to, but having read different kind of coding styles all these years, I personally favor camelCase. For my eyes, it is just more readable i.e. consumes less brain power... ;-) (I guess the difficulty to distinguish between a space and an underscore causes the incoherence.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25284?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 13:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be40657-dfc9-4e1f-99ff-f2aaeb00b645</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;If you read the product spec you&amp;#39;ll see that while TX or RX are &amp;#39;START&amp;#39;ed it needs the HF Clock which consumes lots of power (how much is in the product spec too). Using the simple uart code you&amp;#39;ll see if you hunt through it that RX is started when you start the uart but only stopped when the uart deactivate call is called, and what that is depends a bit on which driver you&amp;#39;re using. look for the TASKS_STOPRX task being written, that&amp;#39;s what disables it again.&lt;/p&gt;
&lt;p&gt;And the underscores are a very long-standing C convention. CamelCaseIsForJavaAndObjectiveCProgrammers. It&amp;#39;s not modern, it&amp;#39;s just different, and I&amp;#39;m sure you&amp;#39;ll get very used to reading the underscores after a while.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25286?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 12:53:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6087281-d8a6-4153-87bf-877e6ddbffa5</guid><dc:creator>RK</dc:creator><description>&lt;pre&gt;&lt;code&gt;NRF_TWI-&amp;gt;POWER=0
NRF_UART-&amp;gt;POWER=0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;etc. turns modules entirely off&lt;/p&gt;
&lt;p&gt;Of course once they are truly off they aren&amp;#39;t going to do anything at all, send out data, send interrupts etc. Usually you don&amp;#39;t want to power them off in order to enter app wait() (which is really just __wfe) but you want to power them off when they have finished doing their current task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() doesn't give microamps consumption</title><link>https://devzone.nordicsemi.com/thread/25285?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 12:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd1f261e-9002-485c-8117-7ecd1648ef3c</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;It looks like at least UART is causing part of the issue. If I leave away this call:
simple_uart_config(RTS_PIN_NUMBER, TX_PIN_NUMBER, CTS_PIN_NUMBER, RX_PIN_NUMBER, false)&lt;/p&gt;
&lt;p&gt;The consumption drops to 100 uA and below. But since I need UART, I would like to know how to switch it off before entering sd_app_evt_wait()?&lt;/p&gt;
&lt;p&gt;(By the way, those old-fashioned underscores make your code very hard to read because of visual unclarity. Consider switching to modern coding style, like SdApp_evtWait()...)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>