<?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>implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44139/implementation-uart-to-examples-from-sdk</link><description>Hello, 
 I have problem with implementing UART to simple_coap_client example, but there is too much problems. Some issues have been solved, but it still is not all. 
 defines in sdk_config.h -solved 
 uart0 - used by openthread lib -solved 
 
 Can you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Mar 2019 15:21:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44139/implementation-uart-to-examples-from-sdk" /><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/176253?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 15:21:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0e52e2f-5a25-486f-ae00-d675e03d32de</guid><dc:creator>František</dc:creator><description>&lt;p&gt;now it is OK&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you very much :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/176182?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 12:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff6be4c5-38e2-4dce-9774-cbc240cbbec4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So you didn&amp;#39;t try the fix I suggested in the previous reply?&lt;/p&gt;
&lt;p&gt;It may work the way you describe. The issue with just avoiding one instance of #if defined() is that this check may be done several other places in your project (but maybe not). Also, remember that the changes you do in the generic SDK files applies to all projects using the same SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/176059?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 22:33:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0b127a6-be99-476b-951d-45c6a1c9de10</guid><dc:creator>František</dc:creator><description>&lt;p&gt;okej its true,&amp;nbsp; but problem still exist&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;lsquo;nrf_drv_uart_config_t {aka struct &amp;lt;anonymous&amp;gt;}&amp;rsquo; has no member named &amp;lsquo;use_easy_dma&amp;rsquo;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;problem is&amp;nbsp;in file nrf_derial.c line 207-209&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#if defined(UARTE_PRESENT) &amp;amp;&amp;amp; defined(UART_PRESENT)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;drv_config.use_easy_dma = (p_config-&amp;gt;mode == NRF_SERIAL_MODE_DMA); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#endif&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;nrf_drv_uart.h line 197&lt;/p&gt;
&lt;p&gt;&lt;span&gt;struct&amp;nbsp;nrf_drv_uart_config_t&amp;nbsp;has member named &amp;lsquo;use_easy_dma&amp;rsquo; if&amp;nbsp; this:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#if defined(NRF_DRV_UART_WITH_UARTE) &amp;amp;&amp;amp; defined(NRF_DRV_UART_WITH_UART)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;my fix :&lt;/p&gt;
&lt;p&gt;instead of condition file&amp;nbsp;&lt;span&gt;nrf_derial.c&amp;nbsp; in line 207&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#if defined(UARTE_PRESENT) &amp;amp;&amp;amp; defined(UART_PRESENT)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;replacing condition is from&amp;nbsp;nrf_drv_uart.h line 197&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#if defined(NRF_DRV_UART_WITH_UARTE) &amp;amp;&amp;amp; defined(NRF_DRV_UART_WITH_UART)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;it is correct fix? build complete&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/175985?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 14:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc4ea1be-2c98-4dd5-bacc-d6dea8886464</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I see. It seems like these drivers were written mainly for UART0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you look at nrf_drv_uart.h line 200 and up, the bool use_easy_dma is only declared if:&lt;/p&gt;
&lt;p&gt;NRF_DRV_UART_WITH_UARTE is defined&amp;nbsp;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;NRF_DRV_UART_WITH_UART is defined.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;NRF_DRV_UART_WITH_UARTE is defined, so that is fine.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_DRV_UART_WITH_UART is only defined if:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;UART_PRESENT is defined and NRFX_UART_ENABLED is 1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;UART_PRESENT is defined, so that is fine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRFX_UART_ENABLED is defined&amp;nbsp;in sdk_config.h, so it should be fine, BUT:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;there is a file called apply_old_config.h. Look in this file on line 1278, it says:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define NRFX_UART_ENABLED&amp;nbsp; &amp;nbsp;(UART_ENABLED &amp;amp;&amp;amp; NRFX_UART0_ENABLED)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So NRFX_UART_ENABLED is first defined in sdk_config.h, then undefined in apply_old_config.h on line 1277, then defined as UART_ENABLED &amp;amp;&amp;amp; NRFX_UART0_ENABLED.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(This is why I said that this driver was written mainly for UART0). Try to change line 1278 in apply_old_config.h as:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define NRFX_UART_ENABLED&amp;nbsp; &amp;nbsp;(UART_ENABLED &amp;amp;&amp;amp; (NRFX_UART0_ENABLED || NRFX_UART1_ENABLED))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This passes this compiler error, but there&amp;nbsp;is more:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in nrfx_uart.c on line 45-47:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#if !NRFX_CHECK(NRFX_UART0_ENABLED)&lt;br /&gt;#error &amp;quot;No enabled UART instances. Check &amp;lt;nrfx_config.h&amp;gt;.&amp;quot;&lt;br /&gt;#endif&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Change the check to:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#if (!NRFX_CHECK(NRFX_UART0_ENABLED) &amp;amp;&amp;amp; !NRFX_CHECK(NRFX_UART1_ENABLED))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have reported these bugs regarding only checking NRFX_UART0_ENABLED internally.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/175964?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 13:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1830990-b06a-4555-a4b3-92ae77622bad</guid><dc:creator>František</dc:creator><description>&lt;p&gt;OK thanks it works, but i comment one line but its not correct fix&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in file nrf_serial.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if defined(UARTE_PRESENT) &amp;amp;&amp;amp; defined(UART_PRESENT)
    drv_config.use_easy_dma = (p_config-&amp;gt;mode == NRF_SERIAL_MODE_DMA);
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lsquo;nrf_drv_uart_config_t {aka struct &amp;lt;anonymous&amp;gt;}&amp;rsquo; has no member named &amp;lsquo;use_easy_dma&amp;rsquo;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/175961?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 13:49:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2115be62-a6b6-4130-b90f-367103d8f949</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you try to change the define in sdk_config.h:&lt;/p&gt;
&lt;p&gt;#define&amp;nbsp;NRFX_PRS_ENABLED 1&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;#define&amp;nbsp;NRFX_PRS_ENABLED 0.&lt;/p&gt;
&lt;p&gt;On my end, this makes the project compile, and I can still use the CLI. I don&amp;#39;t know what you intend to use the other UART for, but can you try this and see if it works?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/175117?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 16:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30245136-fd41-4a27-8e0a-8dc6850cee42</guid><dc:creator>František</dc:creator><description>&lt;p&gt;this is link to google drive zip file of SDK&amp;nbsp;&lt;/p&gt;
&lt;p&gt;project is simple_coap_client&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/open?id=1g5j7c7hET5prL26cVuHIhL-idz-2y2SB"&gt;drive.google.com/open&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/174968?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 09:19:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1893e45-0d69-4ba2-bbca-e0dac1769f28</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What compiler/IDE are you using?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you send the project in a .zip folder? (ps: it may be too large to upload here. Just delete the build files, and zip it).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/174541?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 12:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a6d83e6-e082-48df-b684-679acf69b9aa</guid><dc:creator>František</dc:creator><description>&lt;p&gt;this defines was copied from sdk_config of project peripherals/serial_uartes and I disable uart0&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#ifndef NRFX_UARTE_ENABLED&lt;br /&gt;#define NRFX_UARTE_ENABLED 1&lt;br /&gt;#endif&lt;br /&gt;// &amp;lt;o&amp;gt; NRFX_UARTE0_ENABLED - Enable UARTE0 instance &lt;br /&gt;#ifndef NRFX_UARTE0_ENABLED&lt;br /&gt;#define NRFX_UARTE0_ENABLED 0&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRFX_UARTE1_ENABLED - Enable UARTE1 instance &lt;br /&gt;#ifndef NRFX_UARTE1_ENABLED&lt;br /&gt;#define NRFX_UARTE1_ENABLED 0&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#ifndef NRFX_UART_ENABLED&lt;br /&gt;#define NRFX_UART_ENABLED 1&lt;br /&gt;#endif&lt;br /&gt;// &amp;lt;o&amp;gt; NRFX_UART0_ENABLED - Enable UART0 instance &lt;br /&gt;#ifndef NRFX_UART0_ENABLED&lt;br /&gt;#define NRFX_UART0_ENABLED 0&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;#ifndef UART_ENABLED&lt;br /&gt;#define UART_ENABLED 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;#ifndef UART_EASY_DMA_SUPPORT&lt;br /&gt;#define UART_EASY_DMA_SUPPORT 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;q&amp;gt; UART_LEGACY_SUPPORT - Driver supporting Legacy mode&lt;/p&gt;
&lt;p&gt;#ifndef UART_LEGACY_SUPPORT&lt;br /&gt;#define UART_LEGACY_SUPPORT 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;....&lt;/p&gt;
&lt;p&gt;#ifndef UART0_ENABLED&lt;br /&gt;#define UART0_ENABLED 0&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#ifndef UART1_ENABLED&lt;br /&gt;#define UART1_ENABLED 1&lt;br /&gt;#endif&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/174539?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 12:41:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e73ba45f-70e6-40b2-957d-5f95616107fb</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Your compiler output should also tell you something like:&lt;/p&gt;
&lt;p&gt;previous definition here: &amp;lt;path to other place it is defined&amp;gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How did you &amp;quot;Disable uart 0 enable uart 1&amp;quot;?&lt;/p&gt;
&lt;p&gt;It looks like you still have enabled uart 0 somewhere in your project. Maybe in sdk_config.h?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/174483?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 10:04:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf42865d-1b67-4b7c-a69b-a325ce2d8659</guid><dc:creator>František</dc:creator><description>&lt;p&gt;I think should be exist guide how to add&amp;nbsp;UART to example project because&amp;nbsp; it is important but so complicated&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/174456?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 08:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee7586ef-0e4d-4942-a060-05d29380c77f</guid><dc:creator>František</dc:creator><description>&lt;p&gt;when I compile project simple_coap_client from SDK&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-added uart switches to sdk_config&lt;/p&gt;
&lt;p&gt;-added include directories and c files to project&lt;/p&gt;
&lt;p&gt;-disable uart 0 enable uart 1&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;multiple definition of `UARTE0_UART0_IRQHandler&amp;#39;&lt;/p&gt;
&lt;p&gt;../../../../../../external/openthread/lib/gcc/libopenthread-nrf52840-sdk.a(libopenthread_nrf52840_sdk_a-uart.o): In function `UARTE0_UART0_IRQHandler&amp;#39;:&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: implementation UART to examples from SDK</title><link>https://devzone.nordicsemi.com/thread/173409?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 09:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2e31263-4a10-48bd-b3cf-307debddb96d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;defines in sdk_config.h&amp;nbsp; -solved&amp;nbsp;&lt;/p&gt;
&lt;p&gt;uart0 - used by openthread lib -solved&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please describe what the issue is? What is your progress?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>