<?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>Problem to debug NET CPU after segger update and new nrf5340 chip</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75406/problem-to-debug-net-cpu-after-segger-update-and-new-nrf5340-chip</link><description>Hi i m evaluating the nrf5340 and i get this message when i try to download the code to NET cpu and it&amp;#39;s a bit impossible to attach the debugger 
 CTRL-AP indicates that the device is secured. 
 For debugger connection the device needs to be unsecured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 May 2021 14:25:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75406/problem-to-debug-net-cpu-after-segger-update-and-new-nrf5340-chip" /><item><title>RE: Problem to debug NET CPU after segger update and new nrf5340 chip</title><link>https://devzone.nordicsemi.com/thread/311533?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 14:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:385da147-0e53-459e-a349-3e1963a52a66</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Yes, I think that would work. Let me know if it doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;Hopefully this will make the rest easier to debug.&amp;nbsp;If you need help with the&amp;nbsp;RTCO counter issue, please address that in a new devzone case in order to keep the issues separated and on topic.&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: Problem to debug NET CPU after segger update and new nrf5340 chip</title><link>https://devzone.nordicsemi.com/thread/311094?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 14:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c152454a-eaaa-47d1-a1ee-bd6764cd72f6</guid><dc:creator>emag nioj</dc:creator><description>&lt;p&gt;Thank you Elfving,&amp;nbsp; so if i put in the NET Code at main this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_UICR_NS-&amp;gt;APPROTECT=0x50fa50fa;&lt;br /&gt; NRF_CTRLAP_NS-&amp;gt;APPROTECT.DISABLE=0x50fa50fa;&lt;/p&gt;
&lt;p&gt;and in APP code at main this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_UICR_S-&amp;gt;APPROTECT=0x50fa50fa;&lt;br /&gt; NRF_CTRLAP_S-&amp;gt;APPROTECT.DISABLE=0x50fa50fa;&lt;/p&gt;
&lt;p&gt;do you think it can solve and let me attach the debugger to see the code?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I need to debug the NET core because after a while i stop the RTC0 and put the core to _WFI waiting an accelerometer interrupt to wake up.&lt;/p&gt;
&lt;p&gt;But after the GPIOTE interrupt i try to restart RTC0 but the counter seems very slow i haven&amp;#39;t RTC0 interrupts.&lt;/p&gt;
&lt;p&gt;Now the workaround is to NVIC_DisableIRQ(RTC0_IRQ) and NVIC_EnableIRQ(RCT0_IRQ) when wake up.&lt;/p&gt;
&lt;p&gt;In the previous chip this problem was not present. So now with the default APProtect is a caos to debug when i try to attach the memory is erased.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;emag&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem to debug NET CPU after segger update and new nrf5340 chip</title><link>https://devzone.nordicsemi.com/thread/311088?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 14:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:161ef0f9-297e-48b0-90ed-df3db2692fd5</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;&lt;span lang="EN-US"&gt;&lt;span&gt;Hi Emag!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;&lt;span&gt;Correct,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;span&gt;the nRF53 series (and soon the nRF52&amp;#39;s) comes with APPROTECT being enabled as default. It is basically read/writing protected until it is programmed not to be. In order to circumvent this temporarily however you can recover it:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;nrfjprog&lt;/span&gt; &lt;span&gt;--&lt;/span&gt;&lt;span&gt;recover&lt;/span&gt; &lt;span&gt;--&lt;/span&gt;&lt;span&gt;coprocessor&lt;/span&gt; &lt;span&gt;CP_NETWORK&lt;/span&gt;
&lt;span&gt;nrfjprog&lt;/span&gt; &lt;span&gt;--&lt;/span&gt;&lt;span&gt;recover&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;&lt;span&gt;To unsecure &amp;quot;permanently&amp;quot; (ie. having it disabled after flashing) you need to write to&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;UICR.APPROTECT&amp;nbsp;and CTRL-AP.APPROTECT.DISABLE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;for both the app and network core. Though this wouldn&amp;#39;t really be permanent either, as flashing anything like a sample project can revert it back to the default.&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/debugandtrace.html?cp=3_0_0_7_1#access_port_protection"&gt;For more info about this see here.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Håkon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>