<?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>Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74556/changing-regout0-value-to-3v3-in-a-dfu-enabled-software</link><description>Hello, 
 
 We have an NRF52840 based custom design board where the peripherals run on 3.3v. I based my code on a combination of ble_app_uart and ble_app_buttonless_dfu examples. It has been working great so far. However, recently we designed a new board</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 May 2021 13:38:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74556/changing-regout0-value-to-3v3-in-a-dfu-enabled-software" /><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/308204?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 13:38:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:258edf43-14c6-4e75-925f-f8a41a4cb17a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Onur,&lt;/p&gt;
&lt;p&gt;Good to hear that you found the problem. Yes, it&amp;#39;s important to disable the NRF_BL_DFU_ENTER_METHOD_BUTTON option when having a bootloader button.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/308203?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 13:35:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19eb4aa9-6ff1-471d-9c8e-f3674e5a601c</guid><dc:creator>OnurGules</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;We were able to find out the issue. I somehow missed that dfu_enter_check() was returning true because of this code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    if (NRF_BL_DFU_ENTER_METHOD_BUTTON &amp;amp;&amp;amp;
       (nrf_gpio_pin_read(NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN) == 0))
    {
        NRF_LOG_DEBUG(&amp;quot;DFU mode requested via button.&amp;quot;);
        return true;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So, we were clearing NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN while setting REGOUT 0 to 3V3. We don&amp;#39;t actually have any buttons on our board so commenting out this code solved our problem.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Onur Gules.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/308188?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 13:03:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:855f5862-9228-43b9-a6ec-50efc08a7536</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Onur,&lt;/p&gt;
&lt;p&gt;Have you had any progress on this? As I mentioned in the other post, the board should not really reset unless the supply voltage dips below 2.5v. Do you know if the supply voltage is stable in your case?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307670?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 12:47:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d211f202-fcbb-4db5-b77c-c7b33ebef911</guid><dc:creator>OnurGules</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I tried:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --memwr 0x10001304 --val 3
nrfjprog --reset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The device is stuck in bootloader mode after reset.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Onur.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307654?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 12:02:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e506fc5d-9c5a-45cc-a82c-f979c29537e5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Onur,&lt;/p&gt;
&lt;p&gt;Interesting, so it&amp;#39;s likely not SW related then. I wonder if you may be running into the same problem as the forum user in the other post reported. Could try to lower the REG0 voltage to 3v0 or less to see if that works?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307623?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 09:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59cce6d0-0513-469d-a44a-d695bb1733b0</guid><dc:creator>OnurGules</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I tried&amp;nbsp;setting it directly with nrfjprog as you described. The device works fine before setting REGOUT0 to 5, and is stuck in bootloader after.&lt;/p&gt;
&lt;p&gt;I also found this thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/73814/regout0-set-to-3-3v-fail-buttonless-dfu"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/73814/regout0-set-to-3-3v-fail-buttonless-dfu&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not sure how, but their problem was related to their hardware. I&amp;nbsp;have one more board so I&amp;#39;ll see if I can make that one work.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Onur.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307618?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 09:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0bffbcf-ec81-4957-8292-667f664666e4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Onur,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s interesting that it works as soon as you revert the change. To verify it if the relagulator setting is indeed the culprit, maybe you can try to set it directly with nrfjprog?&lt;/p&gt;
&lt;p&gt;e.g.&lt;/p&gt;
&lt;p&gt;nrfjprog --memwr 0x10001304 --val 5&lt;/p&gt;
&lt;p&gt;nrfjprog --reset&lt;/p&gt;
&lt;p&gt;Another post with some similiar observations (still unresolved) &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/74471/ota-failing-when-gpio-high-voltage-mode-3-3-v/307067#307067"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/74471/ota-failing-when-gpio-high-voltage-mode-3-3-v&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307613?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 08:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e42e1d1d-9f31-4c24-9f87-776f42c6d4a7</guid><dc:creator>OnurGules</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I tried reverting the changes I made to flash_placement.xml, linker-&amp;gt;memory segments and I also am not including uicr_config.h now in main.c. The device works normally now, although with incorrect voltage. So, it&amp;#39;s probably the changes I made to uicr is messing up the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also debugged the bootloader project and dfu_enter_check() returns false as it should.&amp;nbsp; You can find the debug logs I got below:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Whole firmware image received. Postvalidating.
&amp;lt;debug&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x27000, size: 0x20428
&amp;lt;debug&amp;gt; nrf_dfu_validation: Invalidating old application in bank 0.
&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...
&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FF000
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x2000A6E4, len=896 bytes), queue usage: 2
&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.
&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...
&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FE000
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 3
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x2000A364, len=896 bytes), queue usage: 4
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 4
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 2
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 1
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: All flash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash ash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Edit: I debugged the bootloader by performing a DFU with the same app that normally works without DFU. I changed the debug logs from yesterday as I was debugging the bootloader incorrectly.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Onur Gules.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307530?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 14:20:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04bf0098-65a6-4013-9fe8-16e6b9d39bed</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Onur,&lt;/p&gt;
&lt;p&gt;Thanks for testing. Is it possible that this may be unrelated to change you did to set the UICR regulator setting, or have you verified that it still works if you rever the change? Either way, I think you need to debug the bootloader project to find out why the bootloader will not start the application. First step may be to see if nrf_bootloader.c:dfu_enter_check() returns true instead of false which would make the&amp;nbsp; bootloader fall back to DFU mode.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307525?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 14:08:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e5b23b6-ee62-4d20-8b21-0fa4898bc08b</guid><dc:creator>OnurGules</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your answer. I tried flashing everything one by one with nrfjprog.&lt;/p&gt;
&lt;p&gt;-Started with the bootloader first:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfjprog --program softdevice.hex --chiperase --verify

Parsing hex file.
Erasing user available code and UICR flash areas.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Verifying programming.
Verified OK.
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;-Bootloader second:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --program bl.hex --sectorerase --verify
Parsing hex file.
Erasing page at address 0xF1000.
Erasing page at address 0xF2000.
Erasing page at address 0xF3000.
Erasing page at address 0xF4000.
Erasing page at address 0xF5000.
Erasing page at address 0xF6000.
Erasing page at address 0xF7000.
Erasing page at address 0xF8000.
Erasing page at address 0xF9000.
Erasing page at address 0xFA000.
Erasing page at address 0xFB000.
Erasing page at address 0xFC000.
WARNING: A UICR write operation has been requested but UICR has not been
WARNING: erased. Please verify that the result is correct.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Verifying programming.
Verified OK.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;-my app next:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --program app.hex --sectorerase --verify
Parsing hex file.
Erasing page at address 0x27000.
Erasing page at address 0x28000.
Erasing page at address 0x29000.
Erasing page at address 0x2A000.
Erasing page at address 0x2B000.
Erasing page at address 0x2C000.
Erasing page at address 0x2D000.
Erasing page at address 0x2E000.
Erasing page at address 0x2F000.
Erasing page at address 0x30000.
Erasing page at address 0x31000.
Erasing page at address 0x32000.
Erasing page at address 0x33000.
Erasing page at address 0x34000.
Erasing page at address 0x35000.
Erasing page at address 0x36000.
Erasing page at address 0x37000.
Erasing page at address 0x38000.
Erasing page at address 0x39000.
Erasing page at address 0x3A000.
Erasing page at address 0x3B000.
Erasing page at address 0x3C000.
Erasing page at address 0x3D000.
Erasing page at address 0x3E000.
Erasing page at address 0x3F000.
Erasing page at address 0x40000.
Erasing page at address 0x41000.
Erasing page at address 0x42000.
Erasing page at address 0x43000.
Erasing page at address 0x44000.
Erasing page at address 0x45000.
Erasing page at address 0x46000.
Erasing page at address 0x47000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Verifying programming.
Verified OK.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;-And finally the settings:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --program settings.hex --sectorerase --verify
Parsing hex file.
Erasing page at address 0xFE000.
Erasing page at address 0xFF000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Verifying programming.
Verified OK.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I then reset the device with nrfjprog --reset, but the device is still stuck in bootloader.&lt;/p&gt;
&lt;p&gt;Any thoughts?&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Onur Gules&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing REGOUT0 value to 3v3 in a DFU enabled software</title><link>https://devzone.nordicsemi.com/thread/307507?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 13:17:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b53e97c-2a2d-4fa5-8791-dca871594cfb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not clear how data in the UICR could be impacting the settings page, it&amp;#39;s not even in the same address range. As a test, and if you haven tried already, could you please try program the settings page after everything else has been programmed and see if it gives the same result?&amp;nbsp; You can use the following command to just load the settings file: &amp;quot;nrfjprog --program settings.hex --sectorease&amp;quot;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>