<?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>nRF52840 Programming issues with CMSIS-DAP / pyOCD</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98827/nrf52840-programming-issues-with-cmsis-dap-pyocd</link><description>Hello, 
 I&amp;#39;m trying to use the SKB501 Module from Skylab, containing a nRF52840. 
 
 Programming and Erasing the Chip with an Elpotronic Programmer works fine. 
 But Programming and Erasing just works once with a CMSIS-DAP Programmer. I tried a CMSIS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Apr 2023 22:12:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98827/nrf52840-programming-issues-with-cmsis-dap-pyocd" /><item><title>RE: nRF52840 Programming issues with CMSIS-DAP / pyOCD</title><link>https://devzone.nordicsemi.com/thread/421339?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2023 22:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2eedd46-2e85-43c8-beac-daec6c34aaa5</guid><dc:creator>tomatosoup</dc:creator><description>&lt;p&gt;Ok, I think my direction with that the module was locked is wrong.&lt;/p&gt;
&lt;p&gt;The real issue was that this module doesn&amp;#39;t have a 32k Crystal. Thus, running FW which relies on this crystal will put it into a kind of locked state.&lt;/p&gt;
&lt;p&gt;The elpotronic programmer was still able to program it reliable as it also controls the power supply and thus was able to program it before the module tried to switch to the 32k crystal.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Adding these configs to prj.conf helped:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Programming issues with CMSIS-DAP / pyOCD</title><link>https://devzone.nordicsemi.com/thread/421025?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 12:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de604d05-3647-4374-aafe-706cafcabef2</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="tomatosoup"]Now, the question is just why the elpotronic programmer was able to erase and program this locked module..[/quote]
&lt;p&gt;&lt;span&gt;Access port protection is disabled by issuing an ERASEALL command via CTRL-AP.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/dif.html?cp=5_0_0_3_7_1#concept_udr_mns_1s"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/dif.html?cp=5_0_0_3_7_1#concept_udr_mns_1s&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Programming issues with CMSIS-DAP / pyOCD</title><link>https://devzone.nordicsemi.com/thread/420862?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 19:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a5968cd-06eb-430c-b1e2-ba15ed62aea6</guid><dc:creator>tomatosoup</dc:creator><description>&lt;p&gt;Oh no, I might have found the reason. This module might come locked by default. This command &amp;quot;fixed&amp;quot; it.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c init -c &amp;quot;reset init&amp;quot; -c halt -c &amp;quot;nrf52_recover&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now, the question is just why the elpotronic programmer was able to erase and program this locked module..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>