<?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 when using Zephyr with the nRF52840 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83881/issues-when-using-zephyr-with-the-nrf52840-dk</link><description>Hi, 
 I just started working with Zephyr and having some problems right out of the gate. 
 Board: Nordic nRF52840DK Example: i2c/spi_fujitsu_fram Branch: Main 
 When I&amp;#39;m using the SPI examples, I cannot see any activity on the pins. I have checked the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jan 2022 12:17:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83881/issues-when-using-zephyr-with-the-nrf52840-dk" /><item><title>RE: Issues when using Zephyr with the nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/349965?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 12:17:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9864ad2-dbeb-4fa4-bdda-81fca436ae37</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Ah, I assume the i2c sample is i2c_fujitsu_fram. Sample as in &amp;quot;sample code&amp;quot;, same as example.&lt;/p&gt;
&lt;p&gt;You should probably look at this guide, and some of the other guides in the side-bar: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/howtos.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/howtos.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is the page on overlay files: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/intro.html#dt-input-files"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/intro.html#dt-input-files&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An overlay file is a text file with the ending &amp;quot;.overlay&amp;quot;, which is placed in the application folder. To disable the spi1 and enable the i2c1 use an overlay file like this (both are instance 1, so only one can be used, if you want both they need to be different instances):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi1 {
    status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;i2c1 {
    status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You shouldn&amp;#39;t need to get the nodelabel for the gpio peripheral, or access pins directly in your application like that.&lt;/p&gt;
&lt;p&gt;You should probably try connecting the Fujitsu FRAM if that is possible, as the driver initialization will fail if it is not connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues when using Zephyr with the nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/349699?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2022 09:20:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5438d83a-7e06-4e04-8559-fdc1a4e1d287</guid><dc:creator>Elin Wollert</dc:creator><description>&lt;p&gt;Hi &amp;Oslash;ivind,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SPI:&lt;br /&gt;Yes, it says &amp;quot;Could not verify FRAM ID&amp;quot; which I guess makes sense since I don&amp;#39;t have the F&lt;span&gt;ujitsu FRAM connected. I haven&amp;#39;t checked all the pins on the whole board, but pin p0.31, p0.30 and p1.08 does not have any activity on it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I2C:&lt;br /&gt;I&amp;nbsp;believe that I did it, but might not be the correct way of doing it. How is the proper way of doing it? What do you mean by i2c sample?&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have another issue when I try to configure a GPIO in the I2C example. I have followed the guides in the documentation as well as the solutions &lt;a href="https://github.com/zephyrproject-rtos/zephyr/discussions/35932"&gt;here&lt;/a&gt;&amp;nbsp;and &lt;a href="https://lists.zephyrproject.org/g/users/topic/gpio_support_on_nrf52840_dk/32883657?p="&gt;here&lt;/a&gt; but none of them work. When I&amp;#39;m trying the last solution, aka adding these lines and using PORT and PIN in the gpio_pin_configure() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define PORT DT_ALIAS_GPIO_1_LABEL
#define PIN  1&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This should configure the p1.01 pin but I get this error &amp;quot;&lt;strong&gt;error: &amp;#39;DT_N_S_soc_S_gpio_50000300&amp;#39; undeclared (first use in this function); did you mean &amp;#39;DT_N_S_soc_S_gpio_50000300_ORD&amp;#39;?&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; 5770 | #define DT_N_NODELABEL_gpio1 DT_N_S_soc_S_gpio_50000300&amp;quot;&lt;/strong&gt;&amp;quot;. I checked the generated file devicetree_unfixed.h but I cannot see the DT_ALIAS_GPIO_1_LABEL there so I modified it slightly to be more similar to the blinky example. But even after changing to this, I get the same error.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define GPIO_1 DT_NODELABEL(gpio1)

#define PORT GPIO_1 
#define PIN  1&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Why doesn&amp;#39;t this work?&amp;nbsp;Should it be configured in a different way?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&amp;nbsp;&lt;br /&gt;Elin&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues when using Zephyr with the nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/348972?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 14:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1623f0f4-8be9-4aa3-a57f-7fd61788e343</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For the SPI example, are any errors printed when you run the sample? Looks like it should print &amp;quot;Could not verify FRAM ID&amp;quot; if the first spi function fails. Is there activity on any of the other pins? Do you see anything on any of the pins if you remove the loop you added?&lt;/p&gt;
&lt;p&gt;For the i2c sample, did you remember to disable spi1 and enable i2c1 in an overlay file? Which i2c sample are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>