<?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] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115258/gpio-toggling-of-gpio-pin-high-low</link><description>I am programming with the nRF52840DK. [Toolchain Manager: v1.3.0, IDE: Visual Studio Code (VSCode), SDK: ncs v2.6.0, window11 pro] 
 I simply want to toggle the 0.18 pin between HIGH and LOW states. I&amp;#39;m trying to test this, but it gets stuck in either</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Oct 2024 12:01:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115258/gpio-toggling-of-gpio-pin-high-low" /><item><title>RE: [GPIO] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/thread/505330?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 12:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e5c1980-b879-49ff-bfd7-ad81e52e565c</guid><dc:creator>seongmincho</dc:creator><description>&lt;p&gt;Yes! Looking at the nrf52840dk_nrf52840.dts file, it seems I didn&amp;#39;t pay attention to the &amp;#39;gpio-reserved-ranges&amp;#39; variable below.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
	gpio-reserved-ranges = &amp;lt;0 2&amp;gt;, &amp;lt;6 1&amp;gt;, &amp;lt;8 3&amp;gt;, &amp;lt;17 7&amp;gt;;
	gpio-line-names = &amp;quot;XL1&amp;quot;, &amp;quot;XL2&amp;quot;, &amp;quot;AREF&amp;quot;, &amp;quot;A0&amp;quot;, &amp;quot;A1&amp;quot;, &amp;quot;RTS&amp;quot;, &amp;quot;TXD&amp;quot;,
		&amp;quot;CTS&amp;quot;, &amp;quot;RXD&amp;quot;, &amp;quot;NFC1&amp;quot;, &amp;quot;NFC2&amp;quot;, &amp;quot;BUTTON1&amp;quot;, &amp;quot;BUTTON2&amp;quot;, &amp;quot;LED1&amp;quot;,
		&amp;quot;LED2&amp;quot;, &amp;quot;LED3&amp;quot;, &amp;quot;LED4&amp;quot;, &amp;quot;QSPI CS&amp;quot;, &amp;quot;RESET&amp;quot;, &amp;quot;QSPI CLK&amp;quot;,
		&amp;quot;QSPI DIO0&amp;quot;, &amp;quot;QSPI DIO1&amp;quot;, &amp;quot;QSPI DIO2&amp;quot;, &amp;quot;QSPI DIO3&amp;quot;,&amp;quot;BUTTON3&amp;quot;,
		&amp;quot;BUTTON4&amp;quot;, &amp;quot;SDA&amp;quot;, &amp;quot;SCL&amp;quot;, &amp;quot;A2&amp;quot;, &amp;quot;A3&amp;quot;, &amp;quot;A4&amp;quot;, &amp;quot;A5&amp;quot;;
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [GPIO] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/thread/505276?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 07:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc2e7742-2098-4f19-af24-53d639fc8f4e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. I expect if you test with pin 13 you will see it work. Pin 18 requiers a few additional changes, as it is the reset pin. First of all you need to configure your project to not enable it as a pin reset, and if using VS code,&amp;nbsp;and you also need to configure VS code to not enable pin reset when programming (or if building from the command line, pass --softreset to west. This is alle explained in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/114244/nreset-0-18-disable/500155"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Secondly, pin 18 along with other pins are routed to the onboard debugger when debugging, so you need to disconnect the debugger (for intsance with the nRF only switch on the top of the DK in order to be able to access it on the DK (you can see this in the GPIO table on the back side of the DK).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [GPIO] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/thread/505273?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 07:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab241318-90d9-46f9-a8d7-9c553b083ed5</guid><dc:creator>seongmincho</dc:creator><description>&lt;p&gt;I am measuring signals with an oscilloscope.&lt;/p&gt;
&lt;p&gt;I connected wires to the pins and directly attached them to the alligator clips of the oscilloscope.&lt;/p&gt;
&lt;p&gt;pin - wire - alligator clip&lt;/p&gt;
&lt;p&gt;The input impedance of the oscilloscope is 1M &amp;Omega;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [GPIO] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/thread/505270?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 06:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3556c1b4-ae51-4e13-b627-8b4ad9b9876d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any issue with how you toggle the pin, and when I test on a DK (I just changed the pin number to one connected to a LED), it toggles as expected. How did you see that toggling does not work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [GPIO] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/thread/505265?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 03:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01251343-f346-469b-83fd-580358060305</guid><dc:creator>seongmincho</dc:creator><description>&lt;p&gt;Thank you for your response!&lt;br /&gt;Using the &amp;#39;gpio_pin_get()&amp;#39; function for debugging was not appropriate. However, my main issue is that pin18 is not toggling between high and low. Pin18 remains in a high state continuously&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [GPIO] Toggling of GPIO pin (HIGH, LOW)</title><link>https://devzone.nordicsemi.com/thread/505199?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2024 13:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:883ed1a7-2050-4596-be35-0831c9c90a4e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;gpio_pin_get() function can only be used to read the state of pins configured as an input. It is possible to read the state of an output pin as well, but not with this Zephyr API function. Instead, you can include&amp;nbsp;hal/nrf_gpio.h in your project and use&amp;nbsp;nrf_gpio_port_out_read() or nrf_gpio_port_out_read().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>