<?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>unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94747/unable-to-debug-nrf52840-usb-cdc-acm-built-on-ble-client-application</link><description>I&amp;#39;m facing an issue to debug nrf52840 using usb cdc acm application on top of ble client application . Same result when using Fanstel based on nrf52840 connected via usb to the host as well. 
 
 In most cases resetting the target force a recovery after</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Jan 2023 12:44:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94747/unable-to-debug-nrf52840-usb-cdc-acm-built-on-ble-client-application" /><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/403577?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 12:44:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03f40ab1-301d-4043-bb04-223149b35478</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just wanted to let you know that I tried to reproduce this on my end with an nRF52840 Dongle running the USB CDC ACM project, but connecting to the COM port worked fine both with and without a debugger connected to the device.&lt;/p&gt;
&lt;p&gt;So again, could it be related to voltage levels on your dongle specifically? USB probably activates REG0 with 1.8V output, but perhaps the debugger forces the VDD voltage to 3V or something on your end. It should work anyways though, but can you check the VDD voltage level on your Dongle with and without the debugger connected?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/402235?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2022 09:54:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a5a8e60-ff3d-478c-b85f-3bda3dbbf23e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;div&gt;Hi, Simon and most of our R&amp;amp;D team is on vacation until 2nd of January and we are thinly staffed during these holiday season. Please expect delays in response until Simon is back from the vacation. We appreciate your patience and thank you for your understanding&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/401789?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2022 17:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1818fb1e-01c1-4232-8c78-d8e4b90158d0</guid><dc:creator>RVA</dc:creator><description>&lt;p&gt;Hello Simon,&lt;/p&gt;
&lt;p&gt;Will appreciate your response if any idea comes up&amp;nbsp;- thanks for helping!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/401302?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2022 14:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ccfd584-eb41-4e09-bb61-46fe2ab7fe39</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The issue requiring a recover before flashing the application again must be because APPROTECT is enabled, and to disable APPROTECT you must first erase the UICR entirely. which&amp;nbsp;&lt;span&gt;can only be done by an erase all (ERASEALL in the&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52810/dif.html?unique_321009888"&gt;Control access port&lt;/a&gt;&lt;span&gt;). In practice that is most easily done using &amp;quot;&lt;/span&gt;&lt;code&gt;nrfjprog --recover&lt;/code&gt;&lt;span&gt;&amp;quot;. Note that this will erase&amp;nbsp;entire flash content. There is (intentionally) no way around that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As to why the COM port doesn&amp;#39;t work while debugging the Dongle I don&amp;#39;t have any good ideas I&amp;#39;m afraid, but I have asked around internally to see if someone here has any good reasoning as to why this happens.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/401144?ContentTypeID=1</link><pubDate>Sun, 18 Dec 2022 09:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97b95acc-4795-4093-a68a-89e16a4b2a87</guid><dc:creator>RVA</dc:creator><description>&lt;p&gt;I&amp;#39;m using JLINK + Olimex ARM-JTAG 20-10 adapter , that connected to the target via SWD interface.&lt;/p&gt;
&lt;p&gt;The Dongle target is powered by the USB, I&amp;#39;m not using any external power.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m opening the port using Putty on my Linux machine.-&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I find the port using the command &amp;quot; ls&amp;nbsp; /dev/ttyACM* &amp;quot;.&lt;/p&gt;
&lt;p&gt;When the application is running (with no debugger) the host recognize the port with no issues,&lt;/p&gt;
&lt;p&gt;Else, I get this error message when trying to open it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/failed_5F00_to_5F00_open_5F00_port.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you think that my problem comes it low voltage when the debagging is activated? could you please elaborate more about it? and how could I test it?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/401061?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2022 12:59:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b34bac63-7316-4e97-ba9f-ed7070c18e4b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What debugger are you using exactly to debug this device? Does it support the voltage(s) you&amp;#39;re running these boards at, and does it power the boards, or is the reason they are crashing when you remove the USB that the board/dongle no longer have enough power to run? As to why the USB port fails to open I&amp;#39;m not sure unfortunately. How exactly are you trying to open the USB port, and what do you see in the program/terminal you open it in?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/400782?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2022 09:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e9e1abc-9f26-4d5a-ab55-3476e83ba334</guid><dc:creator>RVA</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I already tried this option - disable the APPROTECT.&lt;/p&gt;
&lt;p&gt;Inside my main I wrote flash by&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;volatile&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;uint32_t&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;user_data&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;__attribute__&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp;((&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;section&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;(&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;quot;.uicr_customer&amp;quot;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;))) = (&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;uint32_t&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;)(&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;0xFFFFFF5A&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;inside of&amp;nbsp;&lt;span&gt;ble_app_uart_c_gcc_nrf52.ld &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;1. I defined the memory section&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;MEMORY&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;span class="x_ContentPasted1"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;UICR&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;rw&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;)&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;:&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;ORIGIN&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;=&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;0x10001208&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;LENGTH&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;=&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;0x4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;FLASH&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;rx&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;)&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;:&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;ORIGIN&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;=&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;0x26000&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;LENGTH&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;=&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;0xda000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;RAM&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;rwx&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;)&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;:&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;ORIGIN&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;=&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;0x2000C5B0&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;LENGTH&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;=&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted1"&gt;0x33A50&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;2. and added this section of the end of the file&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;span class="x_ContentPasted2"&gt;SECTIONS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;span class="x_ContentPasted2"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;.uicr_customer&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;:&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;KEEP(*&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;(&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;.uicr_customer&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp; }&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;&amp;gt;&lt;/span&gt;&lt;span class="x_ContentPasted2"&gt;&amp;nbsp;UICR&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;br class="x_ContentPasted2" /&gt;&lt;span class="x_ContentPasted2"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;For a long period it didn&amp;#39;t worked out for me, but because you pointed me out back to this solution, I found out&amp;nbsp;a scenario where I was able to activate the debugger. but couldn&amp;#39;t open the usb port while the debugging session was active&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;Scenario as follows:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;(This time I used JFlash app instead of using nrfjprog commands)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;erase chip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;program &amp;amp; verify&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;Without start running the application.. go to vscode, pushed debug&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;The debugger started and stopped at main as expected&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;Jflash read memory was ok, UICR value OK (see green mark)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;Continued to run the application in debug mode&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;Failed to open the USB port !&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Pulled out and pushed back in the USB&lt;/li&gt;
&lt;li&gt;Run the debugger again - and it failed (same behavior as in the first question)!&lt;/li&gt;
&lt;li&gt;read flash failed - see red marking at address 0x00000000&amp;nbsp;
&lt;ul&gt;
&lt;li&gt;despite of that UICR value remained 0xFFFFFF5A&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1671097272481v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;summarize&amp;nbsp;the issues:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;1. USB connection could not be established while the debugger is running&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;2. Re-Attaching the USB connection blocks somehow the application from running , and blocks the flash read.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;please advise&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="x_ContentPasted0"&gt;&lt;span&gt;&lt;span class="x_ContentPasted1"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/400665?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2022 14:45:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8890157b-49a5-450c-a5be-a002c8fe2a78</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think you have your answer there, the Access port protection (APPROTECT) is enabled in your application,&amp;nbsp;and you have to disable it using the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fuicr.html&amp;amp;anchor=register.APPROTECT"&gt;APPROTECT register (see nRF52840 PS here)&lt;/a&gt; to be able to read the flash after it has been flashed like this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/400547?ContentTypeID=1</link><pubDate>Wed, 14 Dec 2022 09:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:025e3d9b-f890-4838-9317-0ec5f2029fde</guid><dc:creator>RVA</dc:creator><description>&lt;p&gt;Hi Simon!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using nrf SDK 15.2.0&lt;/p&gt;
&lt;p&gt;softdevice s140_nrf52_6.1.0&lt;/p&gt;
&lt;p&gt;The application is running as expected with no errors, means I was able to create central links and also use the usb to send some messages to the host.&lt;/p&gt;
&lt;p&gt;I started from ble_app_uart_c (ble_central) and integrated it with usbd_ble_uart&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I never used development kit, tried it with nrf Dongle and Fanstel board based on nrf52840 SoC that include usb connection.&lt;/p&gt;
&lt;p&gt;After flashing the application, before I open the host usb port, or activation the ble scanner I&amp;#39;m trying to reset the target with nrfjprog -f nrf52 --reset&amp;nbsp; --log&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting this error message:&lt;/p&gt;
&lt;div&gt;&lt;span&gt;Applying system reset.&lt;/span&gt;
&lt;div&gt;ERROR: [ &amp;nbsp;nRF52] - Access protection is enabled, can&amp;#39;t read device version.&lt;/div&gt;
&lt;div&gt;ERROR: [ &amp;nbsp;nRF52] - Unable to perform system reset. Device is readback protected.&lt;/div&gt;
&lt;div&gt;ERROR: [ &amp;nbsp;nRF52] - Try a debug reset instead if possible.&lt;/div&gt;
&lt;div&gt;ERROR: The operation attempted is unavailable due to readback protection in&lt;/div&gt;
&lt;span&gt;ERROR: your device. Please use --recover to unlock the device.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;means that the next time I want to flash the device I must recover it.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Second,&lt;/div&gt;
&lt;p&gt;I didn&amp;#39;t see any conflicts with instances definition. also commented uart_init() and log_init()&lt;/p&gt;
&lt;p&gt;so the main application looks like this :&lt;/p&gt;
&lt;p&gt;int main(void)&lt;br /&gt;{&lt;br /&gt; ret_code_t ret;&lt;/p&gt;
&lt;p&gt;UNUSED_VARIABLE(m_nus_uuid);&lt;/p&gt;
&lt;p&gt;static const app_usbd_config_t usbd_config = {&lt;br /&gt; .ev_state_proc = usbd_user_ev_handler&lt;br /&gt; };&lt;/p&gt;
&lt;p&gt;// Initialize.&lt;br /&gt; //log_init();&lt;br /&gt; timers_init(); // init app timers&lt;br /&gt; // Init LEDS&lt;br /&gt; buttons_leds_init();&lt;/p&gt;
&lt;p&gt;app_usbd_serial_num_generate();&lt;/p&gt;
&lt;p&gt;ret = nrf_drv_clock_init();&lt;br /&gt; APP_ERROR_CHECK(ret);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; //NRF_LOG_INFO(&amp;quot;\n\nUSBD BLE UART example started.&amp;quot;);&lt;/p&gt;
&lt;p&gt;ret = app_usbd_init(&amp;amp;usbd_config);&lt;br /&gt; APP_ERROR_CHECK(ret);&lt;/p&gt;
&lt;p&gt;app_usbd_class_inst_t const * class_cdc_acm = app_usbd_cdc_acm_class_inst_get(&amp;amp;m_app_cdc_acm);&lt;br /&gt; ret = app_usbd_class_append(class_cdc_acm);&lt;br /&gt; APP_ERROR_CHECK(ret);&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;//uart_init();&lt;br /&gt; db_discovery_init();&lt;br /&gt; power_management_init();&lt;br /&gt; ble_stack_init();&lt;br /&gt; gatt_init();&lt;br /&gt; nus_c_arr_init();&lt;br /&gt; ble_conn_state_init();&lt;br /&gt; scan_init();&lt;/p&gt;
&lt;p&gt;// Start execution.&lt;br /&gt; ret = app_usbd_power_events_enable();&lt;br /&gt; APP_ERROR_CHECK(ret);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; // Wait for usb&lt;br /&gt; #if 1&lt;br /&gt; while(1){&lt;br /&gt; while (app_usbd_event_queue_process()){&lt;br /&gt; /* Event was processed. */&lt;br /&gt; };&lt;br /&gt; if(usb_port_open &amp;amp;&amp;amp; usb_tx_done){&lt;br /&gt; &lt;br /&gt; nrf_delay_ms(4000);&lt;br /&gt; break;&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt; #endif&lt;br /&gt; &lt;br /&gt; // Enable filter&lt;br /&gt; ret = nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_ADDR_FILTER, true);&lt;br /&gt; APP_ERROR_CHECK(ret);&lt;/p&gt;
&lt;p&gt;// Scan&lt;br /&gt; start_scan(NULL);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; // Enter main loop.&lt;br /&gt; for (;;)&lt;br /&gt; {&lt;/p&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp;(conn_num == dev_cnt)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;while&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;(!&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;discovery_completed&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;){&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;/*Do nothing*/&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;discovery_completed&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp;=&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;false&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;scan_start&lt;/span&gt;&lt;span class="x_ContentPasted0"&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class="x_ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (app_usbd_event_queue_process())&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Nothing to do */&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt; &lt;br /&gt; // idle_state_handle&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: unable to debug nrf52840 USB CDC ACM built on BLE client application</title><link>https://devzone.nordicsemi.com/thread/400171?ContentTypeID=1</link><pubDate>Mon, 12 Dec 2022 14:08:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec841193-134e-4f7f-9013-7dcd9751a57b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you share some information on what SDK version you&amp;#39;re using?&amp;nbsp;Does the application work as expected until you reset it? My guess is that there is some conflicts between the resources used by the USB CDC ACM application and the BLE client. Can you check for example if they are using any of the same timer, UART or SPI instances, causing conflicts there perhaps if you have added them twice. Are there any indications on what&amp;#39;s happening when you build and/or flash the example project onto your board, or are these successful with any warnings/errors.&lt;/p&gt;
&lt;p&gt;Do you also see this behavior on a Development Kit or just the Fanstel board and a custom board design? Can you share some details on what you did to combine the BLE client and USB CDC applications?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>