<?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 configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63507/gpio-configuration</link><description>hi, I am working nrf52832. I am making configuration file for nrf52.so I want to used Led3 set as high. 
 #define LED3 ((GPIO_PIN_CNF_SENSE_High &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos) | \ (GPIO_PIN_CNF_DRIVE_S0S1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos) | \ (GPIO_PIN_CNF_DIR_Output</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Jul 2020 11:49:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63507/gpio-configuration" /><item><title>RE: GPIO configuration</title><link>https://devzone.nordicsemi.com/thread/258985?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 11:49:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4042f69-6eb8-489e-82ef-0534ebae7f15</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;No problem at all, I am happy to help.&lt;br /&gt;&lt;br /&gt;Do you have a nRF52 Development kit, or are you working on a custom board?&lt;br /&gt;If you do have a development kit, please download the latest &lt;a href="https://www.nordicsemi.com/Software-and-tools/Software/nRF5-SDK"&gt;nRF5 SDK&lt;/a&gt;.&lt;br /&gt;There, you may see examples of how you can program your device to achieve different functionality.&lt;br /&gt;For example, I would recommend taking a look at the code for the two examples I referenced in my previous comment.&lt;br /&gt;&lt;br /&gt;You may also use the GPIO HAL API directly, as mentioned. If you are going to do that, you can do it as described; by first configuring the pin as an output, and then using the gpio_pin_set function to set it to high.&lt;br /&gt;&lt;br /&gt;Could you specify for me what this high pin will be used for? Be advised that it is not recommended to power another device or sensor through the GPIO pins.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO configuration</title><link>https://devzone.nordicsemi.com/thread/258977?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 11:28:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b1da14f-fda2-429f-8ee8-6fba96d35443</guid><dc:creator>dewal</dc:creator><description>&lt;p&gt;thanks for response, actually i am not understand properly. Can explain me with any example?&lt;/p&gt;
&lt;p&gt;how to set that as high or positive pin?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO configuration</title><link>https://devzone.nordicsemi.com/thread/258913?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 06:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f9f7584-315a-417c-b274-4fe120c71212</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]this pin set to high or not?[/quote]
&lt;p&gt;It is not. You are only creating a preprocessor define with the pin configuration - you are not actually configuring anything.&lt;br /&gt;Furthermore, I am not sure I understand the configuration you are trying to achieve - you are setting the pin as an output that you would like to be high, but at the same time you want to sense when it is high?&lt;br /&gt;&lt;br /&gt;Which SDK are you using?&lt;br /&gt;If you would like to set a pin high, you may use the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Fgroup__nrf__gpio__hal.html"&gt;GPIO HAL API&lt;/a&gt; directly - using &lt;em&gt;nrf_gpio_cfg_output&amp;nbsp;&lt;/em&gt;and&amp;nbsp;&lt;em&gt;nrf_gpio_pin_set&amp;nbsp;&lt;/em&gt;to first configure it as a simple output before setting it to high.&lt;br /&gt;This functionality is demonstrated in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/gpio_example.html"&gt;Blinky example&lt;/a&gt;. For a little more advanced GPIO usage, please see the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/pin_change_int_example.html"&gt;pin change interrupt&lt;/a&gt; example.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to let me know if anything still should be unclear, or if you have any other questions.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>