<?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>logging data through the second UART (DMA) on nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85811/logging-data-through-the-second-uart-dma-on-nrf52840</link><description>Hi. In nrf52840 is it possible to use in NRF_LOG the second UART (DMA based) ? 
 I know i can define the TX pin in the SDK_CONFIG but can the NRF_LOG_BACKEND_UART work with UARTE1 ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Mar 2022 09:51:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85811/logging-data-through-the-second-uart-dma-on-nrf52840" /><item><title>RE: logging data through the second UART (DMA) on nrf52840</title><link>https://devzone.nordicsemi.com/thread/358151?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 09:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d041bb2-1389-472e-bbaf-5cd0ddc62181</guid><dc:creator>Eyal_Gal</dc:creator><description>&lt;p&gt;thanks for the detailed explenation.! will try it out!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: logging data through the second UART (DMA) on nrf52840</title><link>https://devzone.nordicsemi.com/thread/358148?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 09:29:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89170d33-b941-4e3a-9bf4-cba0f1092104</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Both UART and UARTE peripherals are using interrupt, the main difference is that UARTE peripherals uses EasyDMA to get/put data from/to buffers in RAM without CPU, while with the UART peripheral the CPU needs to provide/get the data to/from the peripheral for each byte.&lt;/p&gt;
&lt;p&gt;NRF_LOG library uses the nrf_drv_uart driver, which will handle the differences between the peripheral types for you. The driver is configured to use UARTE for instance 0 used by the logger in most examples.&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: logging data through the second UART (DMA) on nrf52840</title><link>https://devzone.nordicsemi.com/thread/358032?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 15:46:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a79ed57-b0c3-4468-bfd0-44be76a5fff9</guid><dc:creator>Eyal_Gal</dc:creator><description>&lt;p&gt;Thanks! But i looked in the code , doesn&amp;#39;t it rely on the interrupts ? as far as i know it&amp;#39;s based on DMA and from what i recall works differently than interrupt based UART, for input AND output (like you need to define the output buffer).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: logging data through the second UART (DMA) on nrf52840</title><link>https://devzone.nordicsemi.com/thread/358017?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 15:10:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:536d0e5c-1e79-4d53-8bb6-92f34defda6e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The UART instance used by the logger is hardcoded in the source (components\libraries\log\src\nrf_log_backend_uart.c:48 in SDK 17.1.0). If you want to use the second UART instance, you need to modify this line to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_uart_t m_uart = NRF_DRV_UART_INSTANCE(1);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note that the logger backend uses the UART driver configuration, so you need to enable the second UART instance in your sdk_config.h file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;e&amp;gt; UART1_ENABLED - Enable UART1 instance
//==========================================================
#ifndef UART1_ENABLED
#define UART1_ENABLED 1
#endif&lt;/pre&gt;&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></channel></rss>