<?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>Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98747/enable-and-disable-adc-peripheral-of-nrf52840-to-save-power-in-nrf-connect-sdk</link><description>Is it possible to enable and disable the ADC peripheral of nRF52840 to save power in nRF connect SDK? In our application, we use ADC to get battery voltage samples after every 1 hour. I was thinking if it would be useful to enable and disable ADC peripherals</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Sep 2024 08:44:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98747/enable-and-disable-adc-peripheral-of-nrf52840-to-save-power-in-nrf-connect-sdk" /><item><title>RE: Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK</title><link>https://devzone.nordicsemi.com/thread/504125?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 08:44:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ed96a87-50e3-49ee-9779-427779fb8e36</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>[quote user="Robotics Gun"]1. To have the full control of the hardware like sleep mode in peripherials and easyDMA, etc, we should use nrfx drivers.[/quote]
&lt;p&gt;Yes, nrfx will give you full control of the peripheral, and might be required for some use cases (high sample rate/hard requirements on sample interval). The Zephyr ADC driver should be implemented in a way to reduce power usage when the peripheral is not in use. I would recommend you to have a look at the ADC lesson in &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-6-analog-to-digital-converter-adc/"&gt;nRF Connect SDK Intermediate course on DevAcadem&lt;/a&gt;y to learn more about this.&lt;/p&gt;
[quote user="Robotics Gun"]2.&amp;nbsp;If the answer for 1. is yes,&amp;nbsp;Zephyr RTOS APIs useful for resource controls like thread, semaphores, etc.[/quote]
&lt;p&gt;Yes, you can still use the RTOS functions from Zephyr and use nrfx drivers for controlling the peripherals.&lt;/p&gt;
[quote user="Robotics Gun"]3. Does Nordic have any plan to implment NRFX specific APIs for Zephyr underlayer implementation in the case of&amp;nbsp;Zephyr RTOS decided to introduced lower power sleep mode apis for each peripherals.[/quote]
&lt;p&gt;Not sure I understand exactly what you are asking here. Zephyr already implements a&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/test_and_optimize/optimizing/power_general.html#enable_device_power_management_module"&gt;Device Power Management module&lt;/a&gt;, which can be used to control the power state of peripherals. Most of the Zephyr drivers implements support for device power management. If you chose to use the nrfx drivers, you will lose this support and needs to handle power management for the peripheral(s) yourself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK</title><link>https://devzone.nordicsemi.com/thread/500557?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 10:47:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98eba787-5c01-4883-9993-3bdca4c32621</guid><dc:creator>Robotics Gun</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/joh2"&gt;Jørgen Holmefjord&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for sharing this info.&lt;/p&gt;
&lt;p&gt;Now I have below conclusion and I want you to&amp;nbsp;review it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. To have the full control of the hardware like sleep mode in peripherials and easyDMA, etc, we should use nrfx drivers.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;If the answer for 1. is yes,&amp;nbsp;Zephyr RTOS APIs useful for resource controls like thread, semaphores, etc.&lt;/p&gt;
&lt;p&gt;3. Does Nordic have any plan to implment NRFX specific APIs for Zephyr underlayer implementation in the case of&amp;nbsp;Zephyr RTOS decided to introduced lower power sleep mode apis for each peripherals.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK</title><link>https://devzone.nordicsemi.com/thread/421101?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 15:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb7adff6-4fd6-474d-acb2-d4e343861a1c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;As far as I can see in the driver implementation, the Zephyr API will only sample the enabled channels once when the read function is called, which will make the SAADC peripheral go into the IDLE state once the sampling is completed. While in the IDLE state, the SAADC peripheral should consume relatively low current (few uA range). If you want to use more advanced features, the nrfx API can be used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK</title><link>https://devzone.nordicsemi.com/thread/420850?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 17:38:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad38fb90-f9ca-410b-ba22-936095ef2a01</guid><dc:creator>BilalAliAhmad</dc:creator><description>&lt;p&gt;I am using Zephyr ADC APIs. Does that means the Zephyr driver does that automatically? Like ADC does not draw any power when we are not sampling any data?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable and Disable ADC peripheral of nRF52840 to save power in nRF connect SDK</title><link>https://devzone.nordicsemi.com/thread/420844?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 16:10:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3bb27a7-fe57-459b-85dc-cc5eda4c8b36</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using the Zephyr ADC APIs, or are you using the NRFX SAADC driver API? The Zephyr API does not have any functions to uninit the SAADC, but the NRFX driver does have a uninit function. Are you experiencing high current consumption? Optimally, the Zephyr driver should not have high current consumption between sampling, but this depends a bit on your configuration.&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></channel></rss>