<?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>SPI Consumption problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15239/spi-consumption-problem</link><description>I&amp;#39;m testing SPIM of nRF52 on PCA10040 using S132 and SDK11. 
 Its base on the app_peripheral_uart example, so I already have BLE communication. 
 When SPI is not initiated, current consuption is arround 370 uA, but when adding SPI it goes to 800uA.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Aug 2016 08:42:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15239/spi-consumption-problem" /><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58193?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2016 08:42:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9d00dd5-b199-4053-b74f-681d3bc5272d</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You can see if it uses DMA by checking (if 1 it uses DMA):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPI1_USE_EASY_DMA 1
#define TWI0_USE_EASY_DMA 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do you see current increase with SPI0 and TWI1 (when DMA is enabled)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58192?ContentTypeID=1</link><pubDate>Sat, 30 Jul 2016 00:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8b9de09-8b56-4788-aaed-96522f5c4ff8</guid><dc:creator>Cristian</dc:creator><description>&lt;p&gt;Yes, I meant SPIM, but in &amp;quot;nrf_drv_config.h&amp;quot; theres is no define for SPIM, that why I use SPI.
I&amp;#39;ve double cheked, and I&amp;#39;m getting around 420uA using this defines on  &amp;quot;nrf_drv_config.h&amp;quot;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TWI0_ENABLED 1
#define SPI1_ENABLED 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;m not sure about DMA enabled, as I&amp;#39;ve just used the drv functions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58191?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2016 13:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c605209-a2c3-4ea6-b495-7f7417fe6765</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;We have seen issues with SPIM0/1 and TWIM0/1 regarding this. The relevant errata for this can be found &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.Rev1.errata/anomaly_832_89.html?cp=2_2_1_0_1_26"&gt;here&lt;/a&gt;. We are still investigating this issue so it does not cover all use cases that will lead to increased current consumption (like using SPIM0/1). When we have more information we will update this issue.&lt;/p&gt;
&lt;p&gt;When you say SPIO or SPI1 you mean SPIM0 or SPIM1? We thought this issue was only with the DMA enabled SPI or TWI peripheral (SPIM/SPIS/TWIM/TWIS). It is also strange that you don&amp;#39;t see any problem with SPIM1 as this should also cause the current increase (only SPIM2 should not cause the current increase).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58194?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2016 03:12:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2e8652d-df8b-4a15-86d9-ac8ee7d7fc4b</guid><dc:creator>Cristian</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried changing to SPI2, but consumption changed just 50uA. Then I tried disabling TWI1 from nrf_drv_config.h (being that I already removed any call to twi driver) and now current consuption is as expected !!.
Anyway, I could not achieve this current with SPI0. Just SPI1 and SPI2 are correct.
I even was able to configure TWI0 without problem.
Is there any difference on SPI0?
Is there any known conflic between SPIx and TWI1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58190?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 15:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9931c24c-0a49-4fa4-815b-c68138816b2b</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Can you try to use SPI instance 2 instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPI_INSTANCE  2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and see if the current consumption goes down?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58189?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2016 01:16:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e97cdb7-06ef-487d-88d1-3d349545e5ae</guid><dc:creator>Cristian</dc:creator><description>&lt;p&gt;Hi, Thanks for your comments.&lt;/p&gt;
&lt;p&gt;I`ve followed your advise and disable everything (except for the timer) and power went down to 30uA.
So the first thing I enable again was the advertising, and consumption return to 800uA.
I imagine there is some interaction, but I dont know how to fix it.
I&amp;#39;ve tried enabling DCDC and also stopping HFCLK on the interruption routine. (by the way, I&amp;#39;ve debug CLOCK registers and HFCLK is being disable correctly after transfer ends, with no need to call &amp;quot;sd_clock_hfclk_release()&amp;quot;)&lt;/p&gt;
&lt;p&gt;Any thoughts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Consumption problem</title><link>https://devzone.nordicsemi.com/thread/58188?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 11:14:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4bf6b56-961a-4885-9299-bdfd3e4da9e1</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;It sounds like HFCLK is running all the time which leads to a current increase of 400-450uA. When the SPI transaction is done it should release the clock and the current should go down to what it was before the transaction.&lt;/p&gt;
&lt;p&gt;Try to only run the SPI code and see if the behavior is the same.&lt;/p&gt;
&lt;p&gt;PAN 23 is only present on &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.EngA.errata/err_832_new.html?cp=2_2_1_3_1"&gt;rev A chips&lt;/a&gt; (PCA10036) so no need to worry about that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>