<?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 does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38349/how-does-the-nrf52832-decide-to-enter-the-swd-mode</link><description>hi 
 my question is really basic, but i am not able to find an answer anywhere else. I am trying to program the nordic using its SWDIO and SWCLK pins and am stuck as i get &amp;quot; emulator not found&amp;quot; error. I am wondering what the problem could be. How does</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Oct 2018 07:20:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38349/how-does-the-nrf52832-decide-to-enter-the-swd-mode" /><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/150880?ContentTypeID=1</link><pubDate>Mon, 01 Oct 2018 07:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba87cf3-995d-4cab-b5c6-433c46408955</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRESET pin should have nothing to do with the programming process, unless you have routed the P0.21 pin to GND (constant reset after programming _if_ nRESET is enabled).&lt;/p&gt;
&lt;p&gt;Have you powered your external board&amp;nbsp;with 3.3V? Cheaper debuggers only has a set voltage in which they can program the device successfully on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/150581?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 05:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7dbb0bb-16d5-44c2-8e9a-58c949d039d8</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37150/nrf52832-disable-reset-pin-segger-embedded-studio"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/37150/nrf52832-disable-reset-pin-segger-embedded-studio&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;this also seems to help with the issue of programming. i have about&amp;nbsp;6 custom PCBs with me currently and of them i am able to program about 4 of them using the DK , and tinkering around with the reset pin. Other 2 PCBs still not being detected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I dont know if buying a segger programmer will solve this issue and if i should invest in the programmer and nrf52832 as such. These issues dont give lot of confidence in the chip&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148871?ContentTypeID=1</link><pubDate>Sat, 15 Sep 2018 09:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae98b8b-d2e4-4d1a-ba8f-382e7360997a</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;As a side note, nordic can consider bringing out the reset and SWO pins in their reference designs and kept as optional. it will be good heads up for the people using the designs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148870?ContentTypeID=1</link><pubDate>Sat, 15 Sep 2018 09:14:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1751750-70f7-44fb-bca5-635366c05f8f</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;i pulled up the reset pin and then tried recover by connecting to the DK. i powered the custom board separately, not from the DK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Problem solved this way.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I understand DK is not licence for production programming. Which segger part numbers can be used for the Nrf52X ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148295?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2018 23:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7089bb8b-fd39-40cf-b50b-4c5ef02a0e58</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;have you tried&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrfjprog --recover&amp;nbsp;&lt;/p&gt;
&lt;p&gt;because it&amp;#39;s possible the debug port is locked and so it won&amp;#39;t power up. As far as I can tell from guessing what the logfile means it&amp;#39;s trying to do a write to the DP SELECT register which is a fairly basic operation.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148113?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2018 02:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9bbbc51-05cb-44ab-babe-1b4d1bcd7137</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;yes, i searched for the error i am getting in the log, looks like many such cases for the nrf52.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;. . . . nRFXX_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1. . . . nRFXX_power_debug_and_system_regions: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;after this is the device getting &amp;quot;locked&amp;quot; in some way and there is no way to program it using SWD?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many threads with similar say it many be due to unstable power or RESET pin being not connected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried PCBs with 2 different layouts and power and i do not really doubt power issue on that. The RESET pin however unfortunately i left unused and is not brought out of the QFN. i might have to try and actually solder something on the QFN ic to pull the RESET to 3V.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148101?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 21:38:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c095e27-146e-4cee-8018-0dbd42eb5019</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;the processor doesn&amp;#39;t detect it - the debugger connects, powers up the debug port which is a separate piece of hardware inside the cortex-M and then halts the processor, or resets it or reads registers. There really isn&amp;#39;t a separate debug mode, there&amp;#39;s just running with and without the debug port powered up and in-use or not. Of course with the DAP powered bits of the power and clock systems remain running all the time so the chip can&amp;#39;t go into low power mode (for instance).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To your point in the next mail - a debugger can&amp;#39;t damage the device, so you&amp;#39;re getting it into a state it&amp;#39;s not being responsive to what you&amp;#39;re trying, however it&amp;#39;s undamaged.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148071?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 14:49:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ced6be29-be9e-48a2-82a4-be8a2b6aa93c</guid><dc:creator>cgadgil</dc:creator><description>&lt;pre class="ndfHFb-c4YZDc-fmcmS-DARUcf"&gt;nrfjprog --eraseall --log
nrfjprog version 9.7.3
--------------------------------------------------------------------------------
nRF_open_dll
. nRFXX_open_dll
. . nRFXX_dll_version
nRF_enum_emu_snr
. nRFXX_enum_emu_snr
nRF_enum_emu_snr
. nRFXX_enum_emu_snr
nRF_connect_to_emu_with_snr
. nRFXX_connect_to_emu_with_snr
. . nRFXX_is_connected_to_emu
. . nRFXX_connect_to_emu_without_snr
. . . nRFXX_is_connected_to_emu
. . . nRFXX_enum_emu_snr
. . nRFXX_connect_to_emu_without_snr:	JLink:	 Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
. . nRFXX_connect_to_emu_without_snr:	JLink:	 Hardware: V7.00
. . nRFXX_connect_to_emu_without_snr:	JLink:	 S/N: 20151216
. . nRFXX_connect_to_emu_without_snr:	JLink:	 Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFull
. . nRFXX_connect_to_emu_without_snr:	JLink:	 TELNET listener socket opened on port 19021
. . nRFXX_connect_to_emu_without_snr:	JLink:	WEBSRV  Starting webserver
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0031ms, 0039ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0034ms, 0042ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns O.K.
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0037ms, 0045ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0004ms, 0053ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand(&amp;quot;Device = NRF52832_xxAA&amp;quot;, ...). 
. . nRFXX_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink_V622g\JLinkDevices.xml evaluated successfully.
. . nRFXX_connect_to_emu_without_snr:	JLink:	Device &amp;quot;NRF52832_XXAA&amp;quot; selected.
. . nRFXX_connect_to_emu_without_snr:	JLink:	Device &amp;quot;NRF52832_XXAA&amp;quot; selected.
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0237ms, 0293ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand(&amp;quot;SetRestartOnClose = 0&amp;quot;, ...). 
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x01
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0297ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand(&amp;quot;DisableFlashDL&amp;quot;, ...). 
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0300ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand(&amp;quot;SetDbgPowerDownOnClose = 1&amp;quot;, ...). 
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x01
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0303ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand(&amp;quot;ExcludeFlashCacheRange 0x0-0xFFFFFFFF&amp;quot;, ...). 
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0001ms, 0306ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)
. . nRFXX_connect_to_emu_without_snr:	JLink:	  returns 0x00
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0003ms, 0310ms total)  
. . nRFXX_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)
. . nRFXX_connect_to_emu_without_snr:	JLink:	 (0002ms, 0313ms total)  
nRF_read_connected_emu_snr
. nRFXX_read_connected_emu_snr
. . nRFXX_is_connected_to_emu
. . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
. . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
. . nRFXX_is_connected_to_emu:	JLink:	 (0002ms, 0316ms total)  
nRF_read_device_family
. nRFXX_read_device_family
. . nRFXX_is_connected_to_emu
. . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
. . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
. . nRFXX_is_connected_to_emu:	JLink:	 (0003ms, 0320ms total)  
. . nRFXX_read_access_port_register
. . . nRFXX_coresight_configure
. . . nRFXX_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()
. . . nRFXX_coresight_configure:	JLink:	 &amp;gt;0x10B TIF&amp;gt;
. . . nRFXX_coresight_configure:	JLink:	 &amp;gt;0x10F TIF&amp;gt;
. . . nRFXX_coresight_configure:	JLink:	 &amp;gt;0x0D TIF&amp;gt;
. . . nRFXX_coresight_configure:	JLink:	 &amp;gt;0x0D TIF&amp;gt;
. . . nRFXX_coresight_configure:	JLink:	  returns 0
. . . nRFXX_coresight_configure:	JLink:	 (0009ms, 0330ms total)  
. . . nRFXX_power_debug_and_system_regions
. . . . nRFXX_write_debug_port_register
. . . . nRFXX_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
. . . . nRFXX_write_debug_port_register:	JLink:	 &amp;gt;0x0D TIF&amp;gt;
. . . . nRFXX_write_debug_port_register:	JLink:	  returns -1
. . . . nRFXX_write_debug_port_register:	JLink:	 (0004ms, 0336ms total)  
. . . . nRFXX_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

. . . nRFXX_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

nRF_close_dll
. nRFXX_close_dll
. . nRFXX_is_connected_to_emu
. . nRFXX_is_connected_to_emu:	JLink:	JLINK_IsOpen()
. . nRFXX_is_connected_to_emu:	JLink:	  returns 0x01
. . nRFXX_is_connected_to_emu:	JLink:	 (0002ms, 0339ms total)  
. . nRFXX_disconnect_from_emu
. . nRFXX_disconnect_from_emu:	JLink:	JLINK_Close()&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148069?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 14:42:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:856f32e7-b683-463b-be30-1ca5b1a45c42</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;reading the following gave a clearer picture&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0314h/Babdadfc.html"&gt; http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0314h/Babdadfc.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To update on the programming issue, i tried another set of custom PCB with nrf52832 with same result. The device is initially detected, softdevice&amp;nbsp; is programmed and while downloading the application i get an error. After this happens the my laptop refuses to detect the device. Any subsequent power up cycles and effort to connect to the device fail.&lt;/p&gt;
&lt;p&gt;I am afraid my programmer may be damaging my device in some way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148055?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 13:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4740040-c7ec-4b3e-8418-5667491866e9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF51 has mux&amp;#39;ed the nRESET pin with the SWDIO pin, so the setup there is a bit different to other Cortex M-family devices. The nRF52832 has dedicated SWDIO/SWDCLK pins, thus it uses the standardized ARM DAP to enable the &amp;quot;debugger interface&amp;quot; (DIF). More info can be found in one of our white papers:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.whitepapers/dita/whitepapers/nwp_027/intro.html?cp=11_4"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.whitepapers/dita/whitepapers/nwp_027/intro.html?cp=11_4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148051?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 13:34:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:656d0f51-b8db-4bd8-9b35-8cc69377b4fb</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;thanks!&lt;/p&gt;
&lt;p&gt;yes it seems so.. i will check with the manufacturer. However i would still want to know the answer to my question &amp;quot;&lt;span&gt;How does the nrf52832 detect a swd programmer connected and decide to enter the debug mode as against running its existing code if any? &amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;because i am not finding sufficient documentation on the reset process from hardware + firmware perspective at one place&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/148049?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 13:29:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccdc1c67-c79b-4112-b301-7c6540417da7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;For the specific debugger that you&amp;#39;re using, it seems that it has limited support according to this page: &lt;a href="https://www.waveshare.com/arm-debugger.htm"&gt;https://www.waveshare.com/arm-debugger.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It mentions that this only works with the nRF51822 board. I suspect that the manufacturer does not support other devices with this specific programmer, but I would recommend contacting them to double check.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/147913?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 03:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84e5d41e-2565-41be-8072-1bb2bdac2512</guid><dc:creator>cgadgil</dc:creator><description>&lt;p&gt;&lt;a href="https://www.waveshare.com/wiki/ARM_Debugger"&gt;https://www.waveshare.com/wiki/ARM_Debugger&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Although it does not mention the nordic microcontroller in the supported microcontroller list, since nordic is cortex M4 i believe it should still work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how does the nrf52832 decide to enter the swd mode?</title><link>https://devzone.nordicsemi.com/thread/147908?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 00:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e6a3099-8f4d-4b23-a866-ed667995404d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;what In Circuit Emulator or debugger are you using to try and program the chip? Segger? OpenOCD .. what?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>