<?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>Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42609/disabling-qspi-draws-much-current-sdk15</link><description>Hello, 
 I know this question has been asked but it&amp;#39;s still unanswered, and I kind of need a solution... 
 On our custom board, I removed power from Flash and kept sending SPI commands*, then uninit QSPI and it works as expected: 
 
 783uA if I don&amp;#39;t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Jan 2019 09:40:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42609/disabling-qspi-draws-much-current-sdk15" /><item><title>RE: Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/thread/168404?ContentTypeID=1</link><pubDate>Tue, 29 Jan 2019 09:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f467c04-4ae5-4052-912e-ba145788118c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;That&amp;#39;s strange, the CS line should be held high after the last transaction has finished and until the uninitialization of the driver puts the CS line into a high impedance state. Maybe there&amp;#39;s a leakage to ground from the CS line, creating a weak pulldown that sets the line to ground potential once the CS pin is in its high impedance state.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/thread/168280?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2019 14:24:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcc23ad4-4ebc-45b8-a0f7-0d18a635a538</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;I finally found where the issue comes from after some tests I thought that Flash was actually awake as current was around 2mA. (Nice shot &lt;a href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All I had to do was to set CS line to GPIO output, and high level.&lt;/strong&gt;&lt;br /&gt;Then uninit QSPI and it goes well.&lt;br /&gt;Flash might be woke up when trying to uninit.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;    // uninit qspi
    nrf_gpio_cfg_output(QSPI_CS2);
    nrf_gpio_pin_set(QSPI_CS2);

    nrfx_qspi_uninit();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Best&lt;br /&gt;Cyril&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/thread/168261?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2019 13:43:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2c5c6b7-8df0-4373-b9c5-9bbe14c4adf9</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;Offset 0x500: ENABLE still equals 0x1 which is not normal.&lt;br /&gt;After QSPI uninit, &lt;strong&gt;it is actually 0&lt;/strong&gt; but then it goes back to 1 for any reason.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will update the ticket soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/thread/168194?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2019 11:28:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3cee2fa-1f48-4bdb-8e62-2cda11bf4b7e</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT: Bug found. CS line has to be set high before QSPI uninit, otherwise Flash was woke up.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;FYI, Flash is Macronix mx25r64 on our board.&lt;/p&gt;
&lt;p&gt;Here are the results of my measurements:&lt;/p&gt;
&lt;p&gt;Flash consumption:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Flash init and powered off (0xB9 command): 7uA going&amp;nbsp;through&amp;nbsp;Flash&lt;/li&gt;
&lt;li&gt;Flash not init: 1.975mA going through Flash&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All system consumption:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Flash init / our system in off state: 670uA&amp;nbsp; (&lt;strong&gt;EDIT: I re-enabled QSPI during my tests which wasn&amp;#39;t the expected behavior, see post below&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Flash removed / our system in off state: 90uA&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Meaning, when I communicate with the Flash using QSPI, it consumes about 500uA and never goes back to normal.&lt;/p&gt;
&lt;p&gt;Here is the code powering down Flash:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_qspi_cinstr_conf_t cinstr_cfg = {
        .opcode    = CMD_DEEP_PWRDOWN,
        .length    = NRF_QSPI_CINSTR_LEN_1B,
        .io2_level = true, /* High level during transmission */
        .io3_level = true, /* High level during transmission */
        .wipwait   = true,
        .wren      = false};

    uint32_t err_code = nrfx_qspi_cinstr_xfer(&amp;amp;cinstr_cfg, NULL, NULL);
    APP_ERROR_CHECK(err_code);
    
    nrfx_qspi_uninit();
    &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I comment&amp;nbsp;&lt;span&gt;nrfx_qspi_uninit();&lt;strong&gt; I still have 670uA.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Here is a memory dump corresponding to the QSPI registers &lt;strong&gt;once uninit&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2019_2D00_01_2D00_28-12_2D00_17_2D00_43.png" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2019_2D00_01_2D00_28-12_2D00_18_2D00_35.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know if you find something wrong. (&lt;strong&gt;EDIT: something is wrong, QSPI is enabled&lt;/strong&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/thread/166165?ContentTypeID=1</link><pubDate>Thu, 17 Jan 2019 09:17:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:088b6f88-dc38-44ec-9c8e-7e917eae7093</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;I broke 2 on my Power Profiler Kit (values have&amp;nbsp;a huge&amp;nbsp;offset)... waiting to get a new one and I will get all that answers for you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disabling QSPI draws much current SDK15+</title><link>https://devzone.nordicsemi.com/thread/166157?ContentTypeID=1</link><pubDate>Thu, 17 Jan 2019 08:56:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:782ed55d-7fc3-490b-bf56-51b711aad45b</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Are you measuring the current of both the nRF52840 and the ext flash? If so I suggest you isolate the two devices and measure the current consumption of each individually. This will help you determine which device has the excessive current consumption.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You should also halt the CPU after you&amp;#39;ve shut down the QSPI peripheral and read the QSPI registers, I&amp;#39;d like to see the state of the various registers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>