<?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>Using SAADC with Zigbee and NRF Connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77329/using-saadc-with-zigbee-and-nrf-connect-sdk</link><description>I am trying to figure out how to use the SAADC component of the nRF52840 to measure an analogue input and report it as an attribute in a Zigbee end device. I have, so far, failed to find an example that will compile using the latest development environment</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jul 2021 12:47:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77329/using-saadc-with-zigbee-and-nrf-connect-sdk" /><item><title>RE: Using SAADC with Zigbee and NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/320263?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 12:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8655aef-fd2a-4868-a11a-28359e44e5cf</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m happy to help and glad you got it working :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An even better approach than using a semaphore is to use a work queue, like it&amp;#39;s done here:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/too1/ncs-peripheral-uart-adc/blob/d575cdb9a2e0d7e5f0984a6a228bcb0d3a6f1a7c/src/main.c#L564"&gt;https://github.com/too1/ncs-peripheral-uart-adc/blob/d575cdb9a2e0d7e5f0984a6a228bcb0d3a6f1a7c/src/main.c#L564&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SAADC with Zigbee and NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/320259?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 12:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79361e2b-5950-4943-ae97-18af4d8c3058</guid><dc:creator>IanAber</dc:creator><description>&lt;p&gt;Many thanks Simon. It looks like the main problem was that you had the adc_read call inside the interrupt service routing which is what was causing the errors I was seeing which didn&amp;#39;t make any sense at first. Using a semaphore and putting the adc_read in the main thread got it working for me. I really appreciate the great support and speedy fixes. You are a gold mine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SAADC with Zigbee and NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/320237?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 11:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1cda6fd-17f6-47d4-a614-83f03993ee97</guid><dc:creator>Simon</dc:creator><description>[quote user="IanAber"]&lt;p&gt;The tutorial say...&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The tutorial supports these boards:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;→&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf91_dk%2FUG%2Fnrf91_DK%2Fintro.html&amp;amp;cp=2_0_4"&gt;nRF9160 DK&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;→&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf5340_dk%2FUG%2Fdk%2Fintro.html&amp;amp;cp=3_0_4"&gt;&lt;span&gt;nRF5340 DK&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am using the nRF25840 DK. What do I have to do to make the tutorial apply to that board, if it is possible.&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;I modified the ADC sample from the tutorial to support the nrf52840 dk, check it out here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/light_5F00_controller.zip"&gt;devzone.nordicsemi.com/.../light_5F00_controller.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/simon-iversen/sdk-nrf/tree/light_controller/samples/light_controller"&gt;https://github.com/simon-iversen/sdk-nrf/tree/light_controller/samples/light_controller&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote user="IanAber"]The battery example does not appear to be a Nordic project useable in Segger, unless I am missing something obvious, so I tried using the command line tools to build it with west. It built OK but when I tried to program it, west complains about a missing utility called nrfjprog which does not appear to be part of the NRF Connect SDK.[/quote]
&lt;p&gt;Install the nRF Command Line Tools, then nrfjprog will get installed as well:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download#infotabs"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download#infotabs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SAADC with Zigbee and NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/320121?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 22:29:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b3b6512-4b3f-46f1-9060-2c766de0df44</guid><dc:creator>IanAber</dc:creator><description>&lt;p&gt;The tutorial say...&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The tutorial supports these boards:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;rarr;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf91_dk%2FUG%2Fnrf91_DK%2Fintro.html&amp;amp;cp=2_0_4"&gt;nRF9160 DK&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;rarr;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf5340_dk%2FUG%2Fdk%2Fintro.html&amp;amp;cp=3_0_4"&gt;&lt;span&gt;nRF5340 DK&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am using the nRF25840 DK. What do I have to do to make the tutorial apply to that board, if it is possible.&lt;/p&gt;
&lt;p&gt;The adc samle specifically states that is is NOT compatible with Nordic hardware and points to the battery example you listed. The battery example does not appear to be a Nordic project useable in Segger, unless I am missing something obvious, so I tried using the command line tools to build it with west. It built OK but when I tried to program it, west complains about a missing utility called nrfjprog which does not appear to be part of the NRF Connect SDK.&lt;/p&gt;
&lt;p&gt;Is there some example that can be made to work with the nRF52840DK simply?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SAADC with Zigbee and NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/319605?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 13:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51d3667e-c9f5-4482-bd42-02121476bc19</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Check out these Zephyr ADC samples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v2.6.0-rc1-ncs1/samples/drivers/adc"&gt;zephyr/samples/drivers/adc&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v2.6.0-rc1-ncs1/samples/boards/nrf/battery"&gt;zephyr/samples/boards/nrf/battery&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is also an ADC sample in the NCS tutorial:&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0#h185sjwm5882m1bcimiad82dnf4kcy0b"&gt;https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0#h185sjwm5882m1bcimiad82dnf4kcy0b&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>