<?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>Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18174/why-there-is-no-easy-api-for-analog-input-of-nrf52-saadc</link><description>I am once again frustrated with nRF5 API&amp;#39;s. Getting a value from analog input pin is that simple with Arduino API&amp;#39;s: 
 int sensorValue = analogRead(A0);
 
 That&amp;#39;s all you mostly need. But guess how much code you need with Nordic Semiconductor&amp;#39;s SAADC</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Nov 2018 12:30:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18174/why-there-is-no-easy-api-for-analog-input-of-nrf52-saadc" /><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/156299?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 12:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9517cc4a-f400-4c82-b22f-708d2bf16228</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;OK, I see what you mean.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the future we are going to base the low lever drivers on the nrfx module. The API&amp;#39;s are essentially the same, but all the functions will have the &amp;quot;nrfx&amp;quot; prefix, rather than the &amp;quot;nrf&amp;quot; prefix.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/156192?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 14:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19e62e7c-2068-49fc-ab53-706a958e5756</guid><dc:creator>Tarak</dc:creator><description>&lt;p&gt;It&amp;#39;s okay thank you i found them. But since it&amp;#39;s not always easy to find the functions you use in your example in the newer SDKs so i was asking about their new names.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/156151?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 12:41:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2751be89-f8b4-4b2a-bb95-56fe136c1319</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am not quite sure I understand the question. nrf_drv_saadc_sample(), and the other SAADC function calls, are documented on the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/hardware_driver_saadc.html?cp=4_0_4_2_11_0#saadc_configuration"&gt;infocenter&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you elaborate on what you mean by &amp;quot;replacement functions&amp;quot; ?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/156018?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 16:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77fe64d0-99ad-49b7-a556-14f6125c19b1</guid><dc:creator>Tarak</dc:creator><description>&lt;p&gt;Hi, Ovrebekk , thank you for your version of the SAADC Sample example but just wanted to ask : since i&amp;#39;m working on the SDK 14.0, is there a document where the replacement functions as &amp;quot;nrf_drv_saadc_sample( )&amp;quot; are listed. Thank you !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70179?ContentTypeID=1</link><pubDate>Sat, 04 Nov 2017 12:38:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c212ed99-47e6-4ecf-8d5a-dfb55bbd5f34</guid><dc:creator>MikeLemon</dc:creator><description>&lt;p&gt;Hi, I came from the future and would just like to ask if maybe you have the source code of the main.c file or the same project for the SES IDE?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70182?ContentTypeID=1</link><pubDate>Sun, 09 Jul 2017 20:11:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ada82fe-a7b4-4349-b527-d187ec8289fa</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;It&amp;#39;s not a problem of readable but how long you have to search for it...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70174?ContentTypeID=1</link><pubDate>Sun, 09 Jul 2017 20:10:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4229c80-1ac1-48d5-8554-d397521472d9</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Hello, I agree with them. For creating a fast proof of concept, SDK is not as fast as Arduino way...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70173?ContentTypeID=1</link><pubDate>Sun, 26 Feb 2017 09:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a9de3ec-29a7-4112-86dc-96c18ed63d7d</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;Hi Jarmo. I had the same problem. I comes from the Pic MCU world. And in this compiler i need 3 lines to get an ADC Result. My problem is, i get no result, i cant read the analog value. I use also an example with hunderts of lines source for the ADC read :-)
You have an solution meanwhile?
Best Regards
Remo&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/117101/simple-analog-read-on-nrf52/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70178?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 16:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee2669bb-ab23-467c-b00c-a06b468863b1</guid><dc:creator>tahse</dc:creator><description>&lt;p&gt;Torbjørn, I found an answer on a different thread. For some reason an NRF_LOG_FLUSH(); in the main while loop does the trick. Any idea why?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70177?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 15:25:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d03170c-65a3-43bd-b224-3f69a452adbe</guid><dc:creator>tahse</dc:creator><description>&lt;p&gt;Torbjørn,
Thank you for the saadc_simpler example above.
The code was what I was looking for.
However, when I compiled and ran the original saadc example the RTT output worked after setting the flag in sdk_config.h.
Doing the same thing  with the saadc_simpler example gives no RTT output on J-Link RTT Viewer. (RTT Viewer does connect)&lt;/p&gt;
&lt;p&gt;Any thoughts on what I am missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70183?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2016 14:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf6abefd-8cb9-40de-9a1c-f1284d5e5926</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Good point Jarmo, the nrf_drv_saadc_sample_convert function makes it even simpler ;)
My own secret dream is to re-implement everything in C++, but I don&amp;#39;t think we are there yet...  :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70176?ContentTypeID=1</link><pubDate>Sun, 11 Dec 2016 11:27:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fb13a34-e016-4b7e-87b5-1d6c05701174</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Thank you! That was relatively understandable, yes. My solution uses nrf_drv_saadc_sample_convert(CHANNEL, &amp;amp;val) instead of *_buffer_convert() -function. So it is maybe still a single function call simpler than your example, eh?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70181?ContentTypeID=1</link><pubDate>Sun, 11 Dec 2016 11:20:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f10e5142-787c-44d7-bc43-86b52e237b9c</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;Thanks! Looks readable :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70180?ContentTypeID=1</link><pubDate>Sat, 10 Dec 2016 20:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5907389-c787-408e-ba41-58b4f51be4de</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;The register interface is quite simple to use directly.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example &lt;a href="https://github.com/andenore/NordicSnippets/blob/master/examples/saadc/main.c"&gt;github.com/.../main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70175?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2016 15:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf37bcc1-0a65-42cf-a9df-6704a7b1df66</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jarmo&lt;/p&gt;
&lt;p&gt;Thanks for your feedback. I agree calling this a &amp;quot;simple&amp;quot; example is a bit misleading. The idea behind the example is good in my opinion; to illustrate how you can use the PPI and a timer to achieve very efficient and reliable ADC sampling, but this is definitely not the easiest way to use the SAADC peripheral.&lt;/p&gt;
&lt;p&gt;I had a crack at making a simpler example, which you can download here:  &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/saadc_5F00_simpler.zip"&gt;saadc_simpler.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s still close to a 100 lines, with comments and all, but it should be considerably easier to follow the flow of the program.&lt;/p&gt;
&lt;p&gt;If you are still having issues with your code feel free to attach it here, and I will have a look at it.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why there is no easy API for analog input of nRF52 (SAADC)?</title><link>https://devzone.nordicsemi.com/thread/70172?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 15:14:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01dbb0e7-52f7-44ca-80f8-faad027b060a</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;And then you call it &amp;quot;SAADC HAL simple example.&amp;quot; - Don&amp;#39;t want to see your complex eamples, really.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>