<?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>nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73700/nrf5340-dk-trouble-with-hci_uart-sample</link><description>Hi ! 
 I want to send simple HCI commands, such as reset, to the nRF5340 via UART. Therefore, I&amp;#39;m using the sample &amp;quot;hci_uart&amp;quot; available with nRF Connect SDK v1.5.0. I am sniffing the UART lines on the dev. kit with a logic analyzer but I cannot manage</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 May 2021 16:12:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73700/nrf5340-dk-trouble-with-hci_uart-sample" /><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/309982?ContentTypeID=1</link><pubDate>Mon, 17 May 2021 16:12:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb3ad9bb-7f5c-46c2-b194-6074454713d0</guid><dc:creator>_RK_</dc:creator><description>&lt;p&gt;Hi Carl, where is this documented or what&amp;#39;s the logic behind the 32+&amp;lt;desired P1 pin&amp;gt; ?&lt;br /&gt;&lt;br /&gt;Reason I&amp;#39;m asking this is, I&amp;#39;ve been testing hci over uart on the adafruit_feather_nrf52840 board. And for the uart CTS, I&amp;#39;ve been testing the pins P1.08-&amp;gt; D5 as well as P0.08-&amp;gt;D12 pins, for both cases, my device-tree config was,&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cts-pin = &amp;lt;8&amp;gt;;&lt;/p&gt;
&lt;p&gt;and it works both cases. Appreciate some clarity here as to why I&amp;#39;m seeing this behavior.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/304062?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 14:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dd71ec6-d78e-4e49-a7d8-098f535b9d78</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello again, Loic!&lt;br /&gt;&lt;br /&gt;Good to hear that it works now! For SES to take new overlays into account you must reopen the project or do &amp;quot;Project&amp;quot; -&amp;gt; &amp;quot;Run CMake&amp;quot;. The pins I used in the example are on port 1 (P1.xx).&amp;nbsp;The pin number for P1 pins are given by 32+&amp;lt;desired_pin&amp;gt;, so taking 44 as example you&amp;#39;re using P1.12.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m very glad to help and thank you. I wish you a good weekend too!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/304054?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 14:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acf926a1-a293-4433-a415-18ce1357cb4d</guid><dc:creator>loic murith</dc:creator><description>&lt;p&gt;Hello again Carl !&lt;/p&gt;
&lt;p&gt;Thank you very much for your valuable help and your availability ! I found out that when I&amp;#39;m building and flashing the code with west, it takes into account what&amp;#39;s inside the .overlay file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have now fully access to the HCI over UART at the desired baudrate which is exactly what I needed ! Great !&lt;/p&gt;
&lt;p&gt;If I can ask one last question on this topic, I would like to know where to find the information of the relation between the pin numbers (&amp;lt;44&amp;gt;, &amp;lt;45&amp;gt;, etc...) and the hardware pins of the chip and/or pin name (P0.00, P0.01, etc...) ? I searched in the datasheet of the nRF5340 but I did not find it.&lt;/p&gt;
&lt;p&gt;Once again, thank you very much for your help !&lt;/p&gt;
&lt;p&gt;I wish you a great week-end !&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Lo&amp;iuml;c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303979?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 11:38:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3305afa0-2176-4030-9bdc-0a6ec9d1987a</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;You&amp;#39;re sniffing the log messages printed over UART, which by default is using baudrate 115200. Try to setup and sniff the correct pins. Below is an example of how you can specify them:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* SPDX-License-Identifier: Apache-2.0 */

&amp;amp;uart0 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	current-speed = &amp;lt;1000000&amp;gt;;
	status = &amp;quot;okay&amp;quot;;
	hw-flow-control;
	rx-pin = &amp;lt;44&amp;gt;;
	tx-pin = &amp;lt;45&amp;gt;;
	cts-pin = &amp;lt;46&amp;gt;;
	rts-pin = &amp;lt;47&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Make sure that the UART you are using for HCI isn&amp;#39;t conflicting with the UART that is used for logging. I believe it should be fine in this case, if it&amp;#39;s not you can try the following overlay file instead:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* SPDX-License-Identifier: Apache-2.0 */

&amp;amp;uart1 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	current-speed = &amp;lt;1000000&amp;gt;;
	status = &amp;quot;okay&amp;quot;;
	hw-flow-control;
	rx-pin = &amp;lt;44&amp;gt;;
	tx-pin = &amp;lt;45&amp;gt;;
	cts-pin = &amp;lt;46&amp;gt;;
	rts-pin = &amp;lt;47&amp;gt;;
};

/ {
	chosen {
		zephyr,bt-c2h-uart=&amp;amp;uart1;
	};
};&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303949?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 10:11:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62fa2660-a2b2-4cca-960b-82f93be115d5</guid><dc:creator>loic murith</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;I managed this morning to send successfully an HCI command to the nRF5340 via UART. For that, I had to build and load the hci_uart sample code on the application core and also build and load the hci_rpmsg sample code on the network core. By doing so, the nRF5340 does not get stuck in the initializations as it was doing before and works well.&lt;/p&gt;
&lt;p&gt;Nevertheless, it seems that the file &amp;quot;&lt;span&gt;nrf5340dk_nrf5340_cpuapp.overlay&amp;quot; does not impact the UART (or at least not the right one) because I cannot manage to change the baudrate. Would have any idea about that ? Moreover, if you could provide me an example of how I can modify the pins to the UART, I would be truly grateful !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much for all your help !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With my kindest regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Lo&amp;iuml;c&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303810?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 13:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b9d3647-c322-4352-bead-c916e33e4e58</guid><dc:creator>loic murith</dc:creator><description>&lt;p&gt;Hello again Carl!&lt;/p&gt;
&lt;p&gt;Thank you very much for this information. I checked the file which contains the following lines :&lt;/p&gt;
&lt;p&gt;/* SPDX-License-Identifier: Apache-2.0 */&lt;/p&gt;
&lt;p&gt;&amp;amp;uart0 {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;&lt;br /&gt; current-speed = &amp;lt;1000000&amp;gt;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; hw-flow-control;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;Actually, when I manage to sniff data on UART line such as &amp;quot;*** Booting Zephyr OS build v2.4.99-ncs1&amp;nbsp; ***&amp;quot; I see that the baudrate is 115200 and not 1000000 as specified in the .overlay file. Do you know what could cause this ?&lt;/p&gt;
&lt;p&gt;Moreover, can you please explain me what can I add in this file to specify the UART pins ?&lt;/p&gt;
&lt;p&gt;Thank you very much for your help !&lt;/p&gt;
&lt;p&gt;Kind rgards,&lt;/p&gt;
&lt;p&gt;Lo&amp;iuml;c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303792?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 13:19:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be93ebf-eb28-400b-9d88-2fcc9f2f3835</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello again!&lt;/p&gt;
[quote user="loic murith"]Thank you for your reply. As far as I understood, the network core does not support the HCI UART :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72601/is-nrf5340-support-only-bluetooth-hci_uart-mode-on-cpunet"&gt;(+) Is nrf5340 support only bluetooth hci_uart mode on cpunet? - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;[/quote]
&lt;p&gt;What&amp;#39;s meant with the answer here is that the only HCI sample that we currently can ensure support for on the nRF5340 network core is hci_rpmsg. However, from what I can see hci_uart should work on both of the cores given the correct configuration and overlays.&amp;nbsp;Please have a look in the &lt;strong&gt;board&lt;/strong&gt; folder of the hci_uart sample and look at the files there for reference. For the nRF5340 application core a file called &amp;quot;nrf5340dk_nrf5340_cpuapp.overlay&amp;quot; is required. In this file you can also specify the desired UART pins to use.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303759?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 12:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27b7a6ba-e1b0-40a7-b16d-1e6c5e51162d</guid><dc:creator>loic murith</dc:creator><description>&lt;p&gt;Hello Carl!&lt;/p&gt;
&lt;p&gt;Thank you for your reply. As far as I understood, the network core does not support the HCI UART :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72601/is-nrf5340-support-only-bluetooth-hci_uart-mode-on-cpunet"&gt;(+) Is nrf5340 support only bluetooth hci_uart mode on cpunet? - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just to avoid miscomprehension, I am selecting the board variant &amp;quot;nrf5340dk_nrf5340_cpuapp&amp;quot; and I selected the code sample available in &amp;quot;ncs\v1.5.0\zephyr\samples\bluetooth\hci_uart&amp;quot;.&lt;/p&gt;
&lt;p&gt;I am not sure if I understood it right but here is how I see it : the hci_uart sample code exposes the HCI interface of the network core over the UART of the application core. Is that right ?&lt;/p&gt;
&lt;p&gt;If it is correct, that&amp;#39;s why I am currently building the sample code on SEGGER Embedded Studio for the application core. I tried to do it for the network core but I couldn&amp;#39;t get it working...&lt;/p&gt;
&lt;p&gt;If you need any other detail, I will be happy to answer you !&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Lo&amp;iuml;c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303742?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 11:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:765989a9-9958-4703-99d7-5d616f20a646</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello, Loic!&lt;br /&gt;&lt;br /&gt;Which of the two cores are you targeting with the sample? To use hci_uart with the nRF5340 For any HCI sample I believe you must use the network core, as the application core doesn&amp;#39;t have access to radio resources.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340-DK : trouble with hci_uart sample</title><link>https://devzone.nordicsemi.com/thread/303634?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 06:50:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0165fdd-9256-4e25-9f46-f23c5c3fd71f</guid><dc:creator>loic murith</dc:creator><description>&lt;p&gt;To be more precise, the nRF5340 is stuck in the bt_rpmsg_open() function. Do you know what does it involve ? What would be the cause ?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1617864512416v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Kind regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>