<?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>Problems with SAADC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46819/problems-with-saadc</link><description>Hello, I am trying to use SAADC with nrfx APIs and the ADC does not execute the conversion, and the callback function is never called. 
 Here is my code: 
 
 I am using also the GPIOTE functions from my other post (Example) 
 15.3 SDK, PCA10040 
 I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 May 2019 13:40:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46819/problems-with-saadc" /><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184924?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 13:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d11b610-0b58-4c01-b874-39254461495a</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Yes - the Arduino &amp;quot;A&lt;em&gt;x&lt;/em&gt;&amp;quot; is not directly related to nRF52832 &amp;quot;AIN&lt;em&gt;x&lt;/em&gt;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184921?ContentTypeID=1</link><pubDate>Thu, 02 May 2019 13:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e076323f-8c16-4984-813b-39bd9ef58918</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;&lt;a title="nrfx_saadc_sample_convert" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__saadc.html?cp=5_0_6_9_0_28_1_21#gab71a209892aedc84800887de200c5857"&gt;nrfx_saadc_sample_convert&lt;/a&gt; is a blocking call that disables the interrupts. See the function definition for details.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You need to use&amp;nbsp;&lt;a title="nrfx_saadc_sample" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__saadc.html?cp=5_0_6_9_0_28_1_20#gaf117e087540c455a6dfe05f258d118f0"&gt;nrfx_saadc_sample&lt;/a&gt;&amp;nbsp;to get a callback from the SAADC IRQ.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will also need to run&amp;nbsp;&lt;a title="nrfx_saadc_calibrate_offset" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__saadc.html?cp=5_0_6_9_0_28_1_14#gabebf4b2245bff5bc767b0e679702708d"&gt;nrfx_saadc_calibrate_offset&lt;/a&gt;&amp;nbsp;when you&amp;#39;re initializing the SAADC.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184721?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 19:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4a4b655-d0f0-46a0-ab8f-905656c37013</guid><dc:creator>danielb1194</dc:creator><description>&lt;p&gt;Thank you! That explains the A0 in the board then.. But the problem with the interrupt persist!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184720?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 19:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33367b7b-10bf-4e32-bb0a-aaa6c4390315</guid><dc:creator>danielb1194</dc:creator><description>&lt;p&gt;So, the problem with the interrupt persists, the interrupt is never triggered, I am probably missing a step from the SAADC example in the SDK, however I do not know which step this is (maybe I need to set the interrupt, or enable it but I dont know how)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184714?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 17:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa41f102-343b-4678-9990-3900565e1ce1</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&amp;quot;A0&amp;quot; is the Arduino reference.&lt;/p&gt;
&lt;p&gt;Fig 10 in the DK User Guide&amp;nbsp;shows you which port pin connects where:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1556732764965v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Fig 11 shows the Arduino references:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1556732820603v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;See also the &amp;quot;Pin Map&amp;quot; (Sheet 3) in the schematics:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1556732990772v3.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184712?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 17:27:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60a77658-b78e-4b15-869c-e620fc625fd8</guid><dc:creator>danielb1194</dc:creator><description>&lt;p&gt;This seems to be working alright now.. looks like the board silk screen is lying since A0 is not really A0 (or maybe I am wrong) but the product specification states that A0 is P0.02 and the PCA10040 silk screen indicates that it is P0.03.&lt;/p&gt;
&lt;p&gt;The product specification seems the be the ultimate source of truth in this case since now the ADC going from near zero when the input is like so. However the ADC still gives out negative numbers like -2 when near zero.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with SAADC</title><link>https://devzone.nordicsemi.com/thread/184710?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 15:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8afa3055-949e-4d8b-8bf0-bd2015ec60da</guid><dc:creator>danielb1194</dc:creator><description>&lt;p&gt;So i commented out the lines that configure the buffer, and the function &amp;quot;sample_convert&amp;quot; works, but gives incorrect results from -2 to 40 (decimal)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>