<?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>nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82918/nrf5340dk-devicetree-file</link><description>Dear, I am new to Nordic. I trying to understand the various Defines for nRF5340DK kit using Devicetree.dts file. In that, I had look on SW0 defines. 
 1. The gpio0 reg is defined at addres at 0x842500, but what is 0x300 ? 
 2. Similarly, where led0 etc</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Jan 2022 14:57:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82918/nrf5340dk-devicetree-file" /><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/345950?ContentTypeID=1</link><pubDate>Tue, 04 Jan 2022 14:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cfe48f6-c5e9-4022-8e54-f10492dbdb7a</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey again Gulzar,&lt;/p&gt;
&lt;p&gt;When it comes to your first point, I am bit uncertain but I think it is mainly used when the GPIO is set as an input. For more info on how you should set up a GPIO I &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/basic/blinky/README.html?highlight=blinky"&gt;would recommend that you take a look at the blinky example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t worry, you can get help with all of this. But would you mind creating a new case for it? This is beginning to get off topic of dts.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/345393?ContentTypeID=1</link><pubDate>Wed, 29 Dec 2021 15:48:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6b02b2e-29be-47f6-9037-879a5aebe619</guid><dc:creator>mexco</dc:creator><description>&lt;p&gt;Dear, Few&amp;nbsp; more queries: 1. when any pin is used as GPIO Output ... what is sense of&amp;nbsp;&lt;span&gt;GPIO_ACTIVE_LOW etc in that case ? Similarly, when used as Digital Input ? Also, when any Pin is used an Analog I/P is it required to declare this flag ? Also, when any Pin is used dedicated to any peripheral say(UART, I2C), should this flag be declared ?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. In hardware, is any register like Pin_CNF(n), affected by this flag or any other ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Practically, in present project, I need to use two UARTs with (9600, 8,N,1) configuration. May I use P0.20&amp;nbsp;&amp;amp; P0.22 for one UART and P1.00 &amp;amp; P1.01 for second UART ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4. I need one I2C also.. I think to use P1.02 &amp;amp; P1.03&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5. I need to use NFC interface&amp;nbsp; also in the project so use of P0.02 &amp;amp; p0.03&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;6.&amp;nbsp; I need four analog channels .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;7. I need 6 Digitla Output pins to interface 16x2 alhanumeric LCD&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;please, help to write initialization code for each pin ?? I am just new to Nordic and Zypher.. though, I working on Microchip, Atmel etc since 15 years.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/345380?ContentTypeID=1</link><pubDate>Wed, 29 Dec 2021 14:20:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81a91f55-3ce0-4505-92a8-261e88dea62a</guid><dc:creator>Elfving</dc:creator><description>[quote user="mexco"]1. does gpios = &amp;lt; &amp;amp;gpio0 0x1c 0x1 &amp;gt;; force the pin Low after power on ?[/quote]
&lt;p&gt;I dont think so, though could you expand a bit on it being used to drive an LED? Is it an output pin for the LED?&lt;/p&gt;
[quote user="mexco"]2. Is the nRF5340 on nRF5340DK run on 5 volt supply or&amp;nbsp; 3 Volt[/quote]
&lt;p&gt;The supply voltage range can be found in &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fkeyfeatures_html5.html"&gt;the product specification.&lt;/a&gt; For the nRF5340 that is 1.7 V to 5.5 V. That is however only enough for the nRF SoC itself. If you only want to run the nRF on the DK you can connect that voltage to the VDD line. For the programmer chip as well you need 5V.&lt;/p&gt;
[quote user="mexco"]3. Are the port pins, UART pins, I2C Pins 5 Volt compatible or Level converter is required to connect with 5 volt devices ?&amp;nbsp;[/quote]
&lt;p&gt;The GPIO output voltage should be the same as the VDD voltage, so if you&amp;#39;d want 5V you would need a level converter.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/345285?ContentTypeID=1</link><pubDate>Tue, 28 Dec 2021 16:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0df51b41-c679-4a2f-bee9-a0a894225a7b</guid><dc:creator>mexco</dc:creator><description>&lt;p&gt;Dear Elfving, thanks.. I have few more reated queries: 1. does gpios = &amp;lt; &amp;amp;gpio0 0x1c 0x1 &amp;gt;; force the pin Low after power on ?&amp;nbsp; this pin is used to drive LED.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Is the nRF5340 on nRF5340DK run on 5 volt supply or&amp;nbsp; 3 Volt&lt;/p&gt;
&lt;p&gt;3. Are the port pins, UART pins, I2C Pins 5 Volt compatible or Level converter is required to connect with 5 volt devices ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/345274?ContentTypeID=1</link><pubDate>Tue, 28 Dec 2021 15:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eaae029-0560-45f8-9ed7-1017361e3071</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey again Gulzar!&lt;/p&gt;
&lt;p&gt;I must have missed that question, sorry about that.&lt;/p&gt;
[quote user=""]gpios = &amp;lt; &amp;amp;gpio0 0x1c 0x1 &amp;gt;; [/quote]
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.3.0-rc1-ncs2/include/devicetree/gpio.h"&gt;You can see here&lt;/a&gt; that the third number refers to if it is active low or active high. It&amp;#39;s boolean, but happens to be converted to hex here.&lt;/p&gt;
[quote user="mexco"]&amp;nbsp;&lt;span&gt;button0,&amp;nbsp;gpios = &amp;lt; &amp;amp;gpio0 0x17 0x11 &amp;gt;;&lt;/span&gt;[/quote]
&lt;p&gt;This was an interesting case, and is due to the (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;nbsp; line in the dts file. You can see in zephyr/include/dt-bindings/gpio/gpio.h that &lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define GPIO_ACTIVE_LOW (1 &amp;lt;&amp;lt; 0) //00001
#define GPIO_PULL_UP (1 &amp;lt;&amp;lt; 4) //10000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and 10000 | 00001 = 0b10001 = 0x11.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/344826?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 15:45:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306e4b3b-782e-4ba4-aa38-bd8106ef0705</guid><dc:creator>mexco</dc:creator><description>&lt;p&gt;Dear Elfving, thanks for your reply. In the above query, second point is pending. i.e. in the .dts file,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span&gt;button0,&amp;nbsp;gpios = &amp;lt; &amp;amp;gpio0 0x17 0x11 &amp;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;what is 0x17 and 0x11 ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340DK Devicetree File</title><link>https://devzone.nordicsemi.com/thread/344824?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 15:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd6a0d12-e889-4fc6-b8c9-f8a29839d577</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey Gulzar! Sorry about the delay&lt;/p&gt;
&lt;p&gt;I believe 0x300 refers to the space the peripheral occupies. &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0"&gt;For more info on the device tree files take a look at this tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67205/device-tree-reg-node-property/275888#275888"&gt;This thread might also be of interest to you.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I should also mention that due to the holidays you might have to expect both limited help and slower responses on DevZone.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>