<?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 nRF52840 NCS v1.5.0 - stuck in bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74242/mcuboot-nrf52840-ncs-v1-5-0---stuck-in-bootloader</link><description>I&amp;#39;m finding that the MCUBoot stays stuck in bootloader mode sometimes when using a CONFIG_BOOT_SERIAL_DETECT_PORT. 
 I&amp;#39;ve narrowed it down to setting up the GPIO as input/pull-up and reading it being the next immediate operation - there are old posts</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Apr 2021 09:15:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74242/mcuboot-nrf52840-ncs-v1-5-0---stuck-in-bootloader" /><item><title>RE: MCUBoot nRF52840 NCS v1.5.0 - stuck in bootloader</title><link>https://devzone.nordicsemi.com/thread/306261?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 09:15:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7977d1b-dd58-4b3d-afd2-56e0c1c287c9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="farhangj"]But more importantly I think the NCS fork of MCUboot needs to be patched with a delay or your suggested line of code to read a random event register.[/quote]
&lt;p&gt;I agree with you 100 %. This is the reason why I reported this internally as bug, and made the mcuboot/bootloader teams aware of this issue.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot nRF52840 NCS v1.5.0 - stuck in bootloader</title><link>https://devzone.nordicsemi.com/thread/306178?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 16:04:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:075d1911-fdfe-4ada-988a-715fd76872fd</guid><dc:creator>Farhang</dc:creator><description>&lt;p&gt;Thanks for the reply and explaining the root cause Hakon.&lt;/p&gt;
&lt;p&gt;Adding a debounce routine as you mentioned would be great.&lt;/p&gt;
&lt;p&gt;But more importantly I think the NCS fork of MCUboot needs to be patched with a delay or your suggested line of code to read a random event register.&lt;/p&gt;
&lt;p&gt;Otherwise you&amp;#39;ll have units that use MCUBoot as bootloader with the button method lockup (if reset or pwr cycled) and stay in boot waiting for FW update (though there must be a timeout?).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot nRF52840 NCS v1.5.0 - stuck in bootloader</title><link>https://devzone.nordicsemi.com/thread/306078?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 11:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b11d1a27-a537-4e72-b2f3-0d38ed0f11de</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the cpu runs on 64 MHz, and the peripheral interface is on 16M, writes and immediate reads need to be sync&amp;#39;ed towards the slowest clock, which is the peripheral clock here. Reading any random event register will generate a wait condition if required, for instance (void)NRF_TIMER0-&amp;gt;EVENTS_COMPARE[0];.&lt;/p&gt;
&lt;p&gt;I agree that the non-existing debounce routine here can be highly improved. I&amp;#39;ll report this internally as a bug. Thank you for reporting this back to us!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>