<?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>Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101772/cannot-connect-segger-rtt-to-custom-board-after-reset</link><description>General overview of my setup 
 We have a product based on the nRF52832 SoC. We are developing a new hardware for this product using nRF52833. This hardware also includes upgrades to other adjacent integrated circuits connected using I2C to the nRF52833</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jul 2023 14:36:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101772/cannot-connect-segger-rtt-to-custom-board-after-reset" /><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/437067?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2023 14:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09b6de03-529f-4260-94cf-fe9b73c3a260</guid><dc:creator>RRWC</dc:creator><description>&lt;p&gt;Hello Hung Bui,&lt;/p&gt;
&lt;p&gt;You figured it out. What happened was basically:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The code was first deployed to&amp;nbsp;the nRF52833 Development Kit.&lt;/li&gt;
&lt;li&gt;The chip in the Development kit have the&amp;nbsp;improved APPROTECT. In order to use it in Debug mode I updated both firmware and flashing process to ensure that &lt;code&gt;5A&lt;/code&gt; is written to address&amp;nbsp;&lt;code&gt;0x10001208&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;I received samples of the new custom board. The samples use an older version of the nRF52833 without the improved &lt;span&gt;APPROTECT&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I didn&amp;#39;t noticed that the chip in the custom board has the old version of APPROTECT. I also misunderstood that writing&amp;nbsp;&lt;span&gt;&lt;code&gt;5A&lt;/code&gt; to the&amp;nbsp;&lt;code&gt;0x10001208&lt;/code&gt; register would keep the chip unprotected even&amp;nbsp;in the old APPROTECT version.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;I removed&amp;nbsp;all steps in both firmware and flashing process that ensures &lt;code&gt;5A&lt;/code&gt; written to&amp;nbsp;&lt;span&gt;&lt;code&gt;0x10001208&lt;/code&gt; in debug mode&amp;nbsp;and also ensured that&amp;nbsp;&lt;code&gt;0xFFFFFFFF&lt;/code&gt; is written to it instead. Now&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;I&amp;nbsp;am able&amp;nbsp;to debug and use Segger RTT perfectly in the custom board.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Thank you for all your help.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436771?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 13:33:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a86241e6-f75c-4da2-bb42-7ad921b9e7d4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi RRWC,&lt;/p&gt;
&lt;p&gt;It seems that the chip on your board is version 1 (build code A0&amp;nbsp;&lt;span&gt;N52833QDAA&lt;strong&gt;A0&lt;/strong&gt;2214AF&lt;/span&gt; ) when the chip on the DK is version 2 (build code B0: &lt;span&gt;N52833QIAA&lt;strong&gt;B0&lt;/strong&gt;2116AA&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52833/COMP/nrf52833/nRF52833_ic_revision_overview.html?cp=5_1_3_0"&gt;https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52833/COMP/nrf52833/nRF52833_ic_revision_overview.html?cp=5_1_3_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you take a look at the spec you will find that in version 1 of the chip has older version of APPROTECT.&amp;nbsp;&lt;br /&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/4010.pastedimage1689600592716v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In version 1 of the chip,UICR.APPROTECT (0x10001208) should be 0xFFFFFFFF to disable APPROTECT. In your case it was written 0xFFFFFF5A. This cause the chip to be protected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to figure out what written 0xFFFFFF5A to the register&lt;br /&gt;I did a quick test with the blinky example here and don&amp;#39;t see that it&amp;#39;s being written,&amp;nbsp;&lt;span&gt;0x10001208 still 0xFFFFFFFF.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you double check to see at which point it&amp;#39;s being written ? Try the following step by step:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Recover the chip using nrfjprog --recover&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Read&amp;nbsp;0x10001208&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Power reset&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Read&amp;nbsp;0x10001208&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;5. Flash the blinky example, make sure the board is blinking&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;6. Read&amp;nbsp;0x10001208&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;7. Do a power reset&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;8. Read&amp;nbsp;0x10001208&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;I attached here my blinky hex file that works on the DK.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_5F00_pca10100e.hex"&gt;devzone.nordicsemi.com/.../blinky_5F00_pca10100e.hex&lt;/a&gt;&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: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436557?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2023 17:37:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1da3b184-c3df-47f1-adfd-ce5d41f9891c</guid><dc:creator>RRWC</dc:creator><description>&lt;p&gt;Hello Hung Bui,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Below are the requested information:&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1h5aceiks1"&gt;Reading&amp;nbsp;&lt;span&gt;UICR APPROTECT (addr 0x10001208)&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;This is the output of flashing the device and reading&amp;nbsp;&lt;span&gt;0x10001208 in the development Kit (reading was done once before the &lt;code&gt;nrfjprog -r&lt;/code&gt; and once after with the firmware running):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --recover
Recovering device. This operation might take 30s.
Erasing user code and UICR flash areas.
Writing image to disable ap protect.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --eraseall
Erasing user available code and UICR flash areas.
Applying system reset.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --program ready.hex --verify
[ #################### ]   4.150s | Program file - Done programming
[ #################### ]   4.053s | Verify file - Done verifying

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memwr 0x0007FFF8 --val 0x00006B43
Parsing parameters.
Writing.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memwr 0x0007FFFC --val 0xFFFFEE00
Parsing parameters.
Writing.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memrd 0x10001208
0x10001208: 0000005A                              |Z...|

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog -r
Applying system reset.
Run.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memrd 0x10001208
0x10001208: 0000005A                              |Z...|&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now same test flashing the custom board:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --recover
Recovering device. This operation might take 30s.
Erasing user code and UICR flash areas.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --eraseall
Erasing user available code and UICR flash areas.
Applying system reset.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --program ready.hex --verify
[ #################### ]   4.175s | Program file - Done programming
[ #################### ]   4.088s | Verify file - Done verifying

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memwr 0x0007FFF8 --val 0x00006B44
Parsing parameters.
Writing.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memwr 0x0007FFFC --val 0xFFFFEE00
Parsing parameters.
Writing.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memrd 0x10001208
0x10001208: FFFFFF5A                              |Z...|

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog -r
Applying system reset.
Run.
[error] [ Client] - Encountered error -90: Command go executed for 15 milliseconds with result -90
[error] [ Worker] - Access protection is enabled, can&amp;#39;t start device.
ERROR: The operation attempted is unavailable due to readback protection in
ERROR: your device. Please use --recover to unlock the device.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

C:\Users\Ricardo\Documents\Temp\Testes\ready&amp;gt;nrfjprog --memrd 0x10001208
[error] [ Worker] - Access protection is enabled, can&amp;#39;t read device version.
[error] [ Client] - Encountered error -90: Command read_device_info executed for 15 milliseconds with result -90
[error] [ Client] - Encountered error -90: Command read_memory_descriptors executed for 14 milliseconds with result -90
[error] [ Worker] - Can&amp;#39;t read memory descriptors, ap-protection is enabled.
[error] [ Client] - Encountered error -90: Command read executed for 371 milliseconds with result -90
[error] [ Worker] - Access protection is enabled, can&amp;#39;t access memory.
ERROR: The operation attempted is unavailable due to readback protection in
ERROR: your device. Please use --recover to unlock the device.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The firmware file is exactly the same and as you can see in the code snippets above I used exactly the same commands in both cases. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Notice that in the DK, after the &lt;code&gt;nrfjprog --recover&lt;/code&gt; command, the message &amp;quot;&lt;code&gt;Writing image to disable ap protect.&lt;/code&gt;&amp;quot; is displayed automatically. I don&amp;#39;t&amp;nbsp;know why, but this doesn&amp;#39;t&amp;nbsp;happens when recovering the custom board. I believe that this automatic&amp;nbsp;disable of ap protect explains why&amp;nbsp;the DK returned&amp;nbsp;0x000005A and the custom board returned 0xFFFFF5A at address 0x10001208. However in both cases the &amp;quot;0x5A&amp;quot; is correctly read at it&amp;#39;s position before the&amp;nbsp;&lt;code&gt;nrfjprog -r&lt;/code&gt; command.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1h5aceiks1"&gt;Laser markings&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Development Kit:&amp;nbsp;&lt;span&gt;N52833QIAAB02116AA&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Custom board:&amp;nbsp;&lt;span&gt;N52833QDAAA02214AF&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1h5aceiks1"&gt;Behaviour after power reset&lt;/h3&gt;
&lt;p&gt;After power reset the debug connection with the development kit is lost for some time (log from Segger RTT bellow)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG: J-Link RTT Viewer V7.88k: Logging started.
LOG: Terminal 0 added.
LOG: Connecting to J-Link via USB...
LOG: Device &amp;quot;NRF52833_XXAA&amp;quot; selected.
LOG: InitTarget() start
LOG: InitTarget() end - Took 14us
LOG: Found SW-DP with ID 0x2BA01477
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: JTAG-AP (IDR: 0x23000000)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Skipped. Not an AHB-AP
LOG: AP[1]: Skipped. Not an AHB-AP
LOG: Attach to CPU failed. Executing connect under reset.
LOG: Failed to power up DAP
LOG: Connect fallback: Reset via Reset pin &amp;amp; Connect.
LOG: InitTarget() start
LOG: InitTarget() end - Took 4us
LOG: Found SW-DP with ID 0x2BA01477
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: JTAG-AP (IDR: 0x23000000)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Skipped. Not an AHB-AP
LOG: AP[1]: Skipped. Not an AHB-AP
LOG: Attach to CPU failed. Executing connect under reset.
LOG: Failed to power up DAP
ERROR: Could not connect to target device.
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However if I try dozens of seconds later the connection works normally again:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG: Connecting to J-Link via USB...
LOG: Device &amp;quot;NRF52833_XXAA&amp;quot; selected.
LOG: InitTarget() start
LOG: InitTarget() end - Took 9us
LOG: Found SW-DP with ID 0x2BA01477
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: AHB-AP (IDR: 0x24770011)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Core found
LOG: AP[0]: AHB-AP ROM base: 0xE00FF000
LOG: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
LOG: Found Cortex-M4 r0p1, Little endian.
LOG: FPUnit: 6 code (BP) slots and 2 literal slots
LOG: CoreSight components:
LOG: ROMTbl[0] @ E00FF000
LOG: [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
LOG: [0][1]: E0001000 CID B105E00D PID 003BB002 DWT
LOG: [0][2]: E0002000 CID B105E00D PID 002BB003 FPB
LOG: [0][3]: E0000000 CID B105E00D PID 003BB001 ITM
LOG: [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
LOG: [0][5]: E0041000 CID B105900D PID 000BB925 ETM
LOG: RTT Viewer connected.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The behavior in the custom board is different. The message remains the same regardless of how much time passed after the power reset:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG: J-Link RTT Viewer V7.88k: Logging started.
LOG: Terminal 0 added.
LOG: Connecting to J-Link via USB...
LOG: Device &amp;quot;NRF52833_XXAA&amp;quot; selected.
LOG: InitTarget() start
LOG: InitTarget() end - Took 16us
LOG: Found SW-DP with ID 0x2BA01477
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: JTAG-AP (IDR: 0x23000000)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Skipped. Not an AHB-AP
LOG: AP[1]: Skipped. Not an AHB-AP
LOG: Attach to CPU failed. Executing connect under reset.
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: JTAG-AP (IDR: 0x23000000)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Skipped. Not an AHB-AP
LOG: AP[1]: Skipped. Not an AHB-AP
LOG: Could not find core in Coresight setup
LOG: Connect fallback: Reset via Reset pin &amp;amp; Connect.
LOG: InitTarget() start
LOG: InitTarget() end - Took 4us
LOG: Found SW-DP with ID 0x2BA01477
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: JTAG-AP (IDR: 0x23000000)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Skipped. Not an AHB-AP
LOG: AP[1]: Skipped. Not an AHB-AP
LOG: Attach to CPU failed. Executing connect under reset.
LOG: DPIDR: 0x2BA01477
LOG: CoreSight SoC-400 or earlier
LOG: Scanning AP map to find all available APs
LOG: AP[2]: Stopped AP scan as end of AP map has been reached
LOG: AP[0]: JTAG-AP (IDR: 0x23000000)
LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
LOG: Iterating through AP map to find AHB-AP to use
LOG: AP[0]: Skipped. Not an AHB-AP
LOG: AP[1]: Skipped. Not an AHB-AP
LOG: Could not find core in Coresight setup
ERROR: Could not connect to target device.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;No debug is possible with the custom board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436413?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2023 08:40:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c26037b3-86e6-44b1-9a98-34cca332acae</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi RRWC,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m running out of idea on why the issue happen on your board but not the DK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please read the laser marking on the chip on the nRF52833 DK you have and the laser marking on the chip on your board ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Instead of doing nrfjprog -r could you try doing a power reset with the DK ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Before you trigger a reset, could you read the UICR APPROTECT register at address 0x10001208 ? &lt;br /&gt;nrfjprog --memrd 0x10001208&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;On both the DK and your board.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436339?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 18:34:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:613e85b0-0302-446e-a19b-0985c5cca79e</guid><dc:creator>RRWC</dc:creator><description>&lt;p&gt;Hello Hung Bui.&lt;/p&gt;
&lt;p&gt;I tested &amp;quot;ble_app_hids_keyboard_pca10100_s140&amp;quot; in debug. I chose this specific project only because it was the first example I found with project ready for PCA10100.&lt;/p&gt;
&lt;p&gt;The behavior remains the same in both my custom board and DK:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In my custom board as soon as &lt;code&gt;nrfjprog -r&lt;/code&gt; is received I lose debug connection. Advertising is normal.&lt;/li&gt;
&lt;li&gt;In the nRF52833 DK debug still working after&amp;nbsp;&lt;span&gt;&lt;code&gt;nrfjprog -r&lt;/code&gt;. Advertising&amp;nbsp;is also normal.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436164?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 08:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bd10cc8-b8fb-47f9-a0f7-18a6454847c8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi RRWC,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try testing an unmodified example from the SDK on your custom board. For example the RTC&amp;nbsp; project, or a BLE project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Make sure you do a nrfjprog --recover before you flash the application.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436089?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2023 20:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24140155-af38-485c-b7f0-42dc58053c32</guid><dc:creator>RRWC</dc:creator><description>&lt;p&gt;Hello Hung Bui,&lt;/p&gt;
&lt;p&gt;Clarifying the behavior:&lt;/p&gt;
&lt;p&gt;Flash my custom&amp;nbsp;application in nRF52833 DK (PCA10100 -&amp;gt; &lt;span&gt;N52833QIAAB02116AA&lt;/span&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firmware operates normally (cannot find one device via I2C because the device is absent, but OK)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nrfjprog -r&lt;/code&gt; reports no error.&lt;/li&gt;
&lt;li&gt;It is possible to connect and debug using Segger RTT&lt;/li&gt;
&lt;li&gt;It is possible to send other commands using nrfjprog (ex. &lt;code&gt;nrfjprog --memrd &amp;lt;addr&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Flash my custom&amp;nbsp;&lt;/span&gt;&lt;span&gt;application (exactly the same from above) in nRF52833 custom board (N52833QDAAA02214AF):&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firmware appears to operate normally (at least from what I can test using BLE).&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;code&gt;nrfjprog -r&lt;/code&gt;&amp;nbsp;reports error on the last step of firmware flashing (screenshot in the original post)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;It is not possible to connect nor debug using Segger RTT&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;It is not possible to send other commands using nrfjprog (except&amp;nbsp;&lt;code&gt;nrfjprog --recover&lt;/code&gt;, which works fine). All other commands report APPROTECT enabled.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Regarding&amp;nbsp;nrf52_handle_approtect(), it is called from&amp;nbsp;system_nrf52.c which&amp;nbsp;is included in the project. I also tried calling it from my main, but with no change in the behavior.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if it&amp;#39;s an&amp;nbsp;APPROTEC issue,&amp;nbsp;but I couldn&amp;#39;t find anything else in all the tests I performed. If it is an firmware issue I cant understand why it works fine with the nRF52833 in the development kit.&lt;/p&gt;
&lt;p&gt;It is also important to notice that if I flash the release version of the firmware (&lt;span&gt;which&amp;nbsp;defines&amp;nbsp;ENABLE_APPROTECT) the&amp;nbsp;nRF52833&amp;nbsp;development kit stops providing debug interface (as expected). The only diference is that no error message is displayed after the&amp;nbsp;&lt;code&gt;nrfjprog -r&lt;/code&gt; issued at the end of the flashing process (however if I try a second&amp;nbsp;&lt;code&gt;nrfjprog -r&lt;/code&gt; after the first one it fails, as expected for release version).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot connect Segger RTT to custom board after reset</title><link>https://devzone.nordicsemi.com/thread/436048?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2023 15:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ec16905-5306-4bc2-b4ca-1e655b308a20</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi RRWC,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please clarify, if you flash an application in our SDK for example RTC , can you still start debugging after power reset&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;From what you described I haven&amp;#39;t seen how you disable APPROTECT from the firmware.&amp;nbsp;&lt;br /&gt;By default it&amp;#39;s handled automatically by this code in system_nrf52_approtect.h :&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/pastedimage1689176016494v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Meaning the firmware need to write to&amp;nbsp;&amp;nbsp;NRF_APPROTECT-&amp;gt;DISABLE&amp;nbsp; to disable approtect.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am not sure if your code has&amp;nbsp;nrf52_handle_approtect() called or not. (it by default called inside SystemInit in system_nrf52.c&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It&amp;#39;s explained by the spec here:&amp;nbsp;&lt;br /&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/pastedimage1689176152463v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>