<?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>SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41090/swo-pin-18-always-high-in-secure-bootloader</link><description>We have vibrator connected to gpio pin 18 on the nRF52832. Controlling it works fine in the application but as soon we enter DFU the vibrator starts and it doesn&amp;#39;t stop until DFU is finished and we reboot into the application. 
 I noticed that pin 18</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Dec 2018 08:56:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41090/swo-pin-18-always-high-in-secure-bootloader" /><item><title>RE: SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/thread/160138?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 08:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7620129-f1e9-411a-8da3-d9d8155b3968</guid><dc:creator>vist</dc:creator><description>&lt;p&gt;Yes, that was it! Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/thread/160123?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 07:55:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50a10055-e0cd-4a12-8768-4992d47f9a7b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That made things clearer. I did not think of it before, but pin 18 is used for LED_2 on the DK, which is lit by the bootloader during the DFU process. If you are using the pca10040.h BSP or something based on it, that is expected. The LED is set by&amp;nbsp;dfu_observer() in the bootloaders main.c file. Fixing it there&amp;nbsp;(or updating the board file for your custom HW) should resolve the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/thread/160014?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 14:59:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c212aa1a-1e88-4fc3-b99d-9f08add83319</guid><dc:creator>vist</dc:creator><description>&lt;p&gt;I added a LED blink at the same time as the vibrator is configured to off in the bootloader and it takes 5.5 s between the LED blink and the vibrator turning on. So there is something happening in the middle of the bootloader which turns it on.&lt;/p&gt;
&lt;p&gt;The vibrator turns on and off at the exact moment that the progress bar in nRF connect starts and finishes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/thread/159995?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 14:21:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a9c85de-6cac-474f-a4f6-634212d86b4e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. After reset the pin will be a input for a short while before it is configured in the bootloader, and in this case the signal controlling the vibrator will be floating. In this case,&amp;nbsp;the only way to make it behave predictably is to modify you HW by adding a pull resistor. That way the pin will never have an undefined state.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/thread/159985?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 14:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7d688f8-4b12-4896-9ad3-f7be26ae444e</guid><dc:creator>vist</dc:creator><description>&lt;p&gt;Unfortunately there isn&amp;#39;t a pull-down on the pin. I configure it as an output it and set it to 0 in the main application and that works well. Disabling the vibrator also works if I just run the bootloader directly. The issue only occurs when I perform a DFU. The strange thing is that controlling the other pins work fine. For example, the LED pin works as intended.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SWO (pin 18) always high in secure bootloader</title><link>https://devzone.nordicsemi.com/thread/159930?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 10:27:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41b56b79-76f8-4189-b5e6-2b2c22a7cfb1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The GPIO pin P0.18 (nRF52832) works as a normal GPIO as long as you have not defined ENABLE_SWO for your project. The bootloader should not touch pin 18 in any way out of the box, but I see in your code snippet that you configure it as an output and set it to 0. I suspect you should start looking there.&lt;/p&gt;
&lt;p&gt;Without knowing anything about your HW&amp;nbsp;I would think that the most natural would be to not touch pin 18 in the bootloader, so that it would be a disconnected input. In that case the state of the pin would be given by the external HW, typically a pull-up or pull-down resistor.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>