<?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>Disable pin reset for west flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80028/disable-pin-reset-for-west-flash</link><description>I have an application that is utilizing P0.21 as gpio. However, if I use the command &amp;quot;west flash&amp;quot;, I P0.21 get configured as a pin reset. 
 
 Is it possible to disable this so west doesn&amp;#39;t doesn&amp;#39;t configure the system for a reset pin?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Jun 2023 14:25:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80028/disable-pin-reset-for-west-flash" /><item><title>RE: Disable pin reset for west flash</title><link>https://devzone.nordicsemi.com/thread/432377?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 14:25:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fab67d3-7250-4c08-8102-fb69dcfe392d</guid><dc:creator>ElectRocnic</dc:creator><description>&lt;p&gt;I have to say tho, in case someone else experiences the same problem:&lt;br /&gt;&lt;br /&gt;I could not use the west command manually because I used a freestanding app with VS Code and west would always complain about something when I tried it manually.&lt;br /&gt;&lt;br /&gt;VS Code seems to use west under the hood, but also runner configurations.&lt;br /&gt;The runner seems to be configured in the board.cmake config file, which in my case was located in the zephyr ncs directory under .../ncs/v2.4.0/zephyr/boards/arm/myBoardID/board.cmake&lt;br /&gt;And there I had to add this one line to solve it:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;board_runner_args(nrfjprog &amp;quot;--softreset&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then the lines&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;Enabling pin reset.
Applying pin reset.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;did not show up anymore in the VS Code output of the terminal during flashing.&lt;br /&gt;&lt;br /&gt;Note, that I also had to run this command manually in a terminal once in advance in order to get my P0.18 pin working as a CS GPIO pin instead of the Reset-feature.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --eraseall&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note, that, one can also duplicate the already existing board config directory in the ncs file hierarchy to their freestanding app repo folder and rename it slightly (I think it should have a different board name then to be unique?) so one can track this changed board.cmake line in their git repo. I think this is cleaner than having local changes in a local ncs installation which is separate from the app itself.&lt;br /&gt;Also, beware that you than have to change the board ID in your project.&lt;br /&gt;In my case using VS Code, it will ask this setting when I add a new build configuration which sets&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOARD=&amp;quot;nrf52840dk_nrf52840&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;inside .../app/build/zephyr/.config and therefore knows which board.cmake should be used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable pin reset for west flash</title><link>https://devzone.nordicsemi.com/thread/331351?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 14:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ab0b592-cdc7-4789-8347-3b457bee4be1</guid><dc:creator>Rocky</dc:creator><description>&lt;p&gt;Answering my own question.&amp;nbsp; I found the documentation for choosing a flash runner.&amp;nbsp; I also found I was able to list the available flash runners and options using the command &lt;strong&gt;west flash -H&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The command to flash without a pin reset is&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west flash --softreset&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable pin reset for west flash</title><link>https://devzone.nordicsemi.com/thread/331337?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 13:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:348b63f6-3b7d-4398-831f-cbfcd2e39d8c</guid><dc:creator>Rocky</dc:creator><description>&lt;p&gt;Right, I have that setting, but when I use &lt;strong&gt;west flash&lt;/strong&gt;, the pin gets re-configured as reset.&amp;nbsp; See the &amp;quot;Enabling pin reset&amp;quot; line below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner nrfjprog
Using board 17xxxxxx
-- runners.nrfjprog: Flashing file: C:\git\app\build\zephyr\zephyr.hex
Parsing image file.
Erasing page at address 0x0.
Erasing page at address 0x1000.
Erasing page at address 0x2000.
Erasing page at address 0x3000.
Erasing page at address 0x4000.
Erasing page at address 0x5000.
Erasing page at address 0x6000.
Erasing page at address 0x7000.
Erasing page at address 0x8000.
Erasing page at address 0x9000.
Erasing page at address 0xA000.
Erasing page at address 0xB000.
Erasing page at address 0xC000.
Erasing page at address 0xD000.
Erasing page at address 0xE000.
Erasing page at address 0xF000.
Erasing page at address 0x10000.
Erasing page at address 0x11000.
Erasing page at address 0x12000.
Erasing page at address 0x13000.
Erasing page at address 0x14000.
Erasing page at address 0x15000.
Erasing page at address 0x16000.
Erasing page at address 0x17000.
Erasing page at address 0x18000.
Erasing page at address 0x19000.
Erasing page at address 0x1A000.
Erasing page at address 0x1B000.
Erasing page at address 0x1C000.
Erasing page at address 0x1D000.
Erasing page at address 0x1E000.
Erasing page at address 0x1F000.
Erasing page at address 0x20000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Enabling pin reset.
Applying pin reset.
-- runners.nrfjprog: Board with serial number 17xxxxxx flashed successfully.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable pin reset for west flash</title><link>https://devzone.nordicsemi.com/thread/331225?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 07:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2966ad66-3d2f-4d41-9962-be96bffc1697</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can disable pin reset by sitting &lt;code&gt;CONFIG_GPIO_AS_PINRESET=n&lt;/code&gt; in your prj.conf.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>