<?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>nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118056/nrf52-dk-keeps-resecuring-itself</link><description>Hi, 
 I have just acquired a new nRF52 DK devkit. 
 Performing a `nrfjprog --recover` followed by `nrfjprog --eraseall` doesn&amp;#39;t work to remove the protection. 
 I do not flash a new firmware on it. After a power cycle, I need to recover and erase the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jan 2025 07:59:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118056/nrf52-dk-keeps-resecuring-itself" /><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518782?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2025 07:59:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee58b7c6-8b99-4335-b754-e0e09a731b9f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can&amp;nbsp;try the code snippet I posted here&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/85671/trying-to-disable-approtect-for-debugging/357402"&gt;RE: Trying to disable APPROTECT for debugging&lt;/a&gt;&amp;nbsp;. This will disable the HW part of the approtect mechanism by writing 0x5A to the UICR.APPROTECT register on first boot.&lt;/p&gt;
[quote user="emlynkz"]Our standard production workflow with v2 chips was to perform a eraseall of the flash[/quote]
&lt;p&gt;Note that the ERASEALL must be performed via the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/dif.html#d913e1399"&gt;CTRL-AP - Control access port&lt;/a&gt;&amp;nbsp;on the new revision.&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/pastedimage1737100796189v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518718?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 17:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41682026-7f29-48f7-963f-bf9199010948</guid><dc:creator>emlynkz</dc:creator><description>&lt;p&gt;I am asking this question for when this project goes into production.&lt;/p&gt;
&lt;p&gt;Our standard production workflow with v2 chips was to perform a eraseall of the flash, then flash our .hex with all the firmware on it.&lt;/p&gt;
&lt;p&gt;What change in my firmware can I make that will disable APPROTECT? This is to be used with prototypes on which we want debug access, but still run them through the production workflow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518716?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 17:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e21430d-bd82-4d24-8d26-0ced9489bcd2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When are you erasing the flash? Performing an eraseall will remove any firmware on the device that can unlock the software part of the&amp;nbsp;approtect during boot. This means that&amp;nbsp;APPROTECT will be enabled again after a power cycle of the board.&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: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518710?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 17:18:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98e497cd-6a99-4c1f-9155-4fa401deb0ad</guid><dc:creator>emlynkz</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I have rebuilt my project using the v17.1.0 nRF5 SDK and I keep having the same issue when I do an erase all. Can I have my project set the configuration for the APPPROTECT instead of having nrfjprog --recover do it?&lt;/p&gt;
&lt;p&gt;What else do I need to change to my previously working project for it to not secure itself on the new devkit that came with a revision 3 chip?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518674?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 14:55:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abab9133-aaf8-42d0-986b-83716652a810</guid><dc:creator>emlynkz</dc:creator><description>&lt;p&gt;Good, I&amp;#39;ll look into that.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518673?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 14:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:928e3ab4-518c-4cb2-b557-66222db19d86</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can update the startup files (part of the MDK package) for you existing projects and rebuild the FW binaries for&amp;nbsp;this revision. We still manufacture and sell the old revision, so another possibility for you may be to use the old ordering code and buy revision 2 chips.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518668?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 14:23:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b4f2136-2123-4778-a568-4501973e4048</guid><dc:creator>emlynkz</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;thanks for the info.&lt;/p&gt;
&lt;p&gt;Upgrading all our projects to nRF5 SDK v17.1.0 is a big endeavour as it breaks a couple of things.&lt;/p&gt;
&lt;p&gt;Is there a workaround that can be used with nRF5 SDK v16?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518667?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 14:21:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66957c24-1066-4d8b-b846-49fcfc485a1e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, there is a new silicon revision, please see the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/IN/resource/in_142_v1.1.pdf"&gt;IN-142&lt;/a&gt;&amp;nbsp;for more information.&amp;nbsp;The startup files included in nRF5 SDK v16 is not compatible with this HW revision, but those in v17.1.0 are.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518657?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 13:59:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb5d6e3a-e112-424e-836b-9920204b4a13</guid><dc:creator>emlynkz</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I usually develop on ANNA-B112 chips and I have never had issues with that. Is it a new hardware revision that changed that?&lt;/p&gt;
&lt;p&gt;On my custom boards I can flash the same firmware without an issue of it securing itself.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using nRF5 SDK v16.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518626?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 12:30:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c15bb72-3311-41d6-a80c-d32f21643d8e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The way the APPROTECT mechanism works is that both the non-volatile UICR.APPROTECT register and the volatile APPROTECT.DISABLE register need to be set to the same unlock value (0x5A on the nRF52 series) to disable it (&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/dif.html#d913e201"&gt;Access port protection controlled by hardware and software&lt;/a&gt;). The latter register must be written to by the CPU on boot. This means APPROTECT will be enabled again if you erase and reset the chip.&lt;/p&gt;
&lt;p&gt;The nrfjprog --recover operation performs a chip erase, then loads a small firmware binary that writes to the APPROTECT.DISABLE register to ensure APPROTECT remains disabled. This FW will be deleted when you call&amp;nbsp;`nrfjprog --eraseall` after the recover.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which SDK and SDK version are you using?&lt;/p&gt;
[quote user="byte"]This looks very similar to the problem I&amp;#39;m having although I have an nrf5340 project. This started happening to me after I upgraded from nrf connect v2.7.0 to nrf connect v2.9.0. Are you also using nrf connect v2.9.0?[/quote]
&lt;p&gt;Apart from approtect being enabled, does the FW work as expected? Also, do you get the warning about approtect when trying to program the appcore or the netcore?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518504?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 17:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45101d69-7c1b-4d93-84c8-4f956e5b4941</guid><dc:creator>byte</dc:creator><description>&lt;p&gt;Ah, I just realized what you mean. I am not having that same problem. I only get the error after I flash something from v2.9.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518498?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 17:06:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54bcaabb-65dd-4a7b-89c8-c30ed6f5a695</guid><dc:creator>byte</dc:creator><description>&lt;p&gt;You are not using any version of the sdk? Just directly programming it with what then, an example hex file?&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518494?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 17:01:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88aefab4-bef9-49fb-84cc-9888d6c0c8fa</guid><dc:creator>emlynkz</dc:creator><description>&lt;p&gt;I do not use nRF connect but I use J-Link directly. nRF connect embeds a version of J-Link. Maybe it&amp;#39;s that new version that causes this issue.&lt;/p&gt;
&lt;p&gt;&amp;Eacute;tienne&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 DK keeps resecuring itself</title><link>https://devzone.nordicsemi.com/thread/518492?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 16:56:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80541c5c-8fde-4e66-8f0a-fb62537683b6</guid><dc:creator>byte</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&amp;Eacute;tienne,&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This looks very similar to the problem I&amp;#39;m having although I have an nrf5340 project. This started happening to me after I upgraded from nrf connect v2.7.0 to nrf connect v2.9.0. Are you also using nrf connect v2.9.0?&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>