<?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>Absolute Beginner In need for Step-by-Step Help configuring SAADC for LOW POWER sampling of single input</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45686/absolute-beginner-in-need-for-step-by-step-help-configuring-saadc-for-low-power-sampling-of-single-input</link><description>I&amp;#39;ve been chasing my tail trying to figure this out, and thought I&amp;#39;d have better luck making a post instead. I could REALLY use your help! If you can merely point me in the right direction, or give me a heads up on possible roadblocks I can expect, anything</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2019 07:14:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45686/absolute-beginner-in-need-for-step-by-step-help-configuring-saadc-for-low-power-sampling-of-single-input" /><item><title>RE: Absolute Beginner In need for Step-by-Step Help configuring SAADC for LOW POWER sampling of single input</title><link>https://devzone.nordicsemi.com/thread/183650?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 07:14:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:617e0f1c-36bf-4855-9227-572598ee120c</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;You could use the &lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power#documentation"&gt;github example&lt;/a&gt; as a reference. I would rather use the latest nRF5 SDK SAADC example to get started. See the documentation at the bottom of the github example for clarification:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;This application is one of several applications that has been built by the support team at Nordic Semiconductor, as a demo of some particular feature or use case. It has not necessarily been thoroughly tested, so there might be unknown issues. It is hence provided as-is, without any warranty.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But at the end of the day, it is up to you! If you can live with the demo nature of the example, you could start with the github example.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The example should work out of the box on the 52840 DK.&lt;/p&gt;
&lt;p&gt;2) Have you tried with values less than 12? Does a buffer size of 10 samples work for example? Could you also maybe consider decreasing the buffer size to 1 &amp;amp; then doing averaging in the saadc handler, like explained in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14583/nrf52832-saadc-sampling#post-id-84158"&gt;this great answer here&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;3) No, you won&amp;#39;t need to use the &amp;quot;Advertising&amp;quot; feature on nRF Connect. Just scan for the Nordic UART device (i.e. your 52840 DK), connect to it &amp;amp; follow the testing documentation &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_nus_eval.html?cp=5_0_4_2_2_24"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Absolute Beginner In need for Step-by-Step Help configuring SAADC for LOW POWER sampling of single input</title><link>https://devzone.nordicsemi.com/thread/182336?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 10:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aff0a3bd-a16f-48cb-bd10-356382fbd4b7</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;&lt;span&gt;Sorry for the delayed response. I have been on a business trip last week &amp;amp; am now on vacation. Due to lower staffing over Easter, there may be some delays in answering questions. DevZone will be fully staffed on the 23rd of April. You can expect a response latest on the 24th of April. Sorry for any inconvenience caused.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Absolute Beginner In need for Step-by-Step Help configuring SAADC for LOW POWER sampling of single input</title><link>https://devzone.nordicsemi.com/thread/181700?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 16:19:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ce30a5-2db7-489d-bb69-d25b5d1faf4f</guid><dc:creator>fibanaccii</dc:creator><description>&lt;p&gt;&lt;b&gt;(&lt;/b&gt;&lt;b&gt;URGENT&lt;/b&gt;&lt;b&gt;)&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;General:&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Are either of these good reference /a better starting point? &lt;/span&gt;&lt;b&gt;ble_app_uart__saadc_timer_driven__scan_mode example:&lt;/b&gt; &lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power"&gt;&lt;span style="font-weight:400;"&gt;https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;saadc_low_power example:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power#documentation"&gt;&lt;span style="font-weight:400;"&gt;https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power#documentation&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Seems to do exactly what I need: Activate sampling when needed, turn off when not needed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 1a. From your previous response in (3) you mentioned I would need to integrate the ADC into the ble_uart example and &amp;nbsp; &amp;nbsp; the above saadc_lower_power examples &amp;ldquo;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;contains a code example that shows nrf52 SAADC scan mode and how to integrate SAADC with softdevice.&amp;rdquo; Is this what you meant? &lt;/span&gt;&lt;span style="font-weight:400;"&gt;If so, should I instead reference this ex?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt; Testing with the SAADC example you recommended, I noticed I can have =&amp;lt; 5 samples in the buffer (print 5 ADC readings at a time for every event). My end goal is to have 12, and changing the one variable&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;#define SAMPLES_IN_BUFFER from 5 to 12 doesn&amp;#39;t give me any output. I assume this is because there are other variables with restrictions that communicate with this one -&lt;span style="text-decoration:underline;"&gt; what other things should I change to get my expected 12?&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;App side:&lt;/b&gt;&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt; I&amp;rsquo;ve only been able to test communication between my dongle and the ble_uart_ex running on my DK. So far I can feed in a hex number and obtain the expected output in the SEGGER terminal emulator. &lt;/span&gt;&lt;b&gt;Great!&lt;/b&gt;&lt;span style="font-weight:400;"&gt; But when it comes to using nrF Connect over bluetooth, I&amp;rsquo;ve had no progress (tested both with an iPhone and iPad). The wireless connection with my DK times out within less than 10 seconds. I get the error message: &amp;ldquo;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;Disconnected from device 67:3C:CB:DF:69:C2, reason: BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION.&amp;rdquo; my goal is to send data from the dongle or DK to be displayed on my iPad, so this means I&amp;rsquo;d be using the &amp;lsquo;Advertising&amp;rsquo; feature on the iPad, correct?&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Absolute Beginner In need for Step-by-Step Help configuring SAADC for LOW POWER sampling of single input</title><link>https://devzone.nordicsemi.com/thread/180488?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 12:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6621940c-7e6e-4d97-8761-f4184472684f</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;1) If you want to use SEGGER RTT, just change the sdk_config.h&amp;nbsp;from uart to rtt, which means:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_LOG_BACKEND_RTT_ENABLED 1
#define NRF_LOG_BACKEND_UART_ENABLED 0
&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;Also make sure that NRF_LOG_ENABLED is set to 1. You can then use the debug terminal (press F5) to debug directly via Segger &amp;amp; receive logging information to Segger. &lt;a href="https://www.youtube.com/watch?v=uP8RYgYGRvI&amp;amp;list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV&amp;amp;index=7"&gt;This video&lt;/a&gt; may also be helpful.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;2) If you are referring to a Bluetooth communication from the 52840 DK (or 52840 dongle) to the mobile phone, you could either use nRF Connect or nRF Toolbox. I would probably go with nRF Connect. If you are referring to the wired RTT communication between the 52840 DK &amp;amp; the Segger IDE (Segger Embedded Studio), then see answer 1.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;3) If you want Bluetooth communication, you will need to use the softdevice, as this is the Nordic BLE stack implementation. The S140 softdevice is the one needed for the 52840 device (both DK &amp;amp; dongle).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I would take a look at the SAADC example from nRF5 SDK v15.3 (&lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/nrf_dev_saadc_example"&gt;see documentation here&lt;/a&gt;). The S140 softdevice will automatically get programmed to the DK when you use any BLE example for the 52840 (i.e. pca10056) (e.g. nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_uart\pca10056\s140). Since the SAADC example does not use a softdevice (because it is only a peripheral example), I would recommend using the ble_peripheral uart example as a starting point &amp;amp; then adding the SAADC functionality to the UART example. Before you start adding code to the uart example, I would test both out separately &amp;amp; make sure you understand the code.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;You can find the softdevice hex file here:&amp;nbsp;nRF5_SDK_15.3.0_59ac345\components\softdevice\s140\hex&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>