<?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>Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103568/issues-building-sample-lora-send-project</link><description>Hello all NRF developers. I am newbie NRF developer, previously have worked with STM32 and ESP32 devices. The whole nRF and zephyr thing with device tree is still very new to me and I am just getting grasp of it. 
 My goal is to get he LoRa send/receive</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Sep 2023 10:56:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103568/issues-building-sample-lora-send-project" /><item><title>RE: Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/thread/445375?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 10:56:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8db09eae-90f1-4ff1-b01b-2dfb3b27d3a3</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi Lukas&lt;/p&gt;
&lt;p&gt;Good to hear your project is compiling&lt;/p&gt;
&lt;p&gt;You are correct in regards how you are supposed to wire it.&amp;nbsp;However you are free to changes the pins mostliy as you wish, if you look at this &lt;a href="https://github.com/too1/ncs-spi-master-slave-example/blob/master/nrf52840dk_nrf52840.overlay"&gt;example&lt;/a&gt; you can see how to add the pinctrl to your overlay so that you can change the pins used for SPI. If you are using a shield with the radio, you will need to check the shield in regards to correctliy select the pins.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have attacehd the man page from the&amp;nbsp;&amp;nbsp;&lt;a href="https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt"&gt;linux kernel&lt;/a&gt;&amp;nbsp;describing pincotrl.&amp;nbsp;&amp;nbsp;Zephyr also have a&amp;nbsp;documentation&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/hardware/pinctrl/index.html"&gt;https://docs.zephyrproject.org/latest/hardware/pinctrl/index.html&lt;/a&gt;&amp;nbsp;explaning the different states with more graphic then the man page.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/thread/445206?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 17:29:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee5379e8-cbc9-44e0-b3be-fc08d18b2b16</guid><dc:creator>zazas321</dc:creator><description>&lt;p&gt;I have managed to solve the issue. It was so silly! I have replaced:&lt;br /&gt;compatible = &amp;quot;nordic,nrf-spim&amp;quot;;&lt;br /&gt;with&amp;nbsp;&lt;br /&gt;compatible = &amp;quot;nordic,nrf-spi&amp;quot;;&lt;br /&gt;&lt;br /&gt;And that fixed the issue. I can now fully build the project without any compilation errors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have one more little question that I want to clarify regarding device tree, bindings and properties. My current overlay:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 15 GPIO_ACTIVE_LOW&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	lora0: sx1276@0 {
		compatible = &amp;quot;semtech,sx1276&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		reset-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_LOW&amp;gt;;
		dio-gpios = &amp;lt;&amp;amp;gpio0 24 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;,
					&amp;lt;&amp;amp;gpio0 22 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;,
					&amp;lt;&amp;amp;gpio0 17 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;;
		power-amplifier-output = &amp;quot;pa-boost&amp;quot;;
		spi-max-frequency = &amp;lt;125000&amp;gt;;
	};
};

/ {
     aliases {
             lora0 = &amp;amp;lora0;
     };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not fully understanding what does pinctrl-0 and pinctrl-1 mean.&lt;/p&gt;
&lt;p&gt;I have opened C:&lt;span&gt;:\nrf\v2.4.0\boards\arm\nrf52dk_nrf52832-pinctrl.dtsi and I see the following:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 31)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 30)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 29)&amp;gt;;
		};
	};

	spi1_sleep: spi1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 31)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 30)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 29)&amp;gt;;
			low-power-enable;
		};
	};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does that mean that for the SPI, I should connect my lora module to the following pins:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SCK - GPIO0 31&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MOSI - GPIO0 30&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MISO - GPIO0 29&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/thread/445184?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 15:13:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f0bccb-4ce7-483d-be56-9ab8da4095a1</guid><dc:creator>zazas321</dc:creator><description>&lt;p&gt;It is not relevant at this point what binding I am trying to use since I am not even trying to physically flash the device at this point.&amp;nbsp; All I am trying to do at this stage is to compile sample lora project for any lora module, it could be sx1276 or even some other lora module. I am just simply trying to confirm if lora send sample project is working.&lt;/p&gt;
&lt;p&gt;For the time being, we can assume that I have sx1276 lora module and not sx1278. Lets forget everything I said about sx1278.&lt;/p&gt;
&lt;p&gt;Since this is a sample project provided by nRF sdk, and since I barely changed anything apart from adding the following to&amp;nbsp; the overlay,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 15 GPIO_ACTIVE_LOW&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	lora0: sx1276@0 {
		compatible = &amp;quot;semtech,sx1276&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		reset-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_LOW&amp;gt;;
		dio-gpios = &amp;lt;&amp;amp;gpio0 24 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;,
					&amp;lt;&amp;amp;gpio0 22 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;,
					&amp;lt;&amp;amp;gpio0 17 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;;
		power-amplifier-output = &amp;quot;pa-boost&amp;quot;;
		spi-max-frequency = &amp;lt;125000&amp;gt;;
	};
};

/ {
     aliases {
             lora0 = &amp;amp;lora0;
     };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I would expect this to be some kind of small issue that we are not seeing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Il read through what you have suggested and see what I can do.. I also hope I will be hearing back from you when you had some time to look through this issue. Thank you very much for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/thread/445170?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 14:19:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e6940c7-7d55-4dc6-ad17-ac4ef35d14ef</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will look more into the case over the weekend. However the error you see is normally caused by errors in the devicetree, and that is why I wanted to create the correct binding, just to make sure it was not the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The best help I can offer right now is to read this part&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/troubleshooting.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/troubleshooting.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/thread/445162?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 13:35:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:424c2d6c-ffa7-437c-831c-6ca0411cf5a9</guid><dc:creator>zazas321</dc:creator><description>&lt;p&gt;Thanks for your response.&lt;/p&gt;
&lt;p&gt;I have reverted all changes I have done to C&lt;span&gt;:\nrf\v2.4.0\boards\arm\nrf52dk_nrf52832.dts and added alias to my .overlay instead.&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;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 15 GPIO_ACTIVE_LOW&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	lora0: sx1276@0 {
		compatible = &amp;quot;semtech,sx1276&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		reset-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_LOW&amp;gt;;
		dio-gpios = &amp;lt;&amp;amp;gpio0 24 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;,
					&amp;lt;&amp;amp;gpio0 22 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;,
					&amp;lt;&amp;amp;gpio0 17 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;;
		power-amplifier-output = &amp;quot;pa-boost&amp;quot;;
		spi-max-frequency = &amp;lt;125000&amp;gt;;
	};
};

/ {
     aliases {
             lora0 = &amp;amp;lora0;
     };
};
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regarding creating device tree binding for sx1278, I dont think it is necessary at this stage of the project but I understand what you are talking about. I aggree it would make more sense to use sx1278 binding if I am using sx1278 hardware.&amp;nbsp;&lt;/span&gt;But since changes between sx1278 and sx1276 are minor, I should be able to use sx1276 binding and get it to work with my sx1278 device as a temporary solution.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At this moment, I am more concerned about the other compilation issue I am having that I cannot wrap my head around:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please could you look at the compilation log that I have added to&amp;nbsp;my initial posted. It complains about :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;undefined reference to `__device_dts_ord_107&amp;#39;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;I havent managed to find any useful information regarding this particular error.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues building sample LORA send project</title><link>https://devzone.nordicsemi.com/thread/445128?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 11:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6318f70d-6178-4df9-9ffe-223221bd75c8</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi Lukas&lt;/p&gt;
&lt;p&gt;Could you revert the changes you have done to&amp;nbsp;&lt;span&gt;:\nrf\v2.4.0\boards\arm\nrf52dk_nrf52832.dts? We don&amp;#39;t recommending changing the dts in the zephyr folders and rather use an overlay. This so that other projects are not affected by changes you do for this project.&amp;nbsp;&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 had a look through Zephyr&amp;#39;s semtech bindings and could unfortuntly not find the 1278. However from the datasheet it looks like the Semtech 1278 is an 1276 with a narrower frequency band. So I would presume that we can use the same driver. So what we then need to do is to create a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/bindings.html"&gt;devicetree binding&lt;/a&gt;&amp;nbsp;for the Semtech1278. Here is an &lt;a href="https://github.com/martelmy/NCS_examples/tree/main/devicetree/devicetree_custom_device"&gt;simple example&lt;/a&gt; created by one of my collauges at support.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Create the folders structure dts/bindings inside your application folder&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Create the filde semtech,sx1278.yaml inside the bindings folder and populated it with the following&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;description: Semtech SX1278 LoRa Modem

compatible: &amp;quot;semtech,sx1278&amp;quot;

include: semtech,sx127x-base.yaml
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Update your overlay to use the semtech 1278 radio&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;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Runar&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;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>