<?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>nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92817/nrf5340-saadc-power-consumption</link><description>I&amp;#39;m profiling the current consumption of our device, on an nRF5340 module, at SDK 2.1.0. 
 So far as I can tell, the ADC is using approximately 1000 uA. It&amp;#39;s sampling via PPI, and is triggered from an external clock signal at 1 kH. 
 The current consumption</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Dec 2022 15:58:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92817/nrf5340-saadc-power-consumption" /><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/399503?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 15:58:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62bac47d-f090-4e0c-ad8f-2fa72d2ddc80</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen, that&amp;#39;s really helpful.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve tried my interrupt test code on the dev kit, and now get something like I was getting on our custom hardware.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Without the Signal Generator connected, I get ~18 uA with a spike every second when the CPU wakes up and immediately goes back to sleep. That&amp;#39;s pretty much what I expect, although I&amp;#39;ll double check the current figure.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/HV-Mode-Sleep.png_2D00_640x480.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With the sig gen connected and at 1000 Hz, I get about 580 uA, with the same sort of 3 mA spikes as I was getting before - except these are at 1 kHz, which matches the sig gen.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/HV-Mode-Interrupt.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zoomed in it looks like this&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/HV-Mode-Interrupt-zoomed.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So it looks like I get similar behaviour on the dev kit to what I get on our own board. But the spikes are at a lower frequency, so the overall current consumption is a bit lower.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ETA: current consumption increases even more if I change the gpiote interrupt config - In my test code I had set the pullup to&amp;nbsp;&lt;/span&gt;NRF_GPIO_PIN_NOPULL and&amp;nbsp;hi_accuracy to false while trying to get to the bottom of the current draw.&lt;/p&gt;
&lt;p&gt;Setting the pull&amp;nbsp;back to&amp;nbsp;NRF_GPIO_PIN_PULLUP I&amp;#39;m now getting just under 650 uA, and setting high accuracy mode to true it jumps to 1.4 mA.&lt;/p&gt;
&lt;p&gt;One thing I want to check with you though - I&amp;#39;ve now cut both SB 40 and SB 41, I assume I need to put a jumper across whichever one I&amp;#39;m &lt;em&gt;not&lt;/em&gt; using to power the nRF53?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/399455?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 14:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d43c36b-fa35-4587-9789-9ec2c28194d2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have not done much current measurements in high voltage mode, but what worked for me was to put the &amp;quot;nRF power source&amp;quot; switch in USB position, cut SB41 (VDD_HV) on the DK, then connect Vout from PPK2 to the upper pin of VDD_HV, the GND pin from PPK2 to &amp;quot;-&amp;quot; pin of external supply, then set the PPK2 application in source meter mode. All other switches are in default positions.&lt;/p&gt;
&lt;p&gt;Could you check if this works on your end as well? It could be beneficial to program a BLE example or similar to the board until you get the current measurements working correctly, then you can see the spikes when the radio is active (for instance at the advertising or connection interval).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/398097?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 12:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fee623fc-2848-49e8-8367-a4ddc1c443f7</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Can you talk me through how to measure the power consumption via the external supply? So far the only way I&amp;#39;ve managed to get sensible current measurements off the Dev Kit is using the PPK in source meter mode, and powering the nRF chip via the current measurement pin following &lt;a href="https://infocenter.nordicsemi.com/topic/ug_ppk2/UG/ppk/measure_current_ampere_meter.html"&gt;this&lt;/a&gt; method.&lt;/p&gt;
&lt;p&gt;If I want to use the PPK in Source Meter mode to measure High Voltage mode, it looks like I can just connect VOut on the PPK to + and GND to - on the external voltage pins, but then I&amp;#39;m not sure what to do with the nRF POWER SOURCE switch, the POWER on/off switch, and the two micro-switches on the bottom of the dev kit (VEXT-&amp;gt;nRF and nRF ONLYDEFAULT).&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting more-or-less what I expect if I set VEXT-&amp;gt;nRF to off, and nRF ONLYDEFAULT to what I think is on (switch is to the left, where the dot is). Then power and power source don&amp;#39;t seem to make any difference, and I get ~3.5 uA when the CPU is in sleep mode (as in, the main function exits, no tasks or interrupts configured).&lt;/p&gt;
&lt;p&gt;Does that sound right? If so, I can try again with different test code and&amp;nbsp;see if I can&amp;nbsp;reproduce the same ~900 uA current draw.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/397950?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 16:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716d08e1-2a1a-41d9-ab73-66a7360a82d8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you tried running the DK in high-voltage mode (through nRF_USB or external supply), to see if you see the same current consumption there? See&amp;nbsp;&lt;a title="nRF5340 power source" href="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/power_source.html?cp=3_0_4_3_2_3"&gt;nRF5340 power source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I will check with our current experts if they have seen something like this. Could you share your schematics for reference?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/397254?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 16:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23b83389-5e34-45b3-9925-0eb6a9b05202</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi again - I&amp;#39;ve found another key bit of information.&lt;/p&gt;
&lt;p&gt;Our board powers the nRF5340 in High Voltage mode, whereas the dev kit is in low voltage mode. We&amp;#39;re then powering some of our peripherals off the chip&amp;#39;s VDD at 1.8 V.&lt;/p&gt;
&lt;p&gt;Even with all the external chips removed, and putting in a clock signal from the signal generator into our board, I&amp;#39;m still getting hundreds of uA more than I do on the dev kit.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, by connecting the PPK directly to VDD and bypassing the HVREG entirely, I get dramatically lower current - comparable to the dev kit.&lt;/p&gt;
&lt;p&gt;So it seems either we&amp;#39;ve done something very wrong in how we&amp;#39;ve powered the board for HV mode, or the HV regulator is doing something very wrong.&lt;/p&gt;
&lt;p&gt;As I understand it, all we need to do to be in HV mode is power the chip through the&amp;nbsp;&lt;span&gt;VDDH&amp;nbsp;pin, is that correct?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/396747?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 17:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1494df1-7e44-4244-9b02-58106eb6022d</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;I&amp;#39;ve now got the dev kit attached to a function generator, and I&amp;#39;m getting similar current consumption to yours, although not exactly the same. But it seems to be in the region of 100 to 150 uA depending on the frequency.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve discovered that the RTC chip we use on our own board is powered from the VCC output of the nRF chip at 1.8 V. To do this we&amp;#39;re using the chip in high voltage mode. It also seems like it defaults to using the DCDC converters for voltage regulation instead of the LDO, which is not what it says &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fregulators.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But if I add&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_BOARD_ENABLE_DCDC_APP=n&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_BOARD_ENABLE_DCDC_NET=n&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_BOARD_ENABLE_DCDC_HV=n&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;to the prj.conf file, I get very different looking current consumption - and about 445uA on the dev board and 485 uA on our own board.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Any idea why it&amp;#39;s defaulting to using the DCDC? Or why (apparently) using the VCC output to power the RTC that triggers the interrupt might cause problems when the DCDC converters are on?&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I did also notice that the config for the interrupt pin included a pullup - I&amp;#39;ve now changed this to nopull and that seems to have made a small difference. But I&amp;#39;m still seeing 930 uA on our board, vs ~140 uA on the dev kit.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/396295?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2022 17:12:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fa20521-af47-414b-8394-5e14b35261ae</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Ok, I now have a PPK II which makes measuring current a lot easier.&lt;/p&gt;
&lt;p&gt;I can confirm that on our hardware I still see ~1 mA of current with the RTC at 1000 Hz. But at 500 Hz I get about 90 uA with occasional large spikes...&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/500_5F00_Hz_5F00_interrupt.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Those spikes, closeup, look like this&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668704198048v1.png" alt=" " /&gt;&amp;nbsp;or sometimes this&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/spike-closeup-_2800_1-Hz_2900_.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So it looks like *something* turns on with the big spike, then triggers one or more times before turning off again.&lt;/p&gt;
&lt;p&gt;The 1000 Hz RTC version looks like this&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1000_5F00_Hz_5F00_interrupt.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Which seems to just be the 3 mA spikes, at 2 kHz.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;At this point it looks like it must be our hardware doing this, except I can get sort of similar behaviour on my dev kit, by sleeping in a loop for a few milliseconds. Sleeping 1 ms in a loop looks like this&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/sleep-loop.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Those small sawtooth peaks are at about 1000 Hz, so correspond to the CPU waking up and immediately sleeping. Those bigger 3 mA spikes look similar to what I get on our board though, seemingly at random intervals...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have a signal generator to hand, so will try the dev kit on Monday to see if I can reproduce&amp;nbsp;the 1000 Hz behaviour on the dev kit.&lt;/p&gt;
&lt;p&gt;In the mean time - any idea what those 3 mA spikes might be? Particularly on the Dev kit current profile?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/395747?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 10:45:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6476b482-7012-4ae4-966a-b0e926620bdc</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi J&amp;oslash;rgen,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s encouraging, in a way. So far I haven&amp;#39;t managed to get a sensible-looking current measurement out of the DK board at all. I&amp;#39;m trying to use a scope across a 10 ohm resistor as described in the infocenter documentation, but I get even higher curent consumption than I do when I measure our own boards.&lt;/p&gt;
&lt;p&gt;It looks like something on the DK stays powered even when I&amp;#39;ve set it to only power the nRF53 - can you walk me through exactly how it needs to be powered and how to set the microswitches to measure just the nRF53?&lt;/p&gt;
&lt;p&gt;Alternatively it might just be easier to use the nordic PPK - I&amp;#39;ll see if we can order one.&lt;/p&gt;
&lt;p&gt;Other than that I just want to double check what SDK you used? I&amp;#39;ve been using 2.1.0. That&amp;#39;s the only thing I can think of apart from the hardware or my measuring setup that could be different.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rory&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT - the scope I&amp;#39;m using is a RIGOL DS1054Z which doesn&amp;#39;t have a differential input mode, so I&amp;#39;m relying on the math function to get the difference between two channels. It seems like I can either have low resolution on the two channels, meaning the&amp;nbsp;measurement noise is larger than the &amp;lt;1 mV signal I&amp;#39;m trying to measure, or I can have higher resolution, and the current measurement pins being at ~3V mean they&amp;#39;re both off the scale so I get no signal at all. We&amp;#39;ve ordered a PPK so hopefully I can get a measurement with that in a couple of days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/395318?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2022 12:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c967821c-198c-4076-aa41-91a00e974bde</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I tried your sample, but I&amp;#39;m not able to reproduce the behavior you are describing.&lt;/p&gt;
&lt;p&gt;I see the same current consumption, regardless of which pin I pass to&amp;nbsp;configureNrfxGpioInterrupt() (&lt;span&gt;KHZ_CLOCK_PIN or&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;UNUSED_INTERRUPT_PIN&lt;/span&gt;), the current draw is ~76 uA average without input (pin tied to GND), ~138 uA with 1 kHz input, ~101uA with 500 Hz input, and ~86 uA with 250 Hz input.&lt;/p&gt;
&lt;p&gt;Have you tested this on multiple nRF5340 modules? Have you reproduced it on a nRF5340 DK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/394654?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 11:35:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f9eb377-2b39-45ce-8aeb-037808cf0821</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Okay, this is the&amp;nbsp;project.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/minimal_5F00_interrupt.zip"&gt;devzone.nordicsemi.com/.../minimal_5F00_interrupt.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve left in the code to toggle a pin when the CPU wakes. The only other code in there is to enable the external interrupt, and then sleep in a while loop.&lt;/p&gt;
&lt;p&gt;I just checked the current, and I&amp;#39;m still getting ~1000 uA when it&amp;#39;s triggering from the&amp;nbsp;external RTC, and ~83 uA when it&amp;#39;s triggered from an unused pin.&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t checked the pin toggle, but the other day it was triggering once per second for about 80 us, which corresponds with the while loop waking up and sleeping again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/394649?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 10:59:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8357b71b-a9fd-4b30-96c8-6ad6d4a90a8a</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll put together the minimal version of the code today (mostly just removing all the extra stuff I&amp;#39;ve got commented out!).&lt;/p&gt;
&lt;p&gt;Bear in mind that you&amp;#39;ll need an external square wave source to generate the clock signal - without that present the current draw is fairly low, it&amp;#39;s only when the interrupt is triggered at ~1000 Hz that we get 1 mA of current draw.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rory&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/394634?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 10:03:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03908ebf-a53a-47d9-a3ae-3b44ef82ff93</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi Rory,&lt;/p&gt;
&lt;p&gt;Would you be able to share your test sample with me? Then I could try it out on my board and see if I can figure out what is causing the higher current consumption.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/394218?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2022 15:06:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:381ea48e-cd32-4d30-bf3f-3121c18c67f2</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve managed to get a pin toggle from the sleep enter/exit events. In my test code I can see a 40 uS pulse when the CPU is awake&amp;nbsp;with an interval of 1&amp;nbsp;second. That corresponds to the 1000 ms sleep in a while loop that I have at the end of my test main function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The rest of the time the CPU is off, so the ~1 mA current draw must be solely down to the GPIO interrupt.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Some of that I suspect is down to the nrfx gpiote config - I think I can save a few hundred uA by using the nrf_gpiote library, triggering off a high or low signal instead of an edge, and&amp;nbsp;changing the latency.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;nbsp;looks to me like, since it&amp;#39;s not the CPU, something to do with the GPIO is keeping the HF oscillator on in between interrupts.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rory&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/393446?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 12:16:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:679c22e0-7b78-4c93-bc84-f70855276a70</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Those&amp;nbsp;&lt;a title="EVENTS_SLEEPENTER" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/power/doc/power.html?cp=3_0_0_3_5_0_5#register.EVENTS_SLEEPENTER"&gt;EVENTS_SLEEPENTER&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a title="EVENTS_SLEEPEXIT" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/power/doc/power.html?cp=3_0_0_3_5_0_6#register.EVENTS_SLEEPEXIT"&gt;EVENTS_SLEEPEXIT&lt;/a&gt;&amp;nbsp;sound useful - I&amp;#39;ll give that a try to confirm how long the CPU is asleep/awake.&lt;/p&gt;
&lt;p&gt;Just to clarify, the current consumption above is in the sample button project with the code to initialise our external RTC copied in, and the interrupt changed to the RTC pin on our board. I also swapped the interrupt code to use nrfx_gpiote in the same way as our main project.&lt;/p&gt;
&lt;p&gt;As far as I&amp;#39;m aware there shouldn&amp;#39;t be any interrupt callback actually running, as&amp;nbsp;&lt;code&gt;&lt;span&gt;nrfx_gpiote_in_event_enable&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;pin&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;); &lt;/span&gt;&lt;/code&gt;will mean it doesn&amp;#39;t actually call the handler.&lt;/p&gt;
&lt;p&gt;Since all it does is&amp;nbsp;initialise the RTC and enable the interrupt, there shouldn&amp;#39;t be any other code running. I&amp;#39;m assuming that when the&amp;nbsp;interrupt fires&amp;nbsp;it wakes up the CPU, there&amp;#39;s no ISR and no PPI/SAADC configured either, so it should just go straight back to sleep.&lt;/p&gt;
&lt;p&gt;I opened &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/93326/nrf5340-high-sleep-current-with-short-duration-sleep"&gt;this&lt;/a&gt; support request to try to get to the bottom of what might be going on with the CPU sleep without worrying about the SAADC, PPI, interrupts etc. and just looking at the current consumption if we sleep in a while loop. As I mentioned before, I was getting ~650 uA in the button sample project just sitting in a while loop sleeping for 1 ms at a time, but only 23 uA if I set the sleep time to 1000 ms.&lt;/p&gt;
&lt;p&gt;I guess based on your reply, it might be taking ~250 us to go back to sleep from a GPIO interrupt, and ~150 us to go to sleep when just sat in a while loop. At least that would be consistent with the current figures. Is that longer than you would expect?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/393433?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 11:20:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdb530f4-ccd9-4d89-a931-2f17c24638d0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you checked how long the execution time of the interrupt is? You can use GPIO toggling in the interrupt handler to check that, or toggle a GPIO at the end of the handler and compare this to the GPIO input. It is also possible to use DPPI and GPIOTE to toggle a GPIO from the POWER-&amp;gt;&lt;a title="EVENTS_SLEEPENTER" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/power/doc/power.html?cp=3_0_0_3_5_0_5#register.EVENTS_SLEEPENTER"&gt;EVENTS_SLEEPENTER&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a title="EVENTS_SLEEPEXIT" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/power/doc/power.html?cp=3_0_0_3_5_0_6#register.EVENTS_SLEEPEXIT"&gt;EVENTS_SLEEPEXIT&lt;/a&gt;&amp;nbsp;to see when the CPU is actually in sleep.&lt;/p&gt;
&lt;p&gt;If for instance the interrupt takes 250us to complete, the ~1mA avereage current makes sense as it will&amp;nbsp;make the&amp;nbsp;&lt;a title="Application CPU running" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/current_consumption/doc/current_consumption.html?cp=3_0_0_3_3_0_1#unique_1344442403"&gt;Application CPU running&lt;/a&gt;&amp;nbsp;about&amp;nbsp;25% of the time. This also makes sense for the 250Hz current. The 500Hz current does not make sense, but there could be some other error with this. Have you checked that the interrupt actually happens at 500Hz with this configuration? Is there anything in your application that corresponds with the rate that it toggles between high and low current consumption?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/392647?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2022 13:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c80a2a35-692d-4950-ab52-9ac70ec42d89</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Okay, I had the wrong idea a couple of days ago - in the sample button code, it sleeps for 1 ms in a while loop, and if I make that 1000 ms instead, the current consumption drops massively. I think that whole reply can be safely ignored!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now copied over our interrupt code, so I can test it in isolation from the rest of our code. If I initialise the interrupt using a spare unconnected pin, I get current consumption&amp;nbsp;of ~90 uA, and this is with the sense set to &lt;span&gt;NRF_GPIOTE_POLARITY_HITOLO, which I suspect means we&amp;#39;re doing edge detection, which adds&amp;nbsp;some extra current&lt;/span&gt;. So that&amp;#39;s encouraging.&lt;/p&gt;
&lt;p&gt;If I go back to using our external 1000 Hz RTC signal, I get just over 1 mA consumption. But I can set the prescaler on our external RTC to give different interrupt frequencies, and this is where things get weird...&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1666790338064v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The pink line is 1000 Hz interrupts, and just over 1 mA current. The blue line is 250 Hz interrupts, and about 220 uA. The purple line is 500 Hz and oscillates between ~90 uA and ~220 uA.&lt;/p&gt;
&lt;p&gt;(The low power at the beginning is 2.5 seconds of sleep, the code to set up our external RTC over spi, and then 2.5 seconds of sleep again)&lt;/p&gt;
&lt;p&gt;All I can think is that the timing of the MCU going to sleep somehow requires &amp;gt; 1 ms for it to kick in, and so at 1000 Hz interrupts, we never get there. Or rather, I guess the idle current still has the HF oscillator on for ~1 ms?&lt;/p&gt;
&lt;p&gt;This is the config/init code I&amp;#39;m using - so the interrupt is disabled, and so button_pressed shouldn&amp;#39;t be being executed. And I&amp;#39;ve done nothing to initialise the ADC or PPI.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfx_gpiote_in_config_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pin_interrupt_config&lt;/span&gt;&lt;span&gt; = {&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .sense = &lt;/span&gt;&lt;span&gt;NRF_GPIOTE_POLARITY_HITOLO&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .pull = &lt;/span&gt;&lt;span&gt;NRF_GPIO_PIN_PULLUP&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .is_watcher = &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .hi_accuracy = &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .skip_gpio_setup = &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrfx_gpiote_in_init&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;pin&lt;/span&gt;&lt;span&gt;, &amp;amp;&lt;/span&gt;&lt;span&gt;pin_interrupt_config&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;button_pressed&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrfx_gpiote_in_event_enable&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;pin&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/392229?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 16:42:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf01c2b6-b9b0-4054-a2a0-e76206036520</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;J&amp;oslash;rgen,&lt;/p&gt;
&lt;p&gt;I tried doing that last week, and although it stopped the ISR being called, it didn&amp;#39;t make much difference to the current (maybe 10 uA or so, but in context of &amp;gt;900 uA of current that&amp;#39;s not a lot).&lt;/p&gt;
&lt;p&gt;So I went back through my code&amp;nbsp;just commenting things out bit by bit to try to confirm exactly what part of enabling&amp;nbsp;it was causing all the current draw. It turns out&amp;nbsp;even initialising the interrupt causes a much higher current.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Today I&amp;#39;ve been looking at the basic button sample project to confirm if the interrupt is still a&amp;nbsp;problem without any of our code involved. Initially that was drawing 833 uA. I got that down somewhat to 632 uA by removing the LED code and changing it to use GPIO_INT_LEVEL_ACTIVE instead of EDGE_TO_ACTIVE to trigger the interrupt. But&amp;nbsp;while&amp;nbsp;searching for ways to reduce the GPIO interrupt power consumption I found for example &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/73132/nrf5340-gpio-interrupt-and-low-power-problem"&gt;this&lt;/a&gt;&amp;nbsp;where they&amp;#39;re complaining about a 100 uA current. So it still seems way too high.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve added a k_msleep call before doing anything in the button sample code, and I can see that&amp;#39;s got a current consumption of about 22 uA. So that implies it&amp;#39;s not anything on our board drawing excess power. And I&amp;#39;ve confirmed the interrupt doesn&amp;#39;t get triggered, so it&amp;#39;s also not that the sample code is connected up to some floating voltage and getting triggered at random, so it seems to be genuinely a sleep current of hundreds of micro amps just from enabling the interrupt.&lt;/p&gt;
&lt;p&gt;The sample code is&amp;nbsp;using different API code as it&amp;#39;s using the gpio module, not nrfx_gpiote, and it seems to be using PORT not PIN events. So that might explain why it was at 833 initially not 900+ as in our main project.&lt;/p&gt;
&lt;p&gt;But I think it should be much much lower than that. Looking again at the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fchapters%2Fcurrent_consumption%2Fdoc%2Fcurrent_consumption.html"&gt;current consumption figures&lt;/a&gt;, it looks to me like it should be in&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sub class="ph sub"&gt;ON_IDLE4 &lt;/sub&gt;when waiting for an interrupt, which is 48 uA.&amp;nbsp;What I&amp;#39;m wondering is if somehow&amp;nbsp;it gets stuck in&amp;nbsp;&lt;span&gt;I&lt;/span&gt;&lt;sub class="ph sub"&gt;ON_IDLE3,128MHz &lt;/sub&gt;which is 785 uA, and the only thing I can see close to the power consumption I&amp;#39;m getting.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rory&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/391507?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 16:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65b8b9e5-b63c-4984-baf3-3ad6a327ed2a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The second argument to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/nrfx/drivers/gpiote/driver.html#c.nrfx_gpiote_in_event_enable"&gt;nrfx_gpiote_in_event_enable&lt;/a&gt;&lt;span&gt;() determines if the interrupt is enabled or not. If you set that to false, the pin should not generate interrupts.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/391475?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 14:37:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96bb9704-06a9-495b-a8a0-20aa7050673c</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;These are&amp;nbsp;the actual SDK calls we&amp;#39;re making, I&amp;#39;ve pulled them together from various files in our project but I think this covers all of it:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;static const nrfx_gpiote_in_config_t pin_interrupt_config = {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; .sense = NRF_GPIOTE_POLARITY_HITOLO,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; .pull = NRF_GPIO_PIN_PULLUP,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; .is_watcher = false,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; .hi_accuracy = true,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; .skip_gpio_setup = false,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;};&lt;/code&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;nrfx_gpiote_in_init(KHZ_CLOCK_PIN, &amp;amp;pin_interrupt_config, dummy_handler);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;nrfx_gpiote_in_event_enable(KHZ_CLOCK_PIN, true);&lt;/code&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;uint32_t clock_event_address = nrf_gpiote_event_address_get(NRF_GPIOTE, nrfx_gpiote_in_event_get(KHZ_CLOCK_PIN));&lt;/code&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;uint32_t task_address = nrf_saadc_task_address_get(NRF_SAADC, NRF_SAADC_TASK_SAMPLE);&lt;/code&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;ppi_init_channel_one(clock_event_address, task_address);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and &lt;code&gt;dummy_handler &lt;/code&gt;passed in to the&amp;nbsp;init function is an empty function.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did just remember we were previously calling&amp;nbsp;&lt;span&gt;&lt;code&gt;nrfx_gpiote_in_init&lt;/code&gt;&amp;nbsp;&lt;/span&gt;with NULL instead of a callback handler, but when I updated to&amp;nbsp;SDK 2.1.0 that started causing a hard fault as the SDK was attempting to execute NULL.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/391418?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 12:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf1a410b-6c82-454e-b6a5-853965cb57dc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>[quote user="isansys_rory"]I assume this is because either way the interrupt wakes the MCU to take a sample or generate a PPI event so we get more or less the same current draw. Is there an alternative way to generate a PPI event from a pin toggle without waking the MCU?[/quote]
&lt;p&gt;Can you post the code you used to configure the GPIOTE pin? Interrupt should only happen if interrupt for the GPIOTE channel is enabled in the code.&lt;/p&gt;
[quote user="isansys_rory"]&lt;p&gt;I did look at changing to a PORT event - am I right in thinking that&amp;#39;s set by the &lt;code&gt;hi_accuracy &lt;/code&gt;config option in the&amp;nbsp;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;nrfx_gpiote_in_config_t &lt;/span&gt;&lt;/code&gt;struct? I tried setting that to false and it didn&amp;#39;t make much of a difference, in fact increasing the current draw by 5-10 uA if I remember correctly.&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;If the CPU wakes up to handle an interrupt for every GPIO toggle, this will likely cause the majority of the current draw. When the GPIOTE PORT event is used with the GPIOTE driver, the driver will have to check the state of each pin in SW, which will likely cause the interrupt to take a bit longer to complete. If this should give any improvement, you would have to connect the PORT event directly to the PPI channel, and disable any interrupts for the PORT event in the GPIOTE peripheral and driver. Like I said before, this will prevent you from using the PORT event for other GPIOs, and you should only enable GPIO sense for the GPIO that should trigger the sampling.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/391394?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 11:02:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e8b0ca9-a164-473b-a902-d36b6bd605d0</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve not got much further with this, but from experimenting a bit with sampling in an interrupt, I&amp;#39;ve found that our current draw is mostly from the interrupt firing - even with the ADC off and an empty function for the ISR the current still jumps by about 1 mA. (~350 uA goes to ~1.33 mA)&lt;/p&gt;
&lt;p&gt;I assume this is because either way the interrupt wakes the MCU to take a sample or generate a PPI event so we get more or less the same current draw. Is there an alternative way to generate a PPI event from a pin toggle without waking the MCU?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My other thought is perhaps there are settings in zephyr governing sleep that I could tweak so the MCU goes back to sleep quicker?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did look at changing to a PORT event - am I right in thinking that&amp;#39;s set by the &lt;code&gt;hi_accuracy &lt;/code&gt;config option in the&amp;nbsp;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;nrfx_gpiote_in_config_t &lt;/span&gt;&lt;/code&gt;struct? I tried setting that to false and it didn&amp;#39;t make much of a difference, in fact increasing the current draw by 5-10 uA if I remember correctly.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks,&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Rory&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/390678?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2022 14:05:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0bc165f-4a05-4bbd-97a4-c694daf22b8b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="isansys_rory"]We haven&amp;#39;t changed the core clock, although from what I&amp;#39;ve found this morning it looks like it should default to 64 MHz.[/quote]
&lt;p&gt;Yes, looks like this is correct. As long as you have verified that the application does not change it, this should not be the problem.&lt;/p&gt;
[quote user="isansys_rory"]We&amp;nbsp;have an external RTC with a 32.0 kHz crystal to give us an exact 1kHz clock signal, which&amp;nbsp;we&amp;#39;re using via a GPIOTE interrupt to trigger the PPI task for sampling.[/quote]
&lt;p&gt;I assume you then are using the GPIOTE IN event, and not the PORT event? Due to this errata, it is not possible to use the LowPower setting for the GPIOTE IN event:&amp;nbsp;&lt;a title="This anomaly applies to IC Rev. Revision 1, build codes CLAA-D00, QKAA-D00." href="https://infocenter.nordicsemi.com/topic/errata_nRF5340_Rev1/ERR/nRF5340/Rev1/latest/anomaly_340_153.html#anomaly_340_153"&gt;&lt;span&gt;GPIOTE with low-power latency setting does not register IN events in System ON IDLE&lt;/span&gt;&lt;/a&gt;. The LowLatency option will give higher current consumption, but according to &lt;span&gt;I&lt;/span&gt;&lt;sub&gt;ON_IDLE4&amp;nbsp;&lt;/sub&gt;in &lt;a title="Sleep" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/current_consumption/doc/current_consumption.html?cp=3_0_0_3_3_0_0#unique_2095571962"&gt;Sleep current&lt;/a&gt;, this should not account for all the high current you are seeing. If you do not use the PORT event for any other GPIOs (like buttons, etc), it would also be possible to connect this to the PPI channel for a 1 kHz signal.&lt;/p&gt;
[quote user="isansys_rory"]The logic is that an internal RTC would either run on the HF clock thus requiring the HF oscillator to be on at all times, burning more power, or it would run on the LF clock at 32,768 Hz and we&amp;#39;d need to apply a correction to get exactly 1000 samples a second instead of 1024.[/quote]
&lt;p&gt;Yes, you are correct here. The RTC runs off the 32.768 kHz LFCLK and you will only be able to get 1024 or ~993 samples per second using this clock.&lt;/p&gt;
[quote user="isansys_rory"]Is it possible to run an internal RTC from an external clock source&amp;nbsp;on the Nrf53, and would that be more power efficient than using a GPIOTE interrupt?[/quote]
&lt;p&gt;The LFCLK or RTCs does not have support for external clock sources in nRF5340.&lt;/p&gt;
[quote user="isansys_rory"]Or might it be that&amp;nbsp;for some reason the SAADC/PPI is keeping EasyDMA on between samples, and therefore just taking a single sample in an ISR would be better, as&amp;nbsp;we could turn everything off between samples?[/quote]
&lt;p&gt;This was the case in nRF52 series, but I&amp;#39;m not 100% sure if this have changed in nRF5340. I will try to write a low power sample using PPI (without any stopping of the SAADC between sampling) to verify this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/390630?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2022 11:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d99b6f0-b05c-4a08-bc6f-641083b5c6c5</guid><dc:creator>Rory Morrison</dc:creator><description>&lt;p&gt;Hi J&lt;span&gt;&amp;oslash;&lt;/span&gt;rgen,&lt;/p&gt;
&lt;p&gt;We haven&amp;#39;t changed the core clock, although from what I&amp;#39;ve found this morning it looks like it should default to 64 MHz.&lt;/p&gt;
&lt;p&gt;We&amp;nbsp;have an external RTC with a 32.0 kHz crystal to give us an exact 1kHz clock signal, which&amp;nbsp;we&amp;#39;re using via a GPIOTE interrupt to trigger the PPI task for sampling. The logic is that an internal RTC would either run on the HF clock thus requiring the HF oscillator to be on at all times, burning more power, or it would run on the LF clock at 32,768 Hz and we&amp;#39;d need to apply a correction to get exactly 1000 samples a second instead of 1024. (Of course some of that logic may be wrong as it was based on our experience with a different MCU).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to run an internal RTC from an external clock source&amp;nbsp;on the Nrf53, and would that be more power efficient than using a GPIOTE interrupt?&lt;/p&gt;
&lt;p&gt;Or might it be that&amp;nbsp;for some reason the SAADC/PPI is keeping EasyDMA on between samples, and therefore just taking a single sample in an ISR would be better, as&amp;nbsp;we could turn everything off between samples?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rory&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SAADC power consumption</title><link>https://devzone.nordicsemi.com/thread/390591?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2022 09:19:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d887502-f980-4fd0-b1c3-5aff449ea8f8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;span&gt;LPOP&amp;nbsp;options should not have been included in the product specifications, as this is an internal-only option. The&amp;nbsp;LPOP&amp;nbsp;is by default set to LowPower, and it should not be necessary&amp;nbsp;to change this in the application. This will be fixed in the next release of the nRF5340 PS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you changed the application core&amp;#39;s clock from 128 MHz to 64 MHz, as described under &amp;quot;Voltage and frequency scaling&amp;quot; in&amp;nbsp;&amp;nbsp;&lt;a title="System ON mode" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/pmu/doc/pmu.html?cp=3_0_0_3_0#topic"&gt;System ON mode&lt;/a&gt;? Not doing this will increase the System ON sleep current significantly, as you can see in&amp;nbsp;&lt;a title="Sleep" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/current_consumption/doc/current_consumption.html?cp=3_0_0_3_3_0_0#unique_2095571962"&gt;Sleep&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When you say that the sampling is triggered by an external clock, do you use GPIOTE for triggering this? Have you tried triggering it using the internal RTC?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>