<?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>pc-ble-driver-py and connectivity firmware w/Rev 3 silicon</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99628/pc-ble-driver-py-and-connectivity-firmware-w-rev-3-silicon</link><description>Hello, 
 We are using pc-ble-driver-py and PCA10040 devkits to run automated testing as part of our development process. The recent erratas in the rev. 3 silicon for the 52832 is seeming to cause problems when the devkit is power cycled ( https://infocenter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 May 2023 11:53:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99628/pc-ble-driver-py-and-connectivity-firmware-w-rev-3-silicon" /><item><title>RE: pc-ble-driver-py and connectivity firmware w/Rev 3 silicon</title><link>https://devzone.nordicsemi.com/thread/426889?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 11:53:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:771d23c1-72e2-4a61-8676-d08354786f75</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Will your script re-program the DUT with the original connectivity firmware if the fw_check() does not return the expected version number (i.e., v4.1.99 instead of v4.1.4)? I&amp;#39;m basically wondering if there is a chance that the connectivity firmware may be reverted back to the old version where approtect is not being disabled in software&lt;/p&gt;
[quote userid="118260" url="~/f/nordic-q-a/99628/pc-ble-driver-py-and-connectivity-firmware-w-rev-3-silicon/426658"]I tried the following sequence of nrfjprog commands and it appears that the patched firmware is not setting the APPROTECT register properly after programming. The behavior is the same with the compiled hex file (v4.1.99) provided in the post above.[/quote]
&lt;p&gt;The board is halted after programming, and the program will not be executed until you perform a reset, either externally or by appending --reset/--pinreset to your programming command.&lt;/p&gt;
&lt;p&gt;Here is the result I got when I tested with the 4.1.99 hex:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;\sd_api_v5&amp;gt;nrfjprog --program connectivity_4.1.99_1m_with_s132_5.1.0.hex --recover --verify --reset
Recovering device. This operation might take 30s.
Parsing image file.
Verifying programming.
Verified OK.
Applying system reset.
Run.

/* Verify that the SW part of the the access port protection is disabled */
\sd_api_v5&amp;gt;nrfjprog --memrd 0x40000558
0x40000558: 0000005A                              |Z...|

/* Verify that the HW part of the the access port protection is disabled. This register is written during the --recover operation */
\sd_api_v5&amp;gt;nrfjprog --memrd 0x10001208
0x10001208: 0000005A                              |Z...|

/* FW version check. */
\sd_api_v5&amp;gt;nrfjprog --memrd 327680 --w 8 --n 24
0x00050000: 17 A5 D8 46 02 FF FF FF 00 00 00 00 04 01 63 FF   |...F..........c.| //04 01 63 =&amp;gt; v.4.1.99
0x00050010: 05 01 FF FF 40 42 0F 00                           |....@B..|&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py and connectivity firmware w/Rev 3 silicon</title><link>https://devzone.nordicsemi.com/thread/426658?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 16:03:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74abfa67-459d-456d-badb-0cfbc09a67d1</guid><dc:creator>grantrudd</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;I re-compiled with the patch and am still experiencing issues related to the device being locked. It appears that fw_check() is making a call to nrfjprog to read the memory where the version information is stored. This check fails and causes an exception. Here is the traceback:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;  File &amp;quot;/home/grant/sram/new_srampy/hardware/bluetooth_nrf.py&amp;quot;, line 39, in _scan
    if flasher.fw_check():
  File &amp;quot;/home/grant/.local/share/virtualenvs/new_srampy-9AZ69lLf/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py&amp;quot;, line 3226, in fw_check
    fw_struct = Flasher.parse_fw_struct(self.read_fw_struct())
  File &amp;quot;/home/grant/.local/share/virtualenvs/new_srampy-9AZ69lLf/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py&amp;quot;, line 3249, in read_fw_struct
    data = self.call_cmd(args)
  File &amp;quot;/home/grant/.local/share/virtualenvs/new_srampy-9AZ69lLf/lib/python3.8/site-packages/wrapt/decorators.py&amp;quot;, line 470, in _synchronized
    return wrapped(*args, **kwargs)
  File &amp;quot;/home/grant/.local/share/virtualenvs/new_srampy-9AZ69lLf/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py&amp;quot;, line 3280, in call_cmd
    raise RuntimeError(f&amp;quot;{e.__str__()}\n{e.output}&amp;quot;)
RuntimeError: Command &amp;#39;nrfjprog --snr 682853836 --memrd 327680 --w 8 --n 24 --family NRF52&amp;#39; returned non-zero exit status 16.
b&amp;#39;ERROR: The operation attempted is unavailable due to readback protection in\nERROR: your device. Please use --recover to unlock the device.\n&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It seems like the example apps bypass the fw_check() step and discover all Nordic devices connected to the computer. The fw_check() is important in our testing as our system includes multiple DKs, some of which are running custom FW and acting as the DUT, while others are programmed with connectivity to exercise the DUTs.&lt;/p&gt;
&lt;p&gt;Are there any other registers that we can modify to disable readback protection?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Grant&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;edit: I tried the following sequence of nrfjprog commands and it appears that the patched firmware is not setting the APPROTECT register properly after programming. The behavior is the same with the compiled hex file (v4.1.99) provided in the post above.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --recover
nrfjprog --memrd 0x40000558
   0x40000558: 00000000 
nrfjprog --program connectivity_4.1.4_1m_with_s132_5.1.0.hex --sectorerase
nrfjprog --memrd 0x40000558
   0x40000558: 00000000&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py and connectivity firmware w/Rev 3 silicon</title><link>https://devzone.nordicsemi.com/thread/426438?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 07:32:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00daccc3-5e8f-4ebf-855b-18123af7fb09</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Update:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This should help:&lt;br /&gt;Testing a fix, add&amp;nbsp;&lt;span&gt;his line &amp;#39;*(volatile uint32_t *) 0x40000558 = 0x5A;&amp;#39; to the beginning of main() by editing the patch file here:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;br /&gt;&lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/blob/master/hex/nRF5_SDK_15.3.0_connectivity.patch"&gt;https://github.com/NordicSemiconductor/pc-ble-driver/blob/master/hex/nRF5_SDK_15.3.0_connectivity.patch&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF5_5F00_SDK_5F00_15.3.0_5F00_connectivity.patch"&gt;devzone.nordicsemi.com/.../nRF5_5F00_SDK_5F00_15.3.0_5F00_connectivity.patch&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7801.sd_5F00_api_5F00_v5.zip"&gt;devzone.nordicsemi.com/.../7801.sd_5F00_api_5F00_v5.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;patch file and connectivity hex files above:&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pc-ble-driver-py and connectivity firmware w/Rev 3 silicon</title><link>https://devzone.nordicsemi.com/thread/425140?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 14:05:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ae46521-b94d-4861-ae01-e1556feb7781</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi Grant,&lt;br /&gt;&lt;br /&gt;Thanks for informing us, I will report this back to our developers so that we can get this fixed.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>