<?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 Digital Output Not Working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59566/gpio-digital-output-not-working</link><description>Why isn&amp;#39;t this working? 
 
 The MPU_RESET_PIN is set to : NRF_GPIO_PIN_MAP( 0 , 20 ) 
 I can not seem to be able to alter the state of the PIN. Whenever I read the PIN its always HIGH. 
 I have successfully managed to work with in inout on NRF_GPIO_PIN_MAP</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Mar 2020 16:07:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59566/gpio-digital-output-not-working" /><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242513?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2020 16:07:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d23b97b8-b980-408e-8c75-b23f89c01e20</guid><dc:creator>aplatts</dc:creator><description>&lt;p&gt;You spotted my mistake&amp;nbsp;&lt;span&gt;nrf_gpio_pin_out_read() vs&amp;nbsp;nrf_gpio_pin_read()...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Its working now ... thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242302?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2020 07:56:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bdc1b1f-6c28-48d9-b96b-5ffb3b959f08</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Do you have a project file? Actually, the best would be if you zipped the project folder, such as e.g. SDK\examples\peripheral\pin_change_int&lt;/p&gt;
&lt;p&gt;if you zip pin_change_int, that would contain your main.c file, sdk_config.h (which you have there) and the project file. I don&amp;#39;t know what you use to compile, but I am missing that file here.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried to actually measure your pin? I see that you use&amp;nbsp;nrf_gpio_pin_read(), which is an input register. Perhaps you can try&amp;nbsp;nrf_gpio_pin_out_read()?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you use your&amp;nbsp;MPU_RESET_PIN for something else?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242207?ContentTypeID=1</link><pubDate>Sat, 28 Mar 2020 11:54:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d7112d7-1e1f-40f2-b93e-1b6b1e84f9aa</guid><dc:creator>aplatts</dc:creator><description>&lt;p&gt;Hi Edvin&lt;/p&gt;
&lt;p&gt;Struggling with my DK, I&amp;#39;ve attached my code though for you to have a look at.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0755.Archive.zip"&gt;devzone.nordicsemi.com/.../0755.Archive.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242156?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 15:07:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6286dccd-7ec3-4e6c-aa46-1dc4b92046ec</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Do that,&lt;/p&gt;
&lt;p&gt;Have a nice weekend &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242154?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 15:06:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:864d97b0-0d14-4ead-b113-b7bf74c9f48c</guid><dc:creator>aplatts</dc:creator><description>&lt;p&gt;Will do, probably get back to you on Monday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242152?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 15:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d0565a0-5de4-4a27-acb6-9b35f9bcf64e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Try to run the same code on the DK, does it replicate there? If so, is it possible to send the project, so that I can have a look?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242096?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 13:08:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ee0ea08-3bb0-4b7c-8bf3-9826fb4ab06b</guid><dc:creator>aplatts</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I was trying to move to NRFX, still don&amp;#39;t understand why my input on 19 works but my output on 20 doesn&amp;#39;t:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;    nrfx_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_SIMPLE(false);
    err_code = nrfx_gpiote_out_init(MPU_RESET_PIN, &amp;amp;out_config);
    APP_ERROR_CHECK(err_code);

    nrfx_gpiote_out_set(MPU_RESET_PIN);
    NRF_LOG_INFO(&amp;quot;RESET PIN : %d&amp;quot;, nrf_gpio_pin_read(MPU_RESET_PIN));
    NRF_LOG_FLUSH();
    nrf_delay_ms(50);
    nrfx_gpiote_out_clear(MPU_RESET_PIN);
    NRF_LOG_INFO(&amp;quot;RESET PIN : %d&amp;quot;, nrf_gpio_pin_read(MPU_RESET_PIN));
    NRF_LOG_FLUSH();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I receive:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: RESET PIN : 0 &lt;br /&gt;&amp;lt;info&amp;gt; app: RESET PIN : 0&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242088?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 12:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5be19814-5d6f-4b38-9a29-9a86ba071221</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Andrew,&lt;/p&gt;
&lt;p&gt;Ok, just wanted to check.&lt;/p&gt;
&lt;p&gt;Looking at your code, I am not quite sure where you got that code from.&lt;/p&gt;
&lt;p&gt;Look at the example SDK\examples\peripheral\pin_change_int&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void gpio_init(void)
{
    ret_code_t err_code;

    err_code = nrf_drv_gpiote_init();
    APP_ERROR_CHECK(err_code);

    nrf_drv_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_SIMPLE(false);

    err_code = nrf_drv_gpiote_out_init(PIN_OUT, &amp;amp;out_config);
    APP_ERROR_CHECK(err_code);
    
    ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then you can use&amp;nbsp;nrf_drv_gpiote_out_toggle(),&amp;nbsp;nrf_drv_gpiote_out_clear() and&amp;nbsp;nrf_drv_gpiote_out_set() to set the state of the pin.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242080?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 11:44:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc4c3092-0853-43ed-bea5-997315210f89</guid><dc:creator>aplatts</dc:creator><description>&lt;p&gt;Hi Edvin&lt;/p&gt;
&lt;p&gt;No I&amp;#39;m not using the nrf52840 DK (although I have one), instead I&amp;#39;m using a Spark-fun nrf52840 mini-pro. This board has free GPIOs on 19 through to 23.&lt;/p&gt;
&lt;p&gt;I have Pin 19 connected to the HW Interrupt of an MPU, which is working. I shifted the pin&amp;nbsp;assignment around to test using Pin 20 as the interrupt, which worked, so I know its free and available to use.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Digital Output Not Working</title><link>https://devzone.nordicsemi.com/thread/242071?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 10:50:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3f75c4-726a-460d-a889-8568d587906e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Are you using the nRF52840 DK?&lt;/p&gt;
&lt;p&gt;If so, look at the back of the DK. You can see that the pins P0.20-P0.23 are the DIO0-3 on the QSPI. This means that these pins are not connected to the output pins on the DK, but directly connected to the QSPI flash chip that is mounted on the DK. If you want to route e.g. pin P0.20 out, you need to cut SB 12 and short SB 22. The solder bridges on the DK is also listed &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/nrf52840_DK/solder_bridge.html" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, either cut and short(solder) the solder bridges, or use another GPIO for your application. If you want a quick test of your FW, e.g. pin P0.13 is connected to the GPIO (and the LED1 on the DK). So if you set P0.13 to 0, the LED will turn on, and if you set P0.13 to 1, the LED will turn off. Please note that if you do this in an example where the leds are controlled by the appilcation, such as the BLE examples, this may not work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another pin that isn&amp;#39;t connected to anything is e.g. P0.24.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>