<?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>GPIO troubles</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41564/gpio-troubles</link><description>sad</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Dec 2018 13:44:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41564/gpio-troubles" /><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161873?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 13:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03c6d421-94fd-4135-925c-792653bd15d1</guid><dc:creator>Saram</dc:creator><description>&lt;p&gt;It no longer makes sense, changed the environment to IAR and everything works as it should (not only the GPIO, but also the entire project including SPI).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161872?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 13:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c27ff4b1-3a72-4196-876a-688c86f0ff8a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Sounds like there is something wrong with your project settings then. If you post your project, I can take a look at it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161861?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 13:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5eb8bda-470c-45d5-a625-0a1c647fd9f9</guid><dc:creator>Saram</dc:creator><description>&lt;p&gt;I tested on the same module. Firmware coincided absolutely. The only difference is that the colleague used IAR om, and I KEIL&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161860?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 13:05:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:799e40c7-505f-4d73-9685-9f9f249a1c68</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Could there be something wrong with your module, or did you test it on the same module?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161856?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 12:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc7eddfc-8b1f-4ea0-94b5-1269d3e89c91</guid><dc:creator>Saram</dc:creator><description>&lt;p&gt;Mystic. I rerun Listing 2 from a colleague - everything works&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161849?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 12:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8ba89e1-d103-420b-9d93-379564f97277</guid><dc:creator>Saram</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define BASE 0x50000000

ptr = (int*) (BASE + 0x714);
*ptr= 0x00000001;
while (1)
{
ptr = (int*)(BASE + 0x508);
*ptr=0x20;
nrf_delay_ms(1000);
ptr = (int*)(BASE + 0x50C);
*ptr=0x20;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This code works as expected (for port 0 pin 5). But if I try to register BASE as 0x50000300 and change the pin of the first port accordingly (Listing 2), nothing happens.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define BASE 0x50000300
ptr = (int*) (BASE + 0x708);
*ptr= 0x00000001;
while (1)
{
	ptr = (int*)(BASE + 0x508);
	*ptr=0x4;
	nrf_delay_ms(1000);
	ptr = (int*)(BASE + 0x50C);
	*ptr=0x4;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161829?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 09:37:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0edfe9e5-350e-4995-a25d-201f1c2072d7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I tested both codes on a nRF52840 DK. Both work as expected. Please make sure the pins are not configured for anything else when using as GPIO (SPI, etc.). Do you see any pin change on your scope?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161713?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 14:48:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940b6736-0a55-4f64-915a-2bd6b8ca0bea</guid><dc:creator>Saram</dc:creator><description>&lt;p&gt;I just tried, incl. on zero port on several pins.&lt;br /&gt;Unfortunately, the result is zero. Maybe you need some PPI settings or disable standard UART or something else.&lt;br /&gt;During the tests - additionally did not include anything. If you enable SPI 0 and output MOSI or SCK on the same P 1.02 - everything works, I see the signal visually (on the LED) and on the oscilloscope - the signal is clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161704?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 14:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72909c31-67d6-4851-879c-b4a3624bffe9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Which SDK version are you using? Have you tried both setting and clearing the GPIO? Have you tried setting the GPIO manually without the GPIO HAL functions?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_P1-&amp;gt;PIN_CNF[2] = (GPIO_PIN_CNF_DIR_Output &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos) |
                     (GPIO_PIN_CNF_DRIVE_S0S1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos) |
                     (GPIO_PIN_CNF_INPUT_Disconnect &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos) |
                     (GPIO_PIN_CNF_PULL_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos) |
                     (GPIO_PIN_CNF_SENSE_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos);
                              
NRF_P1-&amp;gt;OUTSET = (1UL &amp;lt;&amp;lt; 2);  // Set GPIO P1.02 high

NRF_P1-&amp;gt;OUTCLR = (1UL &amp;lt;&amp;lt; 2);  // Set GPIO P1.02 low&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161651?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 12:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9371b2f4-6460-400c-8d97-4407b4246a97</guid><dc:creator>Saram</dc:creator><description>&lt;p&gt;Yes it is connected to P1.02. If in SPI config I choose 34 for SCK and trasmitting i see the light&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1544703252497v1.png" alt=" " /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1544703272066v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO troubles</title><link>https://devzone.nordicsemi.com/thread/161650?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 12:12:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a7599e9-9a2f-4fb8-b22c-1ed442784fd3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;How have you connected the LED? Did you connect the LED to GPIO P1.02 (pin # 39 on the module)? Note that the pin numbers used in the application is referring to the GPIO number (PORT_NUMBER*32 + PIN_NUMBER).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>