<?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>About serial bootloader for NRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72048/about-serial-bootloader-for-nrf52840</link><description>Hello All, 
 We are using NRF52840 module, need to work on serial bootloader. 
 I have gone through the bootloader example, our requirement is need the serial(UART) bootloader without any security(signature validation) code base. 
 I understood that open</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Mar 2021 14:26:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72048/about-serial-bootloader-for-nrf52840" /><item><title>RE: About serial bootloader for NRF52840</title><link>https://devzone.nordicsemi.com/thread/296898?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 14:26:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19629812-cf3b-4753-84c3-8119f1ae633f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shekar,&lt;/p&gt;
[quote user="Shekar"]1. While waiting for an event in loop_forever() API it is in while(true) condition. How it will back to main?[/quote]
&lt;p&gt;Sorry, my previous answer is not complete and that might cause the misunderstand.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;loop_forever() relays on the&amp;nbsp;inactivity timer and will get&amp;nbsp;&lt;/span&gt;inactivity_timeout as you thought at first. If you add&lt;span&gt;&amp;nbsp;&lt;/span&gt;NRF_LOG_FINAL_FLUSH(); after&lt;span&gt;&amp;nbsp;&lt;/span&gt;NRF_LOG_DEBUG(&amp;quot;Resetting bootloader.&amp;quot;);&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;and set the breakpoint at&amp;nbsp;nrf_dfu_settings_backup(do_reset); in the&amp;nbsp;bootloader_reset(). It will trigger it and gets the log while it has timeout without action. Without the breakpoint, you might not see the log of&amp;nbsp;&lt;span&gt;&amp;quot;Resetting bootloader.&amp;quot; The reason might be the device is probably rebooting too fast so that the debugger is not able to read the message in time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/265338.PNG" /&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Shekar"]2. How can I enable debug logs, I can see &amp;quot;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;NRF_LOG_DEBUG&lt;/span&gt;&amp;quot; , &amp;quot;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;NRF_LOG_INFO&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;NRF_LOG_WARNING&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;NRF_LOG_ERROR&lt;/span&gt;&amp;quot;. I just need to see the flow and add few more debug messages in code. Not sure which one to use. Where can I see those messages?[/quote]
&lt;p&gt;&amp;nbsp;You could modify&amp;nbsp;&lt;span&gt;RF_LOG_DEFAULT_LEVEL in the sdk_config.h to adjust the log info.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_LOG_DEFAULT_LEVEL - Default Severity level&lt;br /&gt;&lt;br /&gt;// &amp;lt;0=&amp;gt; Off&lt;br /&gt;// &amp;lt;1=&amp;gt; Error&lt;br /&gt;// &amp;lt;2=&amp;gt; Warning&lt;br /&gt;// &amp;lt;3=&amp;gt; Info&lt;br /&gt;// &amp;lt;4=&amp;gt; Debug&lt;/p&gt;
&lt;p&gt;#ifndef NRF_LOG_DEFAULT_LEVEL&lt;br /&gt;#define NRF_LOG_DEFAULT_LEVEL 4&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About serial bootloader for NRF52840</title><link>https://devzone.nordicsemi.com/thread/296623?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 16:42:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfc51ae9-5e75-4bd7-9dd8-d9fa7ee3ede2</guid><dc:creator>Shekar</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;You mean &amp;quot;&lt;span style="background-color:#ffffff;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;If there is no event and timeout while in the&amp;nbsp;loop_forever(), it will back to main().&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;1. While waiting for an event in loop_forever() API it is in while(true) condition. How it will back to main?&lt;/p&gt;
&lt;p&gt;2. How can I enable debug logs, I can see &amp;quot;&lt;span style="background-color:#ffffff;"&gt;NRF_LOG_DEBUG&lt;/span&gt;&amp;quot; , &amp;quot;&lt;span style="background-color:#ffffff;"&gt;NRF_LOG_INFO&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="background-color:#ffffff;"&gt;NRF_LOG_WARNING&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="background-color:#ffffff;"&gt;NRF_LOG_ERROR&lt;/span&gt;&amp;quot;. I just need to see the flow and add few more debug messages in code. Not sure which one to use. Where can I see those messages?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;shekar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About serial bootloader for NRF52840</title><link>https://devzone.nordicsemi.com/thread/296570?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 13:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9cc6055-781b-42b5-a116-63645b10aef0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="Shekar"]In this &lt;span style="background-color:rgba(255, 255, 255, 1);color:rgba(17, 23, 26, 1);float:none;font-family:&amp;#39;GT Eesti&amp;#39;, &amp;#39;Helvetica&amp;#39;, Arial, sans-serif;font-size:16px;font-style:italic;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0;text-transform:none;white-space:normal;"&gt;secure_bootloader_uart_mbr_pca10056&lt;/span&gt; project, i downloaded to nrf52840 chip as i understand the workflow. It will go to the DFU mode if no valid app exist in the chip, when it is in DFU mode it will wait for 120 seconds(as default) no communication on serial it will reboot the bootloader.[/quote]
&lt;p&gt;I think you mean the inactivity_timeout function which function will reboot when it gets t&lt;span&gt;imeout (#define &lt;a title="NRF_BL_DFU_INACTIVITY_TIMEOUT_MS" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__nrf__bootloader__config.html?cp=7_5_2_6_11_7_1_8#gac4b458d2cbbdc42f27f223871360b546"&gt;NRF_BL_DFU_INACTIVITY_TIMEOUT_MS&lt;/a&gt; 120000) before automatically starting a valid application due to inactivity.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;When the bootloader&amp;nbsp;enters the main loop, it will be in the&amp;nbsp;loop_forever() to wait for an event (or action). If there is no event and timeout while in the&amp;nbsp;loop_forever(), it will back to main().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About serial bootloader for NRF52840</title><link>https://devzone.nordicsemi.com/thread/296294?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 14:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72d31a12-bc72-467a-9262-787e5ae44927</guid><dc:creator>Shekar</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;span style="background-color:#ffffff;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Amanda H&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I have another question about the example code&amp;nbsp;&lt;span style="background-color:rgba(255, 255, 255, 1);color:#11171a;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_bootloader&lt;/span&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;In this &lt;span style="background-color:#ffffff;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:16px;font-style:italic;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;secure_bootloader_uart_mbr_pca10056&lt;/span&gt; project, i downloaded to nrf52840 chip as i understand the workflow. It will go to the DFU mode if no valid app exist in the chip, when it is in DFU mode it will wait for 120 seconds(as default) no communication on serial it will reboot the bootloader.&lt;/p&gt;
&lt;p&gt;But my observation is it will keep coming back to main() function once it go to &amp;quot;&lt;span style="background-color:#ffffff;"&gt;loop_forever&lt;/span&gt;()&amp;quot; then it is coming out.&lt;/p&gt;
&lt;p&gt;It should wait in that&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;loop_forever&lt;/span&gt;() API correct? why this miss behavior please do let me know.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;shekar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About serial bootloader for NRF52840</title><link>https://devzone.nordicsemi.com/thread/296284?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 13:48:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cee9073-550e-400c-9b5e-b8f21200c9bd</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shekar,&lt;/p&gt;
[quote user=""]1. For NRF52840, secure_bootloader_uart_mbr_pca10056. Is this can I use for my development or do I have any other project which suites my requirement? Serial bootloader without any security feature. Bare metal bootloader to update application image.[/quote]
&lt;p&gt;&lt;span&gt;The SDK does not provide any bootloader without support for signature verification. However, you can refer to my colleague Einar&amp;#39;s &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60537/how-to-get-a-signature-less-bootloader-from-example-bootloaders/246298#246298"&gt;answer &lt;/a&gt;to achieve that.&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]2. In this one another question I have if I modify the structure &amp;quot;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;nrf_dfu_bank_t&lt;/span&gt;&amp;quot; by adding one variable to this. Any issue to the MBR. This particular structure is used in&amp;nbsp;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;nrf_dfu_settings_t&lt;/span&gt; for&amp;nbsp;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;bank_0&lt;/span&gt; &amp;amp;&amp;nbsp;&lt;span style="background-color:rgba(255, 255, 255, 1);"&gt;bank_1.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;The structure&amp;nbsp;&lt;a title="Software Development Kit" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrf__dfu__bank__t.html?resultof=%22%6e%72%66%5f%64%66%75%5f%62%61%6e%6b%5f%74%22%20"&gt;nrf_dfu_bank_t&lt;/a&gt;&amp;nbsp;is used as the d&lt;span&gt;escription of a single bank. I don&amp;#39;t think it will cause the issue. Please let me know if you see something wrong.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>