<?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>[NRF81522] Can&amp;#39;t enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66801/nrf81522-can-t-enable-read-protection-all-rbpconf</link><description>Hello, 
 I am trying to enable the read protection on the NRF51822 on a custom board. By looking through the forums, I found different ways to try and enable the read protection. According to the reference manual, bits 8 to 15 from RBPCONF must be set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Oct 2020 15:26:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66801/nrf81522-can-t-enable-read-protection-all-rbpconf" /><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273558?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 15:26:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccb64bb1-e773-4760-bce8-9188179da3c2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I tried upgrading to the same version of nRF Command Line Tools that you are using, but I&amp;#39;m not able to reproduce this behavior with a DK. Can you check if you are able to use nrfjprog with a different computer, to determine if this is caused by software or hardware problems?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273537?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 14:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb2199c9-4b77-4573-a401-3f4806f3c88b</guid><dc:creator>JFGagnon</dc:creator><description>&lt;p&gt;I use the Flasher Arm from Segger which we bought at the beginning of this year (February I think). If I don&amp;#39;t touch the setup, I can JTAG the chip repeatedly but can&amp;#39;t use any nrfjprog commands.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We&amp;#39;ve run the panelizeds board through multiple rounds of testing with a successful programming using the J-Link lite as well, so I am confident that the voltage levels, as well as the connections are correct.&lt;br /&gt;&lt;br /&gt;Just for testing, I flashed the softdevice (which worked) and tried to use nrfjprog --recover right after, without touching the setup, and I still get the same error as above.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273536?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 14:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95703c0d-4e82-4ad6-9e01-4d7ab9b5a287</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The -1 error typically means that the J-Link cannot find the chip, which can be caused by wrong supply voltage, wrong connections, board not powered, etc. What J-Link device are you using with the custom board, and how is it connected? Strange if you are able to use other tools with the same setup.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273521?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:52:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41623f0b-a1b5-47b3-96aa-09110e880548</guid><dc:creator>JFGagnon</dc:creator><description>&lt;p&gt;The error I am getting is this :&lt;/p&gt;
&lt;p&gt;PS C:\Users\Gagnonje&amp;gt; nrfjprog --memrd 0x100010004 --log&lt;br /&gt;ERROR: JLinkARM DLL reported an error. Try again. If error condition&lt;br /&gt;ERROR: persists, run the same command again with argument --log, contact Nordic&lt;br /&gt;ERROR: Semiconductor and provide the generated log.log file to them.&lt;/p&gt;
&lt;p&gt;The log file I posted above is the result of --log.&lt;/p&gt;
&lt;p&gt;This is a custom board with a&amp;nbsp; &amp;nbsp; &amp;nbsp;NRF51822. I can use all of the Segger tools on the custom board, but nrfjprog doesn&amp;#39;t work.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I can JTAG in the board just fine on different computers and we&amp;#39;ve done the whole dev with the segger tools.&lt;/p&gt;
&lt;p&gt;I did not try nrfjprog on another computer.&lt;br /&gt;&lt;br /&gt;edit : Running powershell in admin doesn&amp;#39;t make a difference, still the same errors&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273517?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0e196dd-50ae-4f98-b11c-3fd1dbc6ae04</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;What is the error you get without the --log option?&lt;/p&gt;
&lt;p&gt;Do the board work with other computers? Are you using a nRF51 DK, or some custom board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273516?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:43:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0aa9190-8597-4efa-bdf3-414deb76bab3</guid><dc:creator>JFGagnon</dc:creator><description>&lt;p&gt;So as a side problem, I thought i bricked my chip before, but turns out that nrfjprog isn&amp;#39;t working properly on my machine.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[2020-Oct-07 09:37:47] [ info] --------------------------------------------------------------------------------
[2020-Oct-07 09:37:47] [ info] C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\nrfjprog.exe --memrd 0x100010004 --log 
[2020-Oct-07 09:37:47] [ info] nrfjprog version 10.10.0 
[2020-Oct-07 09:37:47] [ info] --------------------------------------------------------------------------------
[2020-Oct-07 09:37:47] [debug] [ nRF0x0] - open_dll
[2020-Oct-07 09:37:47] [debug] [ nRF0x0] - Load library at C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_UNKNOWN_NRFJPROG.dll.
[2020-Oct-07 09:37:47] [debug] [ nRF0x0] - Library loaded, loading member functions.
[2020-Oct-07 09:37:47] [debug] [ nRF0x0] - Member functions succesfully loaded.
[2020-Oct-07 09:37:47] [debug] [Backend] - Logger callback at 0x7ff78dd660d0 registered in Segger backend logger.
[2020-Oct-07 09:37:47] [debug] [  JLink] - [Debug   ] [JLink     ] Logger callback at 0x7ff78dd660d0 registered in JLink logger.
[2020-Oct-07 09:37:47] [debug] [nRFUnknown] - Just_open_dll_tagged_callback
[2020-Oct-07 09:37:47] [debug] [Backend] - open_dll
[2020-Oct-07 09:37:47] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2020-Oct-07 09:37:47] [debug] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLink_x64.dll.
[2020-Oct-07 09:37:47] [debug] [Backend] - Library loaded, loading member functions.
[2020-Oct-07 09:37:47] [debug] [Backend] - Member functions succesfully loaded.
[2020-Oct-07 09:37:47] [debug] [Backend] - dll_version
[2020-Oct-07 09:37:47] [debug] [Backend] - Segger dll version 6.84.a loaded.
[2020-Oct-07 09:37:47] [debug] [Backend] - set_core_data
[2020-Oct-07 09:37:47] [debug] [ nRF0x0] - enum_emu_snr
[2020-Oct-07 09:37:47] [debug] [nRFUnknown] - Just_enum_emu_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - enum_emu_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_enum_emu_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_get_num_emus
[2020-Oct-07 09:37:47] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2020-Oct-07 09:37:47] [debug] [nRFUnknown] - Just_connect_to_emu_with_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - connect_to_emu_with_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - is_connected_to_emu
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_enum_emu_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_get_num_emus
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2020-Oct-07 09:37:47] [debug] [Backend] - Segger logging enabled.
[2020-Oct-07 09:37:47] [debug] [Backend] - ---just_load_core_data
[2020-Oct-07 09:37:48] [debug] [ nRF0x0] - read_connected_emu_snr
[2020-Oct-07 09:37:48] [debug] [nRFUnknown] - Just_read_connected_emu_snr
[2020-Oct-07 09:37:48] [debug] [Backend] - read_connected_emu_snr
[2020-Oct-07 09:37:48] [debug] [Backend] - is_connected_to_emu
[2020-Oct-07 09:37:48] [debug] [ nRF0x0] - read_device_family
[2020-Oct-07 09:37:48] [debug] [nRFUnknown] - Just_read_device_family
[2020-Oct-07 09:37:48] [debug] [Backend] - is_connected_to_emu
[2020-Oct-07 09:37:48] [debug] [Backend] - read_debug_port_idr
[2020-Oct-07 09:37:48] [debug] [Backend] - read_debug_port_register
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_read_debug_port_register
[2020-Oct-07 09:37:48] [debug] [Backend] - coresight_configure
[2020-Oct-07 09:37:48] [debug] [Backend] - JLinkARM.dll reported &amp;quot;-1&amp;quot;, an unknown error.
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_abort_debug_action
[2020-Oct-07 09:37:48] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2020-Oct-07 09:37:48] [debug] [Backend] - JLinkARM.dll reported &amp;quot;-1&amp;quot;, an unknown error.
[2020-Oct-07 09:37:48] [debug] [ nRF0x0] - close_dll
[2020-Oct-07 09:37:48] [debug] [nRFUnknown] - Just_close_dll
[2020-Oct-07 09:37:48] [debug] [Backend] - close
[2020-Oct-07 09:37:48] [debug] [Backend] - disconnect_from_emu
[2020-Oct-07 09:37:48] [debug] [Backend] - is_connected_to_emu
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_disconnect_from_emu
[2020-Oct-07 09:37:48] [debug] [Backend] - is_connected_to_device
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_is_debug_region_powered
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_read_debug_port_register
[2020-Oct-07 09:37:48] [debug] [Backend] - is_connected_to_emu
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_write_debug_port_register
[2020-Oct-07 09:37:48] [debug] [Backend] - JLinkARM.dll reported &amp;quot;-1&amp;quot;, an unknown error.
[2020-Oct-07 09:37:48] [debug] [Backend] - ---just_abort_debug_action
[2020-Oct-07 09:37:48] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2020-Oct-07 09:37:48] [debug] [Backend] - JLinkARM.dll reported &amp;quot;-1&amp;quot;, an unknown error.
[2020-Oct-07 09:37:48] [debug] [Backend] - Segger Backend closed.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I downloaded the latest version yesterday, so I am up to date with nrfjprog, but I can&amp;#39;t use any commands with it, always the error above.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The installation instruction are pretty simple: run the install file and install Segger + nrfjprog, which I did. I have the Segger suite 6.84a that came with the nrfjprog 10.10.0. My probe is up to date according to J-Link Configurator 6.84a.&lt;br /&gt;&lt;br /&gt;What other trouble shooting steps do I need to do?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jean-Francois&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273513?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0439335-1dcd-4415-a42e-76a0abde8f9e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Setting RBPCONF will not prevent you from using the SWD interface, it will only prevent you from reading back content in flash. I used nrfjprog from verification:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ nrfjprog --recover
Recovering device. This operation might take 30s.
Erasing user code and UICR flash areas.

$ nrfjprog --memrd 0x10001004
0x10001004: FFFFFFFF                              |....|

## Flash FW here

$ nrfjprog --memrd 0x10001004
0x10001004: FFFF00FF                              |....|

$ nrfjprog --memrd 0x1000
ERROR: The operation attempted is unavailable due to readback protection in
ERROR: your device. Please use --recover to unlock the device.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I set both for testing purposes, as you can see above, PALL is sufficient to enable readback protection for full chip. PR0 can be used to protect only the region from 0x0 to the number of pages set in UICR-&amp;gt;CLENR0 register.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273508?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:20:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5218b3e8-2d83-411c-a7e3-1086b86f12b7</guid><dc:creator>JFGagnon</dc:creator><description>&lt;p&gt;So maybe my method of testing is wrong. When the protection is enabled, I shouldn&amp;#39;t be able to use the SWD right? Because when I run this piece of code (the initial one), I can still JTAG in.&lt;br /&gt;&lt;br /&gt;If it makes a difference, I am using IAR 8.40.1&lt;br /&gt;&lt;br /&gt;How do you confirm that the read protection is correctly applied? Also, I see that you&amp;#39;ve put PR0 protection as well. It is not clear in the documentation, but I thought that only PALL was needed for a full protection.&lt;br /&gt;&lt;br /&gt;I will try your code in the meantime.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jean-Francois&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF81522] Can't enable Read Protection ALL (RBPCONF)</title><link>https://devzone.nordicsemi.com/thread/273507?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:15:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2490d158-2b16-4bf9-ae94-91f62902d68c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tested this out, and using&amp;nbsp;&lt;span&gt;nrf_nvmc_write_word(0x10001004, 0x0000FF00); worked on my board (nRF51 DK/PCA10028). Note that the sd_flash_write will report an error if the destination is outside of the flash area, this function cannot be used for writing to UICR. You must write this register before enabling the softdevice, or disable the softdevice before doing the write.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To be exact, I&amp;nbsp;added this code and called the function from start of main():&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define RELEASE

void UTILS_EnableReadProtection (void)
{
#ifdef RELEASE
// Check if read-back mechanism is turned ON.
if((uint32_t)((NRF_UICR-&amp;gt;RBPCONF &amp;amp; UICR_RBPCONF_PALL_Msk) &amp;gt;&amp;gt; UICR_RBPCONF_PALL_Pos) != UICR_RBPCONF_PALL_Enabled) {
	nrf_nvmc_write_word(0x10001004, 0xFFFF0000);
}
#endif
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>