<?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>Trying to use nrfx drivers to read an analog value under ncs 1.6.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78928/trying-to-use-nrfx-drivers-to-read-an-analog-value-under-ncs-1-6-0</link><description>Hello 
 I am following a beginners tutorial on youtube and trying to implement simplest possible example of reading an analog value. 
 I want to use the nrfx library to do this and I am running SES under NCS 1.6.0 
 
 It seems like the nrfx library has</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 Aug 2021 12:57:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78928/trying-to-use-nrfx-drivers-to-read-an-analog-value-under-ncs-1-6-0" /><item><title>RE: Trying to use nrfx drivers to read an analog value under ncs 1.6.0</title><link>https://devzone.nordicsemi.com/thread/327432?ContentTypeID=1</link><pubDate>Tue, 31 Aug 2021 12:57:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bc16cff-baa0-47fb-99f2-093945691a2f</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Sorry for the late reply&lt;/p&gt;
&lt;p&gt;Ok, in that case, please take a look at these links for examples on how to use the nrfx driver:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/einarthorsrud/nrfx_saadc_v2_multi_channel_ppi/blob/e136e4307530cd93bf74193979684bae9511da1b/main.c"&gt;This is not the simplest possible example, but it is written by a Nordic employee, so I know it is good.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/daxlar/remote/blob/1a24935879a9fe97668dfca224215eaf98cf5f4a/pca10056/blank/ses/joystick.c"&gt;This is a simpler implementation I found. It is not written by a Nordic employee, but seems ok at first glance.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Take a look at those, and let me know if you have any trouble.&lt;/p&gt;
&lt;p&gt;The issues you are having with the macro can probably be solved like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  const nrfx_saadc_channel_t channel_config = NRFX_SAADC_DEFAULT_CHANNEL_SE(NRF_SAADC_INPUT_AIN2, 0);

  err_code = nrfx_saadc_channel_config(&amp;amp;channel_config);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Both the examples I linked also appear to run nrfx_saadc_init() before running nrfx_saadc_channel_config()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use nrfx drivers to read an analog value under ncs 1.6.0</title><link>https://devzone.nordicsemi.com/thread/327043?ContentTypeID=1</link><pubDate>Fri, 27 Aug 2021 17:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff7763b4-2926-4427-959b-ff80a53f511e</guid><dc:creator>JonasForssell</dc:creator><description>&lt;p&gt;Hello &amp;Ouml;ivind,&lt;/p&gt;
&lt;p&gt;First I would like to complement all the support personnel at Nordic for your always pleasant and helpful support. I really appreciate it.&lt;/p&gt;
&lt;p&gt;We are using the nrf5340 in a development project at my company. It is a fantastic piece of hardware. We selected it for two reasons: 1. It has the possibility of developing custom wireless protocols. 2. It has very powerful low level peripherals.&lt;/p&gt;
&lt;p&gt;For 1. we are using the nrfx libraries. For 2. I am trying to do the same but it has been difficult due to the shift to Zephyr and ncs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The controller I am writing for 2. will require very fast PWM response (where Zephyr level was too slow) and which I finally solved with the support from Nordic&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/78461/faster-nrf53-pwm-frequency-update-through-zephyr"&gt;in this ticket&lt;/a&gt;&amp;nbsp;and I would really like to keep the ADC development on the same level and not bring in Zephyr. In fact I have tried to go down further to an even lower level&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/79003/minimalist-setup-for-nrf5340-programming---almost-works"&gt;in this ticket&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Many thanks!&lt;/p&gt;
&lt;p&gt;/Jonas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use nrfx drivers to read an analog value under ncs 1.6.0</title><link>https://devzone.nordicsemi.com/thread/326661?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 07:55:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a76a2c2b-8172-4005-9a26-aaf1396c59c8</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That video showcases the nRF5 SDK, while the nRF5340 only uses the newer nRF Connect SDK. With NCS, using the nrfx driver directly is a lot more complicated than using the zephyr api for the driver. Have you looked at the adc sample located at zephyr/samples/drivers/adc? This overlay file should get the sample working with the nrf5340dk:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8357.nrf5340dk_5F00_nrf5340_5F00_cpuapp.overlay"&gt;devzone.nordicsemi.com/.../8357.nrf5340dk_5F00_nrf5340_5F00_cpuapp.overlay&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Rename the file to just &amp;quot;nrf5340dk_nrf5340_cpuapp&amp;quot; if it is downloaded with a different name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>