<?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>Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23551/secure-serial-dfu-app-with-uart-stuck-at-bootloader</link><description>Hello, 
 I&amp;#39;m working on an UART application which uses experimental_bootloader_secure_serial bootloader. I&amp;#39;ve done a similar thing before with SDK-11 (though not a secure DFU) and after getting through building a secure bootloader, signing, etc. I was</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jul 2017 05:08:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23551/secure-serial-dfu-app-with-uart-stuck-at-bootloader" /><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92505?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 05:08:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91dc9fe7-444d-4a25-9c14-fedb38f74e4f</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;I&amp;#39;ll experiment a little more and report it on github. Thank you for your help Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92504?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 11:31:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce393d36-5c0d-40a4-92a3-e14817892d4d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@pb: Yes, with the latest version of nrfutil v3.2.0 you should be able to set the baudrate as well as enabling/disabling HWFC. The chosen baudrate must of course match the one configured in the bootloader example. Could you report this as an issue in the nrfutil github repo(&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/issues"&gt;here&lt;/a&gt; is the link)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92503?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 10:31:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dce404e-1648-4d69-bf61-718c42dac9a7</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;Also I&amp;#39;ve tried using the &lt;code&gt;--baud-rate=115200&lt;/code&gt; param of nrfutil but it didn&amp;#39;t have an impact on the events I&amp;#39;ve described above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92513?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 10:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d6d3e18-98d9-4398-af98-d55c9ff20fc4</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;So as it turns out my problem had a different source than problems with BL or the APP.
nrfutil uses a lower baud rate (19200, am I right?) for firmware transfer than my APP uses (115200). As a result, my OS (Linux) by default selected the last used baud rate, even if i specified otherwise when calling &lt;code&gt;screen /dev/ttyACM0 115200&lt;/code&gt; it still rolled back to one used by nrfutil.&lt;/p&gt;
&lt;p&gt;So to clear this and have a repeatable working DFU i have to do the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;perform DFU. App goes through BL and boots which I observe with LED states on DK&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;screen /dev/ttyACM0 115200&lt;/code&gt; - doesn&amp;#39;t work, both sending&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;screen /dev/ttyACM0 19200&lt;/code&gt; - this throws out some trash into the terminal&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;screen /dev/ttyACM0 115200&lt;/code&gt; - this now works&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Very confusing. I haven&amp;#39;t inspected nrfutil yet, but is it possible that there should be some flush after DFU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92506?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 13:29:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79d0a34c-c758-403f-8c75-1f96298836b5</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@pb: Yes, the experimental_ble_app_buttonless_dfu exaple found in
examples\ble_peripheral\experimental_ble_app_buttonless_dfu has a precompiled hex file in the hex folder.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92511?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 12:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9152420-c71b-4455-b6cb-319d94d9c890</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;You are right. But I&amp;#39;ve tried smaller even lower values than 0x59000 which unfortunately doesn&amp;#39;t change anything in terms of correct application boot.&lt;/p&gt;
&lt;p&gt;Are there maybe any example sources of the applications bundled as .hex with the SDK, eg. from examples/dfu/ble_dfu_send_hex/test_images_update_*/ ?
I really don&amp;#39;t see what can be wrong here and having some source reference would definitely help narrowing down on possible cause.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92509?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 11:46:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:303a18dc-0987-4878-9c15-89a8ca88e544</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The length of the application Flash section should be 0x59000 since the Secure Serial Bootloader starts at 0x78000.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92510?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 16:25:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:261e4a1d-989a-4600-b8b3-b9b22fe5e336</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;output from RTT is&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:DEBUG:In nrf_bootloader_init
:DEBUG:In real nrf_dfu_init
:DEBUG:running nrf_dfu_settings_init
:DEBUG:Enter nrf_dfu_continue
:DEBUG:Valid App
:DEBUG:Enter nrf_dfu_app_is_valid
:DEBUG:Return true. App was valid
:DEBUG:Enter nrf_dfu_app_is_valid
:DEBUG:Return true. App was valid
:DEBUG:Jumping to: 0x0001f000
:DEBUG:Running nrf_bootloader_app_start with address: 0x0001f000
:DEBUG:Disabling interrupts
:DEBUG:Setting SD vector table base: 0x0001f000
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92508?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 16:24:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f1198b3-925b-41ed-bbef-402b518e368a</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;&lt;em&gt;Had to split my response into parts&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But the results are the same. The thing which I don&amp;#39;t also understand is why the bootloader doen&amp;#39;t go into the app even though it finds it valid. My apps .ld is &lt;code&gt;FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000&lt;/code&gt;- tried reducing it but no luck. I&amp;#39;ve also reduced my firmware to total minimum and it still doesn&amp;#39;t start from BL:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
    uint32_t err_code;
    bool     erase_bonds;
    err_code = app_timer_init();
    APP_ERROR_CHECK(err_code);
    log_init();
    buttons_leds_init(&amp;amp;erase_bonds);
    nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
    SOFTDEVICE_HANDLER_INIT(&amp;amp;clock_lf_cfg, NULL);
    NRF_LOG_INFO(&amp;quot;Firmware: reset_to_dfu\r\n&amp;quot;);
    for (;;)
    {
        power_manage();
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92507?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 16:22:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ad9994e-b3d2-4f7a-ad03-bcc537f11c82</guid><dc:creator>PB</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried a few things, for example the code below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void handle_dfu_start()
{
    uint32_t err_code;
    app_uart_flush();
    app_uart_close();

    softdevice_handler_sd_disable();
    err_code = sd_softdevice_disable();
    APP_ERROR_CHECK(err_code);

    err_code = sd_power_gpregret_clr(0, 0xffffffff);
    APP_ERROR_CHECK(err_code);

    err_code = sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
    APP_ERROR_CHECK(err_code);

    NVIC_SystemReset();

}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Serial DFU, app with UART stuck at bootloader</title><link>https://devzone.nordicsemi.com/thread/92512?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 14:21:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9c7644d-7d74-4f50-8538-3a69936fb400</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Could you post the code where you uninitializing the UART peripheral in the application before you jump to the bootloader? Also,is teh SoftDevice enabled when you call handle_dfu_start()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>