<?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>Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35609/thread-sdk-hardcodes-uart-pins</link><description>From what I can tell, the SDK for Thread provided from Nordic uses a precompiled Openthread library that hardcodes the UART pin configuration. This means that users of this SDK must modify and recompile the library manually if they want to use the Thread</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Dec 2018 08:22:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35609/thread-sdk-hardcodes-uart-pins" /><item><title>RE: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/161597?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 08:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97e69148-4087-4207-8e8e-5ab18b0d9410</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know what example you started with, but I see that e.g. the light_control\light_switch has NRFX_PRS_BOX_4_ENABLED = 1, and this uses UARTE0_UART0_IRQHandler.&lt;/p&gt;
&lt;p&gt;However, this compiles. I am not sure exactly what the OpenThread uses UART0 for, but it is probably related to this.&lt;/p&gt;
&lt;p&gt;Have you added another UARTE0_UART0_IRQHandler in your project? You should probably change it to UARTE1_UART1_IRQHandler if you are trying to use UARTE1.&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: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/161507?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 16:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eb737ee-0312-4355-ab16-9f76c77c0cbd</guid><dc:creator>ozanoner</dc:creator><description>&lt;p&gt;Thanks for the reply, Edvin! I think&amp;nbsp;I changed my mind about recompiling openthread for the moment. I tried to enable UARTE1 and use it, but I got another error: &amp;quot;multiple definition of `UARTE0_UART0_IRQHandler&amp;#39;&amp;quot; although I disabled all UART0 and UARTE0 flags in the sdk_config.h.&amp;nbsp;The reason seems &amp;quot;#define NRFX_PRS_BOX_4_ENABLED 1&amp;quot; in the sdk_config.h. when I disable it, the code compiles but I am not sure about the result, I will test it again.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/161481?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 14:37:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8476a953-d99a-4676-b59f-c9b2dbc20f32</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The UART0 is configured in the OpenThread library. It is set up as default, with pins P0.06 and P0.08. Only UART0 is used, so you can set up and use the other instances of the UART as you like. If you want to change the UART0, however, you need to rebuild the OpenThread library.&lt;/p&gt;
&lt;p&gt;See the section &amp;quot;Building the latest OpenThread libraries&amp;quot; section in our &lt;a href="https://www.nordicsemi.com/en/DocLib/Content/SDK_Doc/Thread_SDK/v2-0-0/thread_intro?12#thread_qsg_libraries"&gt;Thread documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you build the latest version of the OpenThread library, the examples from the SDK will probably not work out of the box anymore. If you build with the same version used to build the library as the SDK uses, you shouldn&amp;#39;t need to change anything in the description.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the 2.0.0 version of the Thread SDK, it is mentioned in the nRF5_SDK_for_Thread_and_zigbee_2.2.0_29775ac\external\openthread\project\readme.txt what commit that is used:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;em&gt;OpenThread libraries projects are based on the following commit of OpenThread: 704511c96e0d093139e4b80ef0739ed2d701afb1&lt;/em&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So if you want to change the UART0 instance used in the OpenThread library you need to modify and rebuild the OpenThread library.&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: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/161476?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 14:20:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baa0d7b3-d251-4b92-8de2-a227623b509d</guid><dc:creator>ozanoner</dc:creator><description>&lt;p&gt;Is there any news about this subject? I have similar problem. Please see here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41528/merging-freertos_coap_server-and-uart-examples"&gt;devzone.nordicsemi.com/.../merging-freertos_coap_server-and-uart-examples&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/140478?ContentTypeID=1</link><pubDate>Wed, 18 Jul 2018 05:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:559be18f-90c0-492c-aba0-4a863af9cc90</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have asked our Thread team. Their explanation is that the solution was built on old peripheral drivers, but the plan is to port it to the new nrfx drivers, to make it easier to configure. Unfortunately, we (both in customer support and the thread team) is quite short staffed during the summer,&amp;nbsp; due to vacation season. They will look into this as soon as they can.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding the SPI, they gave a short answer:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;em&gt;When it comes to the second problem with SPI, there is a simple solution. He needs to build the OpenThread library with DISABLE_SPI=1 flag.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The instruction is here:&lt;br /&gt;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.thread_zigbee.v1.0.0%2Fthread_intro.html&amp;amp;cp=4_2_0_1_0_4&amp;amp;anchor=thread_qsg_libraries"&gt;http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.thread_zigbee.v1.0.0%2Fthread_intro.html&amp;amp;cp=4_2_0_1_0_4&amp;amp;anchor=thread_qsg_libraries&lt;/a&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;To keep full compatibility with the released SDK, customer would need to use the same OpenThread commit as it is in our release notes.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The full command is:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;$ make -f examples/Makefile-nrf52840 COMMISSIONER=1 JOINER=1 COAP=1 DNS_CLIENT=1 MTD_NETIAG=1 BORDER_ROUTER=1 MAC_FILTER=1 TMF_PROXY=1&amp;nbsp;&lt;strong&gt;DISABLE_SPI=1&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I verified using GCC.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So you can try this to get the SPI working.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/140308?ContentTypeID=1</link><pubDate>Tue, 17 Jul 2018 02:15:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f46643c-1302-4bcb-8053-ed4b416cf1f9</guid><dc:creator>nealjack</dc:creator><description>&lt;p&gt;Is there any update on this? I can&amp;#39;t even get an app that uses I2C/TWI to compile with the OpenThread binary, since&amp;nbsp;the SPI component already defines the &amp;#39;SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler&amp;#39;. While I could do without UART, I need TWI/SPI to interface with sensors on my system.&lt;/p&gt;
&lt;p&gt;Is there at least a workaround that will allow my compilation to override the handler defined in the library?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/137285?ContentTypeID=1</link><pubDate>Fri, 22 Jun 2018 23:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a405c8a-3a78-4f71-8000-3badfcf9de78</guid><dc:creator>nealjack</dc:creator><description>&lt;p&gt;Ok that sounds great thanks!&lt;/p&gt;
&lt;p&gt;As an example of where this can be problematic, I&amp;#39;m trying to build an Openthread application that uses UART1 for printf functionality, since UART0 is already used in the Openthread code that&amp;#39;s compiled within the library. I get a linker error as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;../../make/../sdk/nrf5_sdk_15.0.0_thread/external/openthread/lib/gcc/libopenthread-nrf52840-sdk.a(libopenthread_nrf52840_sdk_a-uart.o): In function `UARTE0_UART0_IRQHandler&amp;#39;:
/build/KNG-OL-JOB1/openthread/examples/../examples/platforms/nrf52840/uart.c:273: multiple definition of `UARTE0_UART0_IRQHandler&amp;#39;
_build/nrfx_prs.o:nrfx_prs.c:(.text.UARTE0_UART0_IRQHandler+0x0): first defined here
collect2: error: ld returned 1 exit status
../../make/Makefile:675: recipe for target &amp;#39;_build/thread_hello_world_blank.hex&amp;#39; failed
make: *** [_build/thread_hello_world_blank.hex] Error 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am almost certain I&amp;#39;ve set up my sdk_config.h correctly. I&amp;#39;ve disabled UART0, UARTE0, and ensured nrf_drv_uart and app_uart use UART1. &lt;a href="https://github.com/lab11/nrf5x-base/blob/redux/apps/thread_hello_world/sdk_config.h"&gt;Here is&amp;nbsp;my sdk_config.h&lt;/a&gt;&amp;nbsp;just in case I missed a define or two and someone is willing to look it over. I&amp;#39;m having a very hard time tracing down where UARTE0_UART0_IRQHandler is defined within all the platform/device macros. I don&amp;#39;t see where it would be defined in nrfx_prs.c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread SDK hardcodes UART pins</title><link>https://devzone.nordicsemi.com/thread/137204?ContentTypeID=1</link><pubDate>Fri, 22 Jun 2018 07:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22304dee-234a-4ad5-8d52-29c1b08c08c6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It looks like you are correct. Please let me check with the guys working on our OpenThread solution, and I will let you know. For all I know they are already planning to do this.&amp;nbsp;&amp;quot;Our&amp;quot;&amp;nbsp;OpenThread (the one used in the Thread SDK) library is still in the development stage.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will forward your feedback, and I will get back to you!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>