<?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>SPIM3 transfer raises sleep current by 700 uA from then on</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66595/spim3-transfer-raises-sleep-current-by-700-ua-from-then-on</link><description>I have two SPI buses on my board, with a different type of slave chip on each. Only a few bytes are read from each during boot. When I use SPIM0, 1 or 2 for them there is no effect on the sleep current (about 2uA in my system). When I use SPIM3 for either</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Oct 2020 12:23:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66595/spim3-transfer-raises-sleep-current-by-700-ua-from-then-on" /><item><title>RE: SPIM3 transfer raises sleep current by 700 uA from then on</title><link>https://devzone.nordicsemi.com/thread/272517?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 12:23:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce1cc77-4040-454d-b370-7cf6e216c2d9</guid><dc:creator>Saxman58</dc:creator><description>&lt;p&gt;I replaced the register write with&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;nrfx_spim_uninit&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;spi&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;and that worked.&amp;nbsp; That also makes it more universal to work with any SPIM module selected for spi.&amp;nbsp; Thanks!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM3 transfer raises sleep current by 700 uA from then on</title><link>https://devzone.nordicsemi.com/thread/272512?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 12:11:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e8f89a6-ae54-4104-a914-1c68cdf0cac8</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;The SPIM3 HW implementation is in fact a bit different than SPIM0-2 (because of some resource sharing with TWI), so I suspect that the problem is due to some HW issues which are only present in SPIM3. I will report this internally so that we can try to figure out what is going on here. Anyways, I think it is good practice to disable the peripheral manually when not in use. You can check out the&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrfx__spim.html?cp=7_5_0_6_9_0_32_0_24#ga912743397b744b651978a342b3cc0564"&gt; nrfx_spim_uninit()&lt;/a&gt; function, which should be equivalent to using the ENABLE register. I also think it is good practice to stick with the nrfx driver and avoid using registers directly (unless it&amp;#39;s required by the errata workarounds). So if you can try the nrfx_spim_uninit() function with SPIM3 and see if that solves the issue instead of using the ENABLE register, I think that would be better. Or at least run the nrfx uninit before the register write, so that the driver is properly uninitialized first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM3 transfer raises sleep current by 700 uA from then on</title><link>https://devzone.nordicsemi.com/thread/272498?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 11:25:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7554607-d4a6-481c-8cd2-b62835969330</guid><dc:creator>Saxman58</dc:creator><description>&lt;p&gt;Yes, it is definitely the nRF52833.&amp;nbsp; I just tried adding&amp;nbsp;&lt;span&gt;NRF_SPIM3-&amp;gt;ENABLE = 0 to the end of the SPI transactions (without the extra register write in the workaround) and that was enough to get rid of the extra 700 uA.&lt;br /&gt;&lt;br /&gt;As you can see, I was using higher level code rather than direct register writes, and I didn&amp;#39;t see any function to disable an SPI like that direct register write does.&amp;nbsp; Since SPI0, 1, and 2 seem to stop using current when they aren&amp;#39;t in use, I assumed they were somehow being shut down by the SoftDevice or something.&amp;nbsp; Should I be using the ENABLE register to shut them down too?&amp;nbsp; It is curious that only SPIM3 continues to use current after a transfer with exactly the same code.&amp;nbsp; Does that indicate that some code in the SoftDevice for SPIM0-2 needs to be extended to SPIM3 as well?&lt;br /&gt;&lt;br /&gt;Anyway, the ENABLE register solve my problem, so thank you!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM3 transfer raises sleep current by 700 uA from then on</title><link>https://devzone.nordicsemi.com/thread/272487?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 11:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f1dc989-5e08-4a52-8141-4f218d16a0b3</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;So the chip you are using is actually nRF52833, not nRF52840? The reason I ask is because your description fits well with this errata: &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_195.html?cp=4_0_1_0_1_26"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_195.html?cp=4_0_1_0_1_26&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But it should be fixed on nRF52833. Anyways, maybe you can try the workaround and see what happens?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>