<?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>MCUBoot hangs when using CONFIG_BOOT_SERIAL_WAIT_FOR_DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94558/mcuboot-hangs-when-using-config_boot_serial_wait_for_dfu</link><description>The BOOT_SERIAL_WAIT_FOR_DFU feature is meant to wait a number of milliseconds (500 by default) for a message via serial comms. If it doesn&amp;#39;t receive a message it continues to boot as normal. The problem is that it waits forever, and never boots as normal</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Dec 2022 09:11:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94558/mcuboot-hangs-when-using-config_boot_serial_wait_for_dfu" /><item><title>RE: MCUBoot hangs when using CONFIG_BOOT_SERIAL_WAIT_FOR_DFU</title><link>https://devzone.nordicsemi.com/thread/399349?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 09:11:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ffb116c-485e-4fb2-8e41-96550cb7693e</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have seen issues with MCUboot on custom boards previously due to missing clock configuration, but since you can reproduce it with a DK this should not be the cause of the issue.&lt;/p&gt;
&lt;p&gt;A colleague of mine has previously seen an issue with logging when using&amp;nbsp;CONFIG_BOOT_SERIAL_WAIT_FOR_DFU. Without it logging works fine in both the bootloader and application, but with this enabled he gets logging from only one of them, most likely due to a race condition. Your issue might be something similar or another race condition. &lt;/p&gt;
&lt;p&gt;I have a couple of things you can try. The first is to debug the application to check whether the issue is the logging or that the application does not boot.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The second is to try with another example. You can for example use the Hello World sample and add the MCUboot functionality there, or you can use this USB CDC wait for DFU example made by a colleague of mine: &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/serial_recovery/mcuboot_serial_recovery_cdc_acm_wait"&gt;mcuboot_serial_recovery_cdc_acm_wait&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot hangs when using CONFIG_BOOT_SERIAL_WAIT_FOR_DFU</title><link>https://devzone.nordicsemi.com/thread/399206?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 13:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:014ddbc0-a76d-45d5-9c31-a11201107227</guid><dc:creator>StephenApprox</dc:creator><description>&lt;p&gt;Thanks for the reply. I&amp;#39;ve tried it on a dev board as well, PCA10040 (as I&amp;#39;m using nRF52832), and the same happens.&lt;/p&gt;
&lt;p&gt;To clarify, the bootloader works fine without the wait_for_dfu feature enabled. And when it is enabled, I can enable RTT logging in MCUBoot and see that it reaches the k_cpu_idle() call. After that it&amp;nbsp;remains inside&amp;nbsp;&lt;span&gt;k_cpu_idle()&lt;/span&gt;&amp;nbsp;until a character is received on the serial port. But if no character is received it has no way for execution to continue.&lt;/p&gt;
&lt;p&gt;Do you think k_cpu_idle()&amp;nbsp;should return without an interrupt occurring? And this is related to clock configuration?&lt;/p&gt;
&lt;p&gt;Thanks again for looking into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot hangs when using CONFIG_BOOT_SERIAL_WAIT_FOR_DFU</title><link>https://devzone.nordicsemi.com/thread/399178?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 12:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95c3219e-c88b-4f19-803a-3b7f87282480</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is this on a custom board or DK? If it is custom you must make sure to set the clock config in MCUboot as well, in addition to in the board file. Child images do not inherit this configuration. so you must explicitly set it in the child image&amp;#39;s configuration (for example child_image/mcuboot.conf).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>