<?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>nRF52833 SAADC Transmitting full rate data over UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69311/nrf52833-saadc-transmitting-full-rate-data-over-uart</link><description>Hello Nordic Team, 
 
 i&amp;#39;ve been evaluating the nRF52833 and i have been having a lot of good success. i have been focused on the SAADC block to ensure it meets my performance needs. i have been able to configure the block and get good data at lower rates</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Dec 2020 10:16:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69311/nrf52833-saadc-transmitting-full-rate-data-over-uart" /><item><title>RE: nRF52833 SAADC Transmitting full rate data over UART</title><link>https://devzone.nordicsemi.com/thread/284275?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2020 10:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bbf764f-14d7-4ee3-8abf-b8116d1c2dff</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The logs get dropped because the internal log buffer have been filled before your application is able to process it. There are a few different ways to work around this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disable deferred logging, by setting&amp;nbsp;NRF_LOG_DEFERRED to 0 in your sdk_config.h file. Note that this will make logs being processed in-line, which may slow down your application.&lt;/li&gt;
&lt;li&gt;Increase the log buffer, by setting&amp;nbsp;NRF_LOG_BUFSIZE in your sdk_config.h file. I still see some logs dropped with your sample rate and buffer size set to&amp;nbsp;16384 in the SAADC example in SDK 17.0.2, but you can increase it even further if you have enough available RAM&lt;/li&gt;
&lt;li&gt;Remove overhead in the logs, for instance by using NRF_LOG_RAW_INFO. This macro will only send the string you input and strip the &amp;quot;&amp;lt;info&amp;gt; app: &amp;quot; part of the log. You can also remove any additional logging that is not required, for instance the &amp;quot;NRF_LOG_INFO(&amp;quot;ADC event number: %d&amp;quot;, (int)m_adc_evt_counter);&amp;quot; part of the example if you still have this. Here you have a code snipper that will remove the overhead in the SAADC example:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;void saadc_callback(nrf_drv_saadc_evt_t const * p_event)
{
    if (p_event-&amp;gt;type == NRF_DRV_SAADC_EVT_DONE)
    {
        ret_code_t err_code;

        err_code = nrf_drv_saadc_buffer_convert(p_event-&amp;gt;data.done.p_buffer, SAMPLES_IN_BUFFER);
        APP_ERROR_CHECK(err_code);

        int i;
        //NRF_LOG_INFO(&amp;quot;ADC event number: %d&amp;quot;, (int)m_adc_evt_counter);

        for (i = 0; i &amp;lt; SAMPLES_IN_BUFFER; i++)
        {
            NRF_LOG_RAW_INFO(&amp;quot;%d\r\n&amp;quot;, p_event-&amp;gt;data.done.p_buffer[i]);
        }
        m_adc_evt_counter++;
    }
}&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another option is to use the UART driver directly and send large buffers of raw SAADC samples. This will take a bit more work, but you save some overhead of strings and the usage of the logger module.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC Transmitting full rate data over UART</title><link>https://devzone.nordicsemi.com/thread/284181?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 18:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fd4ba62-8248-4f17-9725-93ed5fe6dd16</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0243._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>