<?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 Scan Mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11998/saadc-scan-mode</link><description>I want to use three ADC-inputs on my nRF51832 Engineering Sample B. I read that it is possible to define several ADC-Channels and if a ADC Sample is triggered all Channels are sampeld. That would be great, but how it is possible to find out which measured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jun 2016 09:56:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11998/saadc-scan-mode" /><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45420?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 09:56:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73793a17-f7b2-4702-84b7-34a27c24558c</guid><dc:creator>KingKarl237</dc:creator><description>&lt;p&gt;I think there are several problems.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;check SAMPLES_IN_BUFFER mus be equal to the number of channels or higher.&lt;/li&gt;
&lt;li&gt;Which 2 examples are you talking about? my code and the Code from the SDK?&lt;/li&gt;
&lt;li&gt;nrf_drv_saadc_buffer_convert is called inside of the callback, so one time with pool 0 and one time with pool 1.
Oh i realised your problem.  m_buffer_pool has just 2 elements. Thats for get ready the next buffer inside of the callback. the number of channels is used in Samples_in_Buffer.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45417?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 08:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de942f9d-987c-458d-a2dc-f65015fd37b8</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;Why we have to call nrf_drv_saadc_buffer_convert(m_buffer_pool[],SAMPLES_IN_BUFFER); only for m_buffer_pool 0 and 1 but not for 2?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45418?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 08:17:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ac98046-cc86-436e-9428-a6438dbd9f14</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;@Kingkarl237: With this example I will never get into the saadc_callback handler. Do I have to set some settings? Because with the peripheral example from SDK 11.0 I will get into the saadc_callback handler. UPDATE: With 2 channels its working. But with 3 not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45416?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 06:22:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbed950a-f010-4f00-a01a-8c1467d2223b</guid><dc:creator>KingKarl237</dc:creator><description>&lt;p&gt;@Inspectron: The problem described in the Question is fixed in SDK 11. The additional Question in the Comments was caused by a Copy&amp;amp;Paste-Failure.
The Example i used is the SAADC Example in the Peripheral Folder, you just have to add the additional ADC-Channels.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45419?ContentTypeID=1</link><pubDate>Sun, 19 Jun 2016 17:13:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ded13c8-6d4d-427a-b3a3-7e422a079d86</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;Is this now fixxed? I would like to use the scan mode and I have SDK 11.0. And is there an example? I have 3 GPIO which I need to measure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45415?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 13:54:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bec45397-cb43-4592-a2a7-59920bcc4cc7</guid><dc:creator>KingKarl237</dc:creator><description>&lt;p&gt;Oh no! It was a Copy &amp;amp; Paste Error -.- Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45412?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 13:14:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abc3892f-01d1-42a9-85e4-912a1fc6c2b8</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I have also tested on PCA10036 and it does not seem like there is any issues with this board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45414?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 13:13:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37754ff6-5444-4eb3-8639-3f08b4461237</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;AIN3 is also used by CTS signal in uart, so I would advise you to not use that, use for example AIN4 instead. Channel_3_config is not configured, you are configuring channel_0_config, so channel_3_config will be all zero when you init channel 3.&lt;/p&gt;
&lt;p&gt;I was testing on PCA10040 v0.9.0 which uses engineering B chip (see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/compatibility_matrix/ic_rev_comp_with_dev_hw.html?cp=2_1_3"&gt;here&lt;/a&gt;). I noticed I said wrong in the answer, I will update this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45413?ContentTypeID=1</link><pubDate>Tue, 17 May 2016 07:00:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39670d67-1574-4d20-ac81-18d551b54067</guid><dc:creator>KingKarl237</dc:creator><description>&lt;p&gt;&lt;a href="https://www.dropbox.com/s/7iipcllevqt4wns/main.c?dl=0"&gt;Here&lt;/a&gt; i have used the SAADC Example.&lt;/p&gt;
&lt;p&gt;Behaviour here is:&lt;/p&gt;
&lt;p&gt;AIN1 and AIN2: normal
AIN0: doesnt work
AIN3: Applys to AIN3 and AIN0.
Tested on the pca 10036.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45410?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 13:45:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d0bfe59-8a8d-41ed-9cc6-c105819ef018</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I just tested with 4 channels and it works like it should. Can you send me the code you are using (in a c file, &lt;strong&gt;not&lt;/strong&gt; in the comment)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45411?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 07:13:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2210513b-e3d5-4339-a22d-e93356b525af</guid><dc:creator>KingKarl237</dc:creator><description>&lt;p&gt;Thanks that solved the problem.
But in the meanwhile i upgraded to SD 132v2 and SDK 11 and now i want to sample 4 channels and i have the same Problem. Sampling 3 channels worked. The Code is basically the same like above, just initialising 4 channels and having now SAMPLES_IN_BUFFER = 4;
Are the channels limited to 3? nrf_drv_saadc_channel_init gives NRF_SUCCESS .
I start the sampling simply with nrf_drv_saadc_sample(); every 10ms.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Scan Mode</title><link>https://devzone.nordicsemi.com/thread/45409?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2016 15:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b11df563-7b5c-4720-99a5-c74e53c02e23</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The values should come in the channel order (initiated with nrf_drv_saadc_channel_init(uint8_t channel, ...)). If SAMPLES_IN_BUFFER is 6 you will get: ch0, ch1, ch2, ch0, ch1, ch2.&lt;/p&gt;
&lt;p&gt;SDK 11.0.0-2.alpha has a bug that seems to be present if the array size is equal to the number of channels or a multiple of the size. The reason for this bug is that the engineering A chip (PCA10036) did not have the scan mode in hardware, so the scanning was done manually.&lt;/p&gt;
&lt;p&gt;The bug is fixed (I just tested it) in the next version of the SDK which should be out very soon. For now you can set SAMPLES_IN_BUFFER to be larger than the number of channels.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>