<?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>Problem with SAADC examples for audio sampling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21604/problem-with-saadc-examples-for-audio-sampling</link><description>I am using nRF52 pca10400 and I would sample some audio signal for short periods of time, but I found a lot of difficulties with the SAADC example from sdk 13, since if I put a value greater than 126 in SAMPLES_IN_BUFFER I get overflow. 
 
 I would</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Apr 2017 09:18:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21604/problem-with-saadc-examples-for-audio-sampling" /><item><title>RE: Problem with SAADC examples for audio sampling</title><link>https://devzone.nordicsemi.com/thread/84814?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2017 09:18:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09b96a21-2989-48e4-ab4d-57f31c3e5123</guid><dc:creator>stefano.luna</dc:creator><description>&lt;p&gt;Thank You Jørgen, your information were very useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with SAADC examples for audio sampling</title><link>https://devzone.nordicsemi.com/thread/84811?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 12:05:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c16bf11e-11d1-4414-baf1-0eb265fcf4e0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You can try to increase the UART string length &lt;code&gt;NRF_LOG_BACKEND_MAX_STRING_LENGTH&lt;/code&gt; and buffer size if using &lt;code&gt;NRF_LOG_DEFERRED&lt;/code&gt;, &lt;code&gt;NRF_LOG_DEFERRED_BUFSIZE&lt;/code&gt;. You can also try with a higher baudrate for the UART communication, &lt;code&gt;NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE&lt;/code&gt;. All these parameters can be configured in &lt;em&gt;sdk_config.h&lt;/em&gt;. You can also try using RTT as the backend for NRF_LOG, and use J-Link RTT Viewer to view the samples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with SAADC examples for audio sampling</title><link>https://devzone.nordicsemi.com/thread/84813?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 10:59:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:766cbd11-f592-4313-8ab8-f754b101c94d</guid><dc:creator>stefano.luna</dc:creator><description>&lt;p&gt;Hi, thanks for your support. I think that the overflow is from the logging to UART, and it&amp;#39;s good to hear. I fixed the sampling frequency to 50kHz (sampling time 20us) with nrf_drv_timer_us_to_ticks and I tried to run again the example with a buffer of 64 samples, obtaining this from the terminal:
The first event has correctly 64 samples but the second one has only 60 followed by overflows. How can we fix the UART overflow problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with SAADC examples for audio sampling</title><link>https://devzone.nordicsemi.com/thread/84812?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 07:38:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87e8d23f-ab84-4a9c-b8ae-ec9643969f1e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;What exactly do you mean by that you get overflow? Do the logging to UART overflow, or is there some issue with the sampling? There is also a function &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.0.0/group__nrf__drv__timer.html#ga357014cbc8a463dda16c6004ac63e20f"&gt;&lt;code&gt;nrf_drv_timer_us_to_ticks&lt;/code&gt;&lt;/a&gt;, which can be used for higher sample rates. You can also set the ticks parameter manually, by calculating the desired ticks from the frequency of the timer (16 MHz by default). You can find the documentation of the TIMER peripheral &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=2_2_0_23#concept_xbd_hqp_sr"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>