<?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>Unexpected serial UART bootloader exit mechanism</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86382/unexpected-serial-uart-bootloader-exit-mechanism</link><description>I&amp;#39;m testing an implementation of the serial UART bootloader for DFU. Firmware update using nrfutil works fine, using a serial-USB dongle, The only issue I&amp;#39;m seeing is that if the dongle is not plugged into USB port on my PC, the device will not stay in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Mar 2022 09:44:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86382/unexpected-serial-uart-bootloader-exit-mechanism" /><item><title>RE: Unexpected serial UART bootloader exit mechanism</title><link>https://devzone.nordicsemi.com/thread/360711?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 09:44:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc72d80e-54bb-4dc7-b10e-e15b3873dd62</guid><dc:creator>Pete W</dc:creator><description>&lt;p&gt;Thanks for the reply Vidar and the explanation. That&amp;#39;s exactly where I put my pull-up mod.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Pete&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unexpected serial UART bootloader exit mechanism</title><link>https://devzone.nordicsemi.com/thread/360682?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 08:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:323795a8-d73f-4bbe-a2f5-df7adb07a705</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Pete,&lt;/p&gt;
&lt;p&gt;The UART transport is configured to invoke the app_error_handler_bare() function in main.c if an UART&amp;nbsp; &lt;span&gt;&lt;a title="Error conditions" href="https://infocenter.nordicsemi.com/topic/ps_nrf52811/uarte.html?cp=4_4_0_5_27_3#concept_fpm_qcm_wr"&gt;Error condition&lt;/a&gt; &lt;/span&gt;&lt;span&gt;is detected as you can see from the nrf_dfu_serial_uart.c source here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1648627131433v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And the error handler will trigger system reset making the device exit dfu mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A solution, as you suggested, is to enable the internal pull-up on the RX pin. This will prevent it from becoming floating when the USB port is not plugged in. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint32_t uart_dfu_transport_init(nrf_dfu_observer_t observer)
{
    ...

    err_code =  nrf_drv_uart_init(&amp;amp;m_uart, &amp;amp;uart_config, uart_event_handler);
    if (err_code != NRF_SUCCESS)
    {
        NRF_LOG_ERROR(&amp;quot;Failed initializing uart&amp;quot;);
        return err_code;
    }

    /* The UART driver configures the input pin without pullup enabled. We can override it 
       here after the driver initalization is complete. */
    NRF_P0-&amp;gt;PIN_CNF[RX_PIN_NUMBER] |= (GPIO_PIN_CNF_PULL_Pullup &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos);
    
    ...&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unexpected serial UART bootloader exit mechanism</title><link>https://devzone.nordicsemi.com/thread/360612?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 16:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85b7d37f-0071-4ce1-b401-02ee981eca0e</guid><dc:creator>Pete W</dc:creator><description>&lt;p&gt;(Device is nRF52811 and I&amp;#39;m using SDK 17.0.2)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>