<?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>Problem Waking Up MCU from interrupt after disabling TWIM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92892/problem-waking-up-mcu-from-interrupt-after-disabling-twim</link><description>I have a nrf52832 custom board that I program using sandeepmistry Arduino core. Nothing to do here, I know it&amp;#39;s Arduino but everything still works under the Nordic basis in the end.. 
 I have an ADXL345 (accelerometer) connected to the TWIM (I2c) bus</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Oct 2022 13:49:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92892/problem-waking-up-mcu-from-interrupt-after-disabling-twim" /><item><title>RE: Problem Waking Up MCU from interrupt after disabling TWIM</title><link>https://devzone.nordicsemi.com/thread/391009?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 13:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:977cf985-a3db-43a8-82ce-53bbf18ff685</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Toni,&lt;/p&gt;
&lt;p&gt;Thank you contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;You have presented 3 different scenarios. I wanted to understand your issue and the measuring setup a bit more and at the same time would like to provide some information that might be useful.&lt;/p&gt;
&lt;p&gt;1) If you want to achieve lower power by disabling a device, you must first stop it. The STOP task may not always be needed (the peripheral might already be stopped), but if it is sent, we should wait till STOPPED event is received before disabling the device through the ENABLE register.&lt;/p&gt;
&lt;p&gt;2) Can you elaborate about your power consumption numbers. Specifically:&lt;br /&gt; (a) How / What setup you are using to measure. These numbers are peak or averages? &lt;br /&gt; (b) These numbers represent power consumption of whole SoC or your custom board?&lt;br /&gt;TWIM interface (nRF52832) has 50uA run current in active mode (0.05mA).&lt;/p&gt;
&lt;p&gt;3) It depends on your chip version as well, but nRF52832 Revision 3 Errata has this information that &amp;quot;Static current consumption of 0.4mA-0.5mA happens when using TWIM with GPIOTE&amp;quot;. I can see that you have incorporated the workaround mentioned there.&lt;/p&gt;
&lt;p&gt;4) In your first case, MCU is in sleep state, but TWIM is enabled. Do you have other peripherals running / active / enabled?&lt;/p&gt;
&lt;p&gt;5) In the second case, MCU is in sleep state, but TWIM has been disabled. I would like to see your minimal working code and dig into registers to see what&amp;#39;s happening and when.&lt;/p&gt;
&lt;p&gt;6) In your third case, MCI is in wait state using WFE. WFI and WFE can be different in the deep-down implementation. It also makes sense from your power dissipation results as well. Nonetheless, WFE is more relevant for multicore situation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;7) If case#1 is putting MCU in sleep, and only TWIM is enabled, and you report 0.66mA. How much mA before putting MCU into sleep?&lt;/p&gt;
&lt;p&gt;Can you please elaborate &amp;quot;How you are measuring power&amp;quot;, &amp;quot;Which SDK version you are using&amp;quot;, and I would like to see your minimal working code to check on my DK and measure using PPK. You can attach your project as a zip file.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>