<?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>Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48478/custom-board-based-on-nrf9160-gpio-pin-mapping-problem</link><description>Hello, I&amp;#39;m trying to map custom PIN mapping on my prototype board, based on nRF9160 DK. I had to remove the UART0 pins and map them for my purpose, but when I&amp;#39;m trying to configure the pins: int LED_RED = 28; int LED_GREEN = 30; int initializeDiode1 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Aug 2020 09:36:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48478/custom-board-based-on-nrf9160-gpio-pin-mapping-problem" /><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/263774?ContentTypeID=1</link><pubDate>Mon, 10 Aug 2020 09:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c802f11-2845-496f-ba99-dd59e579df5f</guid><dc:creator>Yury Morgunov</dc:creator><description>&lt;p&gt;Already created a topic:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64596/some-uart-registers-don-t-change-after-changing-in-overlay"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/64596/some-uart-registers-don-t-change-after-changing-in-overlay&lt;/a&gt;&lt;br /&gt;Now I&amp;#39;m trying to figure out what they answered me&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/263770?ContentTypeID=1</link><pubDate>Mon, 10 Aug 2020 09:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bad45ec-8a60-4e31-a289-e64743018c3a</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Yury,&lt;br /&gt;This case is over 1 year old. Please make a new ticket and also state which NCS version you are using since there has been updates since 2019.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/263516?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 06:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e6cb588-1d58-41a1-b4be-0d86e870c456</guid><dc:creator>Yury Morgunov</dc:creator><description>&lt;p&gt;Hello!&lt;br /&gt;I faced a similar problem. Tell me, could you solve it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/192506?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 20:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d163455b-0b94-420c-94fb-3c5a4e65c028</guid><dc:creator>Marcin</dc:creator><description>&lt;p&gt;Thank you for your message, I really appreciate that!&lt;br /&gt;&lt;br /&gt;My problem is unfortunately still not solved. I cannot turn the state to on and pin 0.30. I checked with the multimeter and there is no voltage on the output on 0.30.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;On&amp;nbsp;0.28 I can control state (1/0) but not on 0.30&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve noticed that:&lt;br /&gt;- pin 28 (as you mentioned) is a part of Uart0&lt;br /&gt;- pin 30 is a part of i2c&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My overlay file:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;amp;uart0 {&lt;br /&gt; tx-pin = &amp;lt;10&amp;gt;;&lt;br /&gt; rx-pin = &amp;lt;11&amp;gt;;&lt;br /&gt; rts-pin = &amp;lt;12&amp;gt;;&lt;br /&gt; cts-pin = &amp;lt;13&amp;gt;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&amp;amp;i2c2 {&lt;br /&gt; sda-pin = &amp;lt;2&amp;gt;;&lt;br /&gt; scl-pin = &amp;lt;0&amp;gt;;&lt;br /&gt; clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My code:&lt;/p&gt;
&lt;p&gt;#include &amp;lt;gpio.h&amp;gt;&lt;br /&gt;#include &amp;lt;misc/printk.h&amp;gt;&lt;br /&gt;#include &amp;lt;zephyr.h&amp;gt;&lt;/p&gt;
&lt;p&gt;int LED_GREEN = 28;&lt;br /&gt;int LED_RED = 30;&lt;br /&gt;void main(void) {&lt;/p&gt;
&lt;p&gt;struct device *gpio_dev;&lt;br /&gt; gpio_dev = device_get_binding(DT_GPIO_P0_DEV_NAME);&lt;/p&gt;
&lt;p&gt;int initializeDiode1 = gpio_pin_configure(gpio_dev, LED_RED, GPIO_DIR_OUT);&lt;br /&gt; int initializeDiode2 = gpio_pin_configure(gpio_dev, LED_GREEN, GPIO_DIR_OUT);&lt;br /&gt; int redInit = gpio_pin_write(gpio_dev, LED_RED, 1);&lt;br /&gt; int greenInit = gpio_pin_write(gpio_dev, LED_GREEN, 1);&lt;br /&gt; &lt;br /&gt; while (1) {&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As mentioned, I&amp;#39;m using a custom PCB board with&amp;nbsp;&lt;span&gt;RF9160-SICA&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/192501?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 19:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6808a8b3-6968-4a03-b8d5-cccf700b5cd3</guid><dc:creator>DevinCallahan</dc:creator><description>&lt;p&gt;I think my initial answer was wrong about how to fix this.&amp;nbsp; What you want is to assign different pins to UART0 through the Device Tree.&amp;nbsp; We can do that with an overlay file.&lt;/p&gt;
&lt;p&gt;Create a file called exactly &amp;quot;nrf9160_pca10090ns.overlay&amp;quot; in the project source directory (at the same level as CMakeLists.txt).&amp;nbsp; It must be exactly &amp;quot;&amp;lt;board name you configured project with&amp;gt;.overlay&amp;quot; because the zephyr build process uses the board&amp;nbsp;name when searching this for file in your&amp;nbsp;project directory.&lt;/p&gt;
&lt;p&gt;I know that is has found my overlay file because the initial west build will dump something like this to the console:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-- Loading ~/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
-- Overlaying ~/zephyr/dts/common/common.dts
-- Overlaying ~/nrf/experiment/shell_test/nrf9160_pca10090ns.overlay&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the .overlay file define this.&amp;nbsp; Pick which pins you want to move the UART to (I chose 10-13 because those just happen to be free pins on the dev-kit):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
    tx-pin = &amp;lt;10&amp;gt;;
    rx-pin = &amp;lt;11&amp;gt;;
    rts-pin = &amp;lt;12&amp;gt;;
    cts-pin = &amp;lt;13&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will modify the pins that get assigned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can verify this by looking at the header file the device tree system generates at: &amp;quot;build/zephyr/include/generated/generated_dts_board_unfixed.h&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Before adding the overlay I get these definitions (which match the default config):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define DT_NORDIC_NRF_UARTE_40008000_CTS_PIN		26
#define DT_NORDIC_NRF_UARTE_40008000_RTS_PIN		27
#define DT_NORDIC_NRF_UARTE_40008000_RX_PIN		28
#define DT_NORDIC_NRF_UARTE_40008000_TX_PIN		29&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After adding the overlay I get these definitions:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define DT_NORDIC_NRF_UARTE_40008000_CTS_PIN		13
#define DT_NORDIC_NRF_UARTE_40008000_RTS_PIN		12
#define DT_NORDIC_NRF_UARTE_40008000_RX_PIN		11
#define DT_NORDIC_NRF_UARTE_40008000_TX_PIN		10&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/192499?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 19:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38967329-9ff5-45ec-b32e-7d48a0a07555</guid><dc:creator>Marcin</dc:creator><description>&lt;p&gt;I removed uart0 from chosen {} and even changed the pin definitions in _common.dts but still without any result. Any information about how to change the config properly?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/192498?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 19:19:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e81ed479-478e-4492-b5c1-42f2a63059d6</guid><dc:creator>Marcin</dc:creator><description>&lt;p&gt;Basically the microchipnRF9160-SICA&lt;br /&gt;BAA-E2.1.8&lt;br /&gt;11YP5&lt;br /&gt;&lt;br /&gt;Is connected with the GPS, SIM card on the custom PCB.&lt;br /&gt;I can properly upload the code, but I cannot access previously defined pins (28,29,30,31) and (7 and 8)&lt;br /&gt;&lt;br /&gt;Overlay file does not change the availability of pin 28 and 30.&lt;br /&gt;&lt;br /&gt;Can I get any assist with that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/192470?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 16:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d6a19a2-4a46-42da-b30b-55838f8daed7</guid><dc:creator>DevinCallahan</dc:creator><description>&lt;p&gt;Pin 28 is being used as the RX pin for UART0 in the default Device Tree for the devkit.&amp;nbsp; This is configured at:&amp;nbsp;/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090_common.dts&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	status = &amp;quot;ok&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	tx-pin = &amp;lt;29&amp;gt;;
	rx-pin = &amp;lt;28&amp;gt;;
	rts-pin = &amp;lt;27&amp;gt;;
	cts-pin = &amp;lt;26&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unless you modify the &lt;em&gt;zephyr,console chosen&lt;/em&gt; attribute to not use UART0 for the console, the default configuration will initialize pin 28 for the UART.&amp;nbsp; I don&amp;#39;t think the chip handles pin-mux conflicts very well.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Additionally the 52840 on the DK configures P0.28 to go to VCOM0 on the FTDI chip.&amp;nbsp; If you want to use P0.28 on one of the Arduino headers you will need to modify the 52840 config to do so.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Board based on nRF9160 + GPIO Pin Mapping problem</title><link>https://devzone.nordicsemi.com/thread/192355?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 12:12:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fc186dc-a397-4fcc-9852-0c7c9ff671a0</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Marcin,&lt;/p&gt;
&lt;p&gt;How much have you based it on the nRF91DK?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please try to&amp;nbsp;update the .overlay file for the &lt;em&gt;spm&lt;/em&gt; as well for your application.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Also please study the &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/nrf-connect-sdk-tutorial" rel="noopener noreferrer" target="_blank"&gt;nRF Connect SDK tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>