<?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>Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14995/help-needed-for-excessive-standby-current-for-spi-slave</link><description>Hello,
I am using the nRF51822 with SDK 10.0, S110 softdevice, and a SPI slave interface. The SPI slave interface works , but the standby power consumption of the nRF is high, ~300 uA . I suspect that the high speed crystal is running in the background</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jul 2016 09:21:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14995/help-needed-for-excessive-standby-current-for-spi-slave" /><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57225?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 09:21:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:214941aa-3f2a-4461-97e8-c237ec36f3c0</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Hi Yano, your problem seems like an issue we have seen with other customers. If you could open a new case here on Devzone I will help you to solve the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57226?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 15:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85694fd9-57ef-4b45-94a1-15f9b6340049</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;I resolved this issue by enabling pull-downs on MOSI, MISO, and SCK pins. I edited the file nrf_drv_spis.c to do this although it is maybe also possible to change the configuration of the pins after calling nrf_drv_spis_init()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57224?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2016 23:40:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77236277-2969-4f30-acdc-ef4e92531258</guid><dc:creator>Yano</dc:creator><description>&lt;p&gt;I&amp;#39;m seeing something very similar using an nRF52!
SPI enabled does not increase sleep current but after a single transfer the sleep current jumps by about 300uA. Disabling the SPI has no effect. I haven&amp;#39;t tried using pull-ups yet.
Have you resolved this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57223?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2016 18:56:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:725a8bb2-93d8-4bef-b531-1e4f4fcecde9</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;Hi Ole,
I&amp;#39;ve since opened a support case - 30333 with more details and attached a IAR project that should demonstrate the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57222?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2016 08:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f47b1c83-a831-42d7-870b-03f42023ee34</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I tested the spi_slave example with sleep enabled (__WFE() inside for(;;){..}) from SDK 10 on nRF51 DK (PCA10028) with CSN connected to VDD and the current consumption was a couple of uA, where it should be. Have you tested the example (with sleep enabled)? What hardware are you running and what chip revision are you using (see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf51/dita/nrf51/compatibility_matrix/nRF51822_ic_revision_overview.html?cp=3_0_1"&gt;here&lt;/a&gt;)?&lt;/p&gt;
&lt;p&gt;There should be no need for pull up/down enabled on SPI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57221?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 15:11:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd921bb7-8d1c-47fc-b90b-633fa98f8f27</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;At this point it appears that the nRF does not handle floating SPI inputs well (MOSI, SCK) even when CSN is high. When pull downs were enabled on MOSI, SCK, the standby current fell significantly. The 10.0 SDK initializes these pins without pull up/down enabled (see nrf_drv_spis.c). It&amp;#39;s not unusual for a SPI Master to float SCK, MOSI when SPI is inactive, and of course the nRF SPIS floats MISO when CSN is high.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57220?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 12:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7a65a51-526c-4911-83de-44c9b778e9e7</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Have you tried the SPIS example? Is the current draw the same?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57219?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 14:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2663355-9e17-4bab-9add-524c3f5572c2</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;It appears that initialization of the SPI slave is causing the excessive current draw. And calling nrf_drv_spis_uninit afterward does not reduce the current.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57212?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 21:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d53539de-26b0-4806-90aa-926c3aa2c9ea</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;It appears that initialization of the SPI slave is causing the excessive current draw. And calling nrf_drv_spis_uninit afterward does not reduce the current.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57216?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 16:19:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:287f91d3-b8be-4052-99d3-a3a4ac4c4b84</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Stefan, you are correct. I was not looking at the code closely enough and missed that detail. My bad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57214?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 16:11:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:933ea26a-7041-4eea-b904-0bf7007c3d2d</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;This was also my understanding of how it is supposed to work. We initially had &amp;quot;true&amp;quot; (high accuracy) and the current was higher. Disabling high accuracy lowered the current significantly but not to the level we need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57218?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 16:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b14d547-2922-463c-bbaa-76ab9329632e</guid><dc:creator>Jim Hartmann</dc:creator><description>&lt;p&gt;Yes thanks, I&amp;#39;ve gone through the current consumption guide thoroughly and finally decided to post here because I feel I&amp;#39;ve tried everything.  I will try incrementally disabling initialization as you suggest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57215?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 15:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c05aca5-d5c5-472d-affd-cb6917a8872f</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;correct me if Im wrong John, but I was under the impression that using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;uses the PORT event, which is low current, while the&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;would use the GPIOTE IN events, which are high current.&lt;/p&gt;
&lt;p&gt;Seems like jhartmann is using the former.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57217?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 15:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dfe9899-a40f-406c-802e-7d990234bff4</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi jhartmann&lt;/p&gt;
&lt;p&gt;Have you looked at the &lt;a href="https://devzone.nordicsemi.com/tutorials/11/"&gt;nRF51 current consumption guide&lt;/a&gt;, troubleshooting section?  That could give some hints.  As stated in the nrF51 current consumption guide, the current consumption of the nRF51 SPIS should be very low when CSN line is set high, i.e. when the SPI master is not transmitting.&lt;/p&gt;
&lt;p&gt;I have seen high current consumption in the past when trying nRF51 SPIS connected to SPI master. That was because the nRF51 was powered through the SPIS configured GPIO pins (from the SPI master device) and did not power reset when I cut power from the board. I had to disconnect the SPIS pins from the SPI master, power reset, then connect the SPIS and SPI master together again. It is anyway also possible to reset the nRF51 with the command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfjprog --pinreset
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;so you dont need to disconnect the SPIS. Perhaps that does not apply directly to your case anyway as lack of reset after programming should add ~1mA but not the ~300uA that you are seeing.&lt;/p&gt;
&lt;p&gt;I have tested the SPIS current consumption when connected with another board that runs SPI master in SDK 11.0.0. It is low current. For that to happen, I have disabled constant latency mode and disabled logging. I have tried SPIS current consumption in older SDK versions and it has been low current as well.&lt;/p&gt;
&lt;p&gt;So my question, have you tried standard SPIS example in SDK 10 without softdevice, in order to see if you get low current consumption?&lt;/p&gt;
&lt;p&gt;Perhaps you can incrementally comment out initialization code in your example to see when you get the desired current consumption. That way you can narrow down what the source of the high current consumption is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed for excessive standby current for SPI slave</title><link>https://devzone.nordicsemi.com/thread/57213?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2016 13:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3152d14-cea6-49f0-b55d-f57ec4035570</guid><dc:creator>John</dc:creator><description>&lt;p&gt;It looks like you are using the GPIOTE IN event to wake your device. This is known to burn a lot of power on the nRF51822. You should use the PORT event instead if you need a lower power solution. Search this forum and you&amp;#39;ll find a lot of information on how to do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>