<?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>How to simulate button press via SWD?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77349/how-to-simulate-button-press-via-swd</link><description>Hi. I flash a board with NRF51822 via SWD pads, and that way the push button is inaccessible, and I need to press it to test various functions. Push button is on 28 bit and signal led is on 29. I&amp;#39;m able to read from memory when button is released and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Jul 2021 09:53:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77349/how-to-simulate-button-press-via-swd" /><item><title>RE: How to simulate button press via SWD?</title><link>https://devzone.nordicsemi.com/thread/319747?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 09:53:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eba65c2-5b3d-4115-9ca4-0c90f71fb7c7</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;I am sorry, it looked to me that you were trying to write to the registers directly to turn on/off the led. Can you please clarify what you need help with?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to simulate button press via SWD?</title><link>https://devzone.nordicsemi.com/thread/319640?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 14:41:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48775571-3ceb-4d0a-ac53-d52b988825fd</guid><dc:creator>ArtemS</dc:creator><description>&lt;p&gt;That all is slightly irrelevant to my question... Ofc I&amp;#39;m using SDK. Making button as output would not help here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to simulate button press via SWD?</title><link>https://devzone.nordicsemi.com/thread/319639?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 14:39:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08222618-45ad-452b-a4a5-be85f505464b</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
[quote user=""]I need to figure out something software here, since there are 200 more of those board to flash and test...[/quote]
&lt;p&gt;&amp;nbsp;Why aren&amp;#39;t you using the nRF5 SDK? The latest nRF5 SDK with support for nRF51822 is nRF5 SDK v12.3.0, you can download it and the Softdevice (radio stack) from the nRF51822 product page on our website: &lt;a href="https://www.nordicsemi.com/Products/nRF51822/Download#infotabs"&gt;https://www.nordicsemi.com/Products/nRF51822/Download#infotabs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Documentation for the SDK can be found on nordic&amp;#39;s infocenter: &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/index.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And we have a Blinky example you can use which shows you how to configure GPIO pins as output using the BSP module: &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/gpio_example.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/gpio_example.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to simulate button press via SWD?</title><link>https://devzone.nordicsemi.com/thread/319489?ContentTypeID=1</link><pubDate>Sun, 11 Jul 2021 15:27:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c59972d-613f-4f27-9c39-4574c2c4e553</guid><dc:creator>ArtemS</dc:creator><description>&lt;p&gt;Well, I managed to emulate button press setting pull-down resistor for a button, and release setting pull-up. Don&amp;#39;t know why didn&amp;#39;t manage it before, perhaps OpenOCD deals with memory slightly different than Jlink.&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x107/__key/communityserver-discussions-components-files/4/pastedimage1626017078474v3.png" /&gt;&lt;br /&gt;&lt;br /&gt;Register addresses one can easily find in chip reference manual. Pull-down value here is 0x30004, and pull-up is 0x3000c.&lt;br /&gt;&lt;br /&gt;The only strange thing is that during sleep, pull-down setting is quickly removed. So I needed to set it several times in a row to be able to &amp;quot;press&amp;quot; it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>