<?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>UART +  RTT LOG Setup</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92056/uart-rtt-log-setup</link><description>Hello, 
 I have my own custom board with nRF52832 and a NB-iot module SIM7080G that interfaces via UART. 
 I can easily program the device through SWD using J-Link. I am even able to print things using RTT. 
 I have a button and made a simple program</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Sep 2022 13:04:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92056/uart-rtt-log-setup" /><item><title>RE: UART +  RTT LOG Setup</title><link>https://devzone.nordicsemi.com/thread/387509?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 13:04:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d703ba69-6478-4bf5-8396-0bd1a62b33bc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Toni Alomar"]I am receiving message &amp;quot;&lt;strong&gt;no Ok!&lt;/strong&gt;&amp;quot; in RTT viewer. Why am I getting error?[/quote]
&lt;p&gt;I don&amp;#39;t know. Can you print the error code as well? That should give some hints.&lt;/p&gt;
[quote user="Toni Alomar"]Could you help me developing a simple tx/rx using nrf_drv_uart library?[/quote]
&lt;p&gt;The SDK has the UART driver and several UART libraries built on top, I would think you should be able to use one of those. Building your own does not immediately seem like a good idea (and if you want to do so, that is up to you).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART +  RTT LOG Setup</title><link>https://devzone.nordicsemi.com/thread/387354?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 16:44:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6c614a0-b1a6-4328-ba48-3380b581be18</guid><dc:creator>Toni Alomar</dc:creator><description>&lt;p&gt;Thanks Einar,&lt;/p&gt;
&lt;p&gt;I solved the&amp;nbsp;&lt;strong&gt;ERROR 8&lt;/strong&gt; with what you said. Now I am having trouble transmiting. I am doing this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;char toSend[2] = {&amp;#39;X&amp;#39;,&amp;#39;E&amp;#39;};

uint32_t err_code = nrf_drv_uart_tx(&amp;amp;m_uart, &amp;amp;toSend[0], 2);
if(err_code = NRFX_SUCCESS){
  NRF_LOG_INFO(&amp;quot;OK!&amp;quot;);
}else{
  NRF_LOG_INFO(&amp;quot;no OK!&amp;quot;);
}
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am trying to send two characters via UART. I am receiving message &amp;quot;&lt;strong&gt;no Ok!&lt;/strong&gt;&amp;quot; in RTT viewer. Why am I getting error?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I understand I am using the most low level UART library and I do so because the app_uart is getting me into a lot of trouble because of dependencies... I did start my project from ble_app_multilink_central_pca10040&amp;nbsp;example. When I tried to add app_uart_fifo.c and everything I started having a lot of problems.&lt;/p&gt;
&lt;p&gt;Why is that uart not working?&lt;/p&gt;
&lt;p&gt;Could you help me developing a simple tx/rx using nrf_drv_uart library?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART +  RTT LOG Setup</title><link>https://devzone.nordicsemi.com/thread/386786?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 08:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcc2e2b8-eb0e-4ff6-80fe-a9661b0524d2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are getting&amp;nbsp;NRF_ERROR_INVALID_STATE returned from&amp;nbsp;nrf_drv_uart_init(), which means that UART is already enabled. Logging is enabled beforehand, so I suspect you have enabled the UART backend for nrf_log? If so, you need to modify sdk_config.h so that&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED is set to 0.&lt;/p&gt;
&lt;p&gt;As you write you want RTT logging you also need to ensure you set&amp;nbsp;NRF_LOG_BACKEND_RTT_ENABLED to 1, and I also recommend you set&amp;nbsp;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART +  RTT LOG Setup</title><link>https://devzone.nordicsemi.com/thread/386712?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 17:20:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a6d9ad8-fb86-4c54-81c3-592b4226e671</guid><dc:creator>Toni Alomar</dc:creator><description>&lt;p&gt;I want to add that &lt;strong&gt;line 60&amp;nbsp;&lt;/strong&gt;is uncommented in the uploaded code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>