<?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>Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119167/distance-measurement-sample-code</link><description>When using the distance measurement sample code on my nrf5340 development kits, LEDs 1 and 2 seem to be working correctly, but LED 3 does not light up when connected. The only thing I changed about the sample code was adding this line: 
 
 CONFIG_SOC_NRF53_CPUNET_ENABLE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Mar 2025 16:48:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119167/distance-measurement-sample-code" /><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/526240?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 16:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2a3ed6d-b1ab-4f6e-8a2d-8c4fd8ca9853</guid><dc:creator>mgl</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/525694?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 11:37:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d312d086-183a-40e8-b155-b299b3eccdfe</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I can confirm that I&amp;#39;m able to reproduce this on my end, and after doing some debugging, it makes sense, because the two devices don&amp;#39;t actually connect to each other by default. The synchronization and ranging is done without the two ever being connected, which is why LED3 is never being lit. You can see in the connected() function in main.c that LED3 is toggled on if the connected callback&amp;nbsp;is returned, but it never is. As per the block diagram in the sample, this is how the ranging is done by default.&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1741088218486v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you need the devices to connect, you&amp;#39;re welcome to implement that yourself.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/525439?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 07:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b9001ef-c6eb-4e6f-974a-d9e629ed19b6</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Okay, this looks good. And just to make sure, you don&amp;#39;t have an .overlay file for example that overrides P0.30 in your project? I will be able to test this on my end tomorrow and will get back to you then.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/525342?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2025 16:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf4fb61e-9b4e-4561-8e6b-e710592a743a</guid><dc:creator>mgl</dc:creator><description>&lt;p&gt;Solder bridge SB7 doesn&amp;#39;t look to be cut on either DK. This is what the LEDs are set to in the Devicetree.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;leds {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led0: led_0 {
			gpios = &amp;lt;&amp;amp;gpio0 28 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 0&amp;quot;;
		};
		led1: led_1 {
			gpios = &amp;lt;&amp;amp;gpio0 29 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 1&amp;quot;;
		};
		led2: led_2 {
			gpios = &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 2&amp;quot;;
		};
		led3: led_3 {
			gpios = &amp;lt;&amp;amp;gpio0 31 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 3&amp;quot;;
		};
	};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/525308?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2025 14:30:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d226c311-d0e7-4453-ad78-8f058463469f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll get back to you on Monday or Tuesday next week as I need to try setting up this on my end and see if I can reproduce this. Can you check the nRF5340 DK board file of the project have indeed set LED3 as pin P0.30 on your end, just to make sure nothing has been changed/edited there in a previous project for some reason. Also, please check solder bridge SB7 on both DKs to make sure that hasn&amp;#39;t been cut, as that would cut off the connection to LED3.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/524916?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 18:02:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bf94545-707e-41c9-8c0c-1e22abcedb75</guid><dc:creator>mgl</dc:creator><description>&lt;p&gt;Yes, I am using the same sample code on both development kits. The two kits seem to be connected as distance measurements are outputting to my serial terminal and LED 1 is lit based on the connection between the kits. I am using the nRF Connect SDK version 2.9.0. I believe the version of the nrf5340 DKs is PCA10095.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance Measurement Sample Code</title><link>https://devzone.nordicsemi.com/thread/524234?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 07:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b09ecf61-013f-4806-8731-10fc0003f67c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just to confirm. You have two nRF5340 DKs flashed with the same nRF Distance Measurement sample here, correct?&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/nrf_dm/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/nrf_dm/README.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you get any indication when logging that the nRF5340s are in fact connected, and do you get any measurement results? Also, what version of the nRF5340 DKs are you working on, and what version of the nRF Connect SDK are you using?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>