<?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>Advertising and Fast ADC Sampling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9409/advertising-and-fast-adc-sampling</link><description>Hi,
I am a newbie. I understand that a similar question was asked earlier, but I couldn&amp;#39;t get an answer specific to my questions. My goal is to sample an analog signal at 40 KHz with 8 bit resolution, do some processing and advertise one integer value</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Sep 2015 13:55:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9409/advertising-and-fast-adc-sampling" /><item><title>RE: Advertising and Fast ADC Sampling</title><link>https://devzone.nordicsemi.com/thread/34717?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 13:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26f06ee5-6781-43be-8ca5-577c3f48ea6c</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;I think the limitation of ADC sampling frequency with the S110 softdevice is described sufficiently in &lt;a href="https://devzone.nordicsemi.com/blogs/481/using-the-adc-with-the-s110-softdevice/"&gt;this blog post&lt;/a&gt;. With second revision nRF51 it is, 150Hz-1kHz depending on the BLE load. With 3rd revision nRF51, it is approximately 2kHz.&lt;/p&gt;
&lt;p&gt;If you need continuous 40kHz sampling frequency, the only option is to go for nRF52 where the SAADC uses EasyDMA. If you need to sample only periodically, then you can use RK&amp;#39;s method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising and Fast ADC Sampling</title><link>https://devzone.nordicsemi.com/thread/34716?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 13:08:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ab8b71b-e605-4062-b8e3-61d94184c1df</guid><dc:creator>David Smoot</dc:creator><description>&lt;p&gt;What you did not mention is how you are timing your ADC acquisition.  Are you using a busy loop approach where you take a reading, sleep for 25uS (period of a 40KHz) and then acquire again or are you using a timer?&lt;/p&gt;
&lt;p&gt;If you use a busy loop, it will be much more sensitive to soft device events than a timer based approach.&lt;/p&gt;
&lt;p&gt;In a timer based approach, you set a timer for your sample period and use that timer to trigger the next acquisition.  That way the CPU spends as much time as possible &amp;quot;idle&amp;quot; and the soft device does not have to compete with 100% processor load of a no-op busy loop.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t promise 40KHz is achievable, I think it should be.  But if you can only achieve 1KHz, you&amp;#39;re probably doing it wrong.&lt;/p&gt;
&lt;p&gt;Hope that helps.
David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising and Fast ADC Sampling</title><link>https://devzone.nordicsemi.com/thread/34715?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 11:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cec317a-ea7d-4005-aea4-bd8d706ef8a5</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;How long for and how often do you need to do the sampling? The timeslot API will give you a fairly long slot if you ask for it, but you&amp;#39;ll get it at random times, the longer the slot you want, the more random the times you&amp;#39;ll get it.&lt;/p&gt;
&lt;p&gt;If all you&amp;#39;re doing is advertising the value, you could just turn off advertising, shutdown the softdevice, do your sampling and calculation, then turn it all on again and advertise your value until the next time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising and Fast ADC Sampling</title><link>https://devzone.nordicsemi.com/thread/34714?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 10:02:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62ad6eb1-6a71-4799-af27-2a565cecba7c</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;With the recent S110 softdevices I think the processor load is much less intensive. I&amp;#39;ve a setup working with sampling at around 1.5 kHz while having a fast connection. I use the timer event to send a PPI task to start ADC sampling and with high priority ADC IRQ get it before the next time it samples.&lt;/p&gt;
&lt;p&gt;If you are looking only for advertisements I would suggest going bare metal without Softdevice as this gives you much more control.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>