<?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>SAADC callback never called.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35109/saadc-callback-never-called</link><description>Hi, 
 I am trying to add the SAADC to an existing project. SDK 14.2 - Softdevice. 
 I quickly changed the existing code as follows: 
 
 
 Unfortunately, the callback gets never been called. 
 Please, what am I doing wrong? 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jun 2018 08:23:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35109/saadc-callback-never-called" /><item><title>RE: SAADC callback never called.</title><link>https://devzone.nordicsemi.com/thread/135085?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 08:23:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7db7446d-0749-4093-a7d6-df16da9680d2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I agree that it is not very intuitive. But it says on &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Fgroup__nrf__drv__saadc.html&amp;amp;anchor=ggacb8cd8eb1e8d4bec641bf487a9cbf8b5a208bb263ec3e0986652e0745519928c6" target="_blank" rel="noopener noreferrer"&gt;infocenter&lt;/a&gt;, and in nrf_drv_saadc.h (line 140) that the NRF_DRV_SAADC_EVT_DONE event is generated when the buffer is filled with samples. But to stumble upon that description is rather random &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC callback never called.</title><link>https://devzone.nordicsemi.com/thread/134962?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 13:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb4d167e-2bcc-49d5-b9db-38447c3a7274</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;Hi Edvi,&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;If SAMPLES_IN_BUFFER is equal to n, I have to call nrf_drv_saadc_sample() n times to get the callback been called.&lt;/p&gt;
&lt;p&gt;I usually use a fast timer and ppi to start the saadc and so far I haven&amp;#39;t realized that n saadc external activations are required to fill the buffer.&lt;/p&gt;
&lt;p&gt;Changing the timer interval to 2000ms in the saadc sample, the callback is called about every 10s (2000ms x 5). I simply thought that a sigle saadc activation was enough to automatically fill the buffer up.&lt;/p&gt;
&lt;p&gt;I think this behavior should be better documented in the SDK.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Fab.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC callback never called.</title><link>https://devzone.nordicsemi.com/thread/134926?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 12:04:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57f0b9e0-60d9-4c32-b013-15cf6ef2187d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What is your SAMPLES_IN_BUFFER size?&lt;/p&gt;
&lt;p&gt;If this is greater than 1, and you only call&amp;nbsp;nrf_drv_saadc_sample() once, it will not trigger the event. If you look in the saadc example in the SDK, you will see that it sets up a timer with the saadc to call the sampling function on regular intervals in the function saadc_sampling_event_init(). It uses the ppi, so it is a bit cryptic to read.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try to change your SAMPLES_IN BUFFER to 1, and you should see the event.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>