<?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>BLE Recovery Image</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93374/ble-recovery-image</link><description>I am trying to make a recovery image for my app that allows me to press a button on power-up to recover a possibly bad update over BLE. 
 If an update is sent to a device that has a critical error that prevents the SMP SVR from running or BLE devices</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Apr 2024 09:22:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93374/ble-recovery-image" /><item><title>RE: BLE Recovery Image</title><link>https://devzone.nordicsemi.com/thread/479158?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 09:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c53ea8fa-3589-4035-96ef-61e902de07d5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Markus,&lt;/p&gt;
&lt;p&gt;We do not have any official implementation for such a module now either no.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Recovery Image</title><link>https://devzone.nordicsemi.com/thread/478756?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 11:54:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73c33bcb-675d-4685-bc60-7a08c2625017</guid><dc:creator>MrBurvall</dc:creator><description>&lt;p&gt;Hello Sigurd, do you know if there has been any progress on Golden Recovery Partition?&lt;/p&gt;
&lt;p&gt;Best Regards, Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Recovery Image</title><link>https://devzone.nordicsemi.com/thread/393990?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 16:23:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20de4cfe-0a58-4295-b95a-f0dda77e3cb1</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Luke,&lt;/p&gt;
&lt;p&gt;After talking with both my colleagues and some of our developers, here is the solution I think is the best one.&lt;br /&gt;Keep in mind that this is a design question and there is likely multiple good solutions. &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;/span&gt;Neither we nor mcuboot supports such a golden recovery partition yet. &lt;br /&gt;I will suggest it to our developers, and it will be up to them to if and when they want to implement such a feature.&lt;br /&gt;So if you want it soon you will have to do the heavy-lifting yourself. &lt;br /&gt;I think you already knew this, just said it to be sure.&lt;/p&gt;
&lt;p&gt;Anyhow, here is my suggestion:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:150%;"&gt;Swap into golden recovery partition on button hold&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1667488723012v1.png" alt=" " /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Firstly, just have the same partitioning as normal mcuboot behavior. &lt;br /&gt;The images will be swapped if the secondary slot is tagged with &amp;quot;test&amp;quot; or &amp;quot;confirm&amp;quot;, as normal.&lt;/p&gt;
&lt;p&gt;I assume that you have a button available on the device. &lt;br /&gt;If not there is likely other solutions to trigger the golden recovery.&lt;/p&gt;
&lt;p&gt;Then add something like this to MCUboot (psuedo-code):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (button_held):
    mark_secondary_slot_as_test()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Since the secondary slot is now tagged as &amp;quot;test&amp;quot;, MCUboot will swap the slots and boot into Golden Recovery.&lt;br /&gt;When in Golden Recovery, do BLE SMP and write new application to current secondary slot.&lt;br /&gt;On next reboot, swap back into new application.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Limit application from overwriting golden recovery partition&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;When doing this, it is important that the application can not be allowed to overwrite the Golden Recovery Partition.&lt;br /&gt;For a start, just never add DFU/FOTA functionality to the application and be careful to keep inside partitions.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;If you want to be even more safe, consider adding some extra protection here. I am not sure what it would be at the moment, but as you can see below it is important that the golden recovery is updatable, so we do not want to make it read-only either.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Available space&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;MCUboot requires that both slots have the same size. So for this, the Golden Recovery Partition would have more available space than it needs.&lt;br /&gt;For this solution I can not see a way to reduce flash size, except for creating a git issue with upstream MCUboot and ask them for more flexible slot sizes. &lt;br /&gt;Other solutions for Golden Recovery partitions might be able to do less flash size, for example if you do something similar to this, but with &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.1/nrf/samples/bootloader/README.html"&gt;NSIB&lt;/a&gt;+MCUboot instead. I have not looked more into this though.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Updatable Golden Recovery Partition&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Both colleagues and developers I have spoken to agree that it is a good idea to be able to update such a golden recovery partition.&lt;br /&gt;Just because something can not change does not mean that it does not contain bugs. &lt;br /&gt;This is especially true for a large application, such one with BLE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;This should be possible with the above solution.&lt;br /&gt;Instead of writing a new application over the previous application, just write a Golden Recovery partition over the application.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1667491102715v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Now you have 2 Golden Recovery partitions and should be able to write a new golden recovery image to the right place.&lt;br /&gt;Then use the updated Golden Recovery partition to &amp;quot;update&amp;quot; the application to get back to a normal state.&lt;br /&gt;This takes a lot of writes, but this operation should not be frequently used.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Changes to MCUboot&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Yes this requires that you make changes to MCUboot.&lt;br /&gt;The changes in this suggestion would be small though, and so it would be a lower risk of something going wrong.&lt;/p&gt;
&lt;p&gt;Let us know if you have any questions or feedback to this suggestion.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Recovery Image</title><link>https://devzone.nordicsemi.com/thread/393437?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 11:29:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47c87d4a-6544-45cf-83ba-1a394f2c8d45</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Luke&lt;/p&gt;
&lt;p&gt;Thank you for all the good points above!&lt;br /&gt;It is very useful both to get more insight into what our customers use, and to get some other views on the matter!&lt;/p&gt;
&lt;p&gt;I think I understand what you want to have here, and as previously mentioned you are not the first who ask about this.&lt;br /&gt;I have discussed this a bit with some of my colleagues in tech-support, and so far we think maybe a golden SMP partition could be done without changing MCUboot.&lt;/p&gt;
&lt;p&gt;We will have a talk with our bootloader developers about this, to see what options we have, and what wpuld be the best approach.&lt;/p&gt;
&lt;p&gt;I will return with some more information tomorrow or Thursday on what we found.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Recovery Image</title><link>https://devzone.nordicsemi.com/thread/393346?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 23:10:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e56fc756-33a0-41e6-9403-2b6a1e6fbf11</guid><dc:creator>LukeC</dc:creator><description>&lt;p&gt;&lt;span style="background-color:#999999;"&gt;&lt;em&gt;On the other hand, if the device is expensive/critical, maybe you should fix this in hardware and add an option for serial recovery?&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Not possible, all of our products are sealed for waterproofing, and do not have the space or budget for an expensive serial recovery port.&amp;nbsp; It would be very hard to convince a product manager to add an expensive waterproof port when we didn&amp;#39;t need it on the old SDK.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#999999;"&gt;&lt;em&gt;First, you should do testing of the images before you confirm them.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;True, except covering all possible issues is nearly impossible in an embedded system.&amp;nbsp; Especially if multiple developers are working on a system.&lt;/p&gt;
&lt;p&gt;My biggest concern is the SMP SVR Bluetooth setup itself.&amp;nbsp; The example code for the BLE SMP SVR required the Bluetooth TX buffer count to be increased.&amp;nbsp; What if a junior dev changes this on a subsequent build?&amp;nbsp; This could potentially brick subsequent updates for all of our devices. Hopefully, it would be caught in testing, but this seems like a foot gun that I would not want to put in a system.&lt;br /&gt;&lt;br /&gt;It seems like a very risky setup to include the firmware update gateway (SMP) in the application build.&amp;nbsp; Most embedded devices have some sort of failsafe to enter the bootloader to avoid totally bricking the system (button combos on phones, bios on a computer, etc).&amp;nbsp; I guess this failsafe is only the serial bootloader for MCUBoot, but that isn&amp;#39;t an option for us.&lt;/p&gt;
&lt;p&gt;Even if we only update in Test mode, how do we know the updated app has a working SMP?&amp;nbsp; You can&amp;#39;t really test this in the field after the update, you have to trust it works. It would be totally reliant on HIL testing in-house with no fail-safe backup.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#999999;"&gt;&lt;em&gt;So maybe even ask yourself: If the device is cheap, is it fine if some of the devices are returned?&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Most&amp;nbsp;of our products range from fairly pricy to expensive.&amp;nbsp; I understand there will always be RMA fallout for hardware, but I do not consider it acceptable to possibly brick devices in the field with software.&amp;nbsp; This has the unlikely, but the potential for ruining all products, not just a few.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Question:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#39;t it be possible to include a build of the SMP update and place it in its own partition?&amp;nbsp; &amp;nbsp;EG: MCUBoot, Slot0, Slot1, Recovery.&amp;nbsp; Then I could have MCUBoot jump to the recovery partition on recovery condition (buttons held on power up).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nice thing about this is the SMP Update would be tested initially and then not change with application updates.&amp;nbsp; It would be fixed in flash and never update or change.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Recovery Image</title><link>https://devzone.nordicsemi.com/thread/393273?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 14:19:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64718b65-91bd-4762-9c16-b522467938e6</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Luke&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;nRF5 SDK vs nRF Connect SDK&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The partitioning for the nRF5 bootloader vs MCUboot looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2671.pastedimage1667217593499v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The reason why you could do Bluetooth Low Energy(BLE) Recovery in the nRF5 SDK was that the softdevice was &lt;strong&gt;not&lt;/strong&gt; a part of the application.&lt;br /&gt;That way, the bootloader could interact with the SoftDevice.&lt;/p&gt;
&lt;p&gt;In the nRF Connect SDK, we do not supply a solution for BLE Recovery.&lt;/p&gt;
&lt;p&gt;However, what you want is not BLE recovery specifically, it is to do DFU over BLE (also known as FOTA), and make sure that your device does not break.&lt;br /&gt;As you know, this is a very usual use-case for DFU on our devices.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;The Default method&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The default MCUboot solution for doing FOTA is to have BLE functionality in your application.&lt;br /&gt;Then when you update the application, it will save the previous application:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0537.pastedimage1667221480887v2.png" alt=" " /&gt;&lt;br /&gt;(&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp"&gt;ref my unofficial explanation here&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The bootloader will enter test mode on the first DFU, then you test properly and if something fails you can revert to the working app.&lt;br /&gt;If it works, you can confirm the application.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Your suggestion, Recovery partition&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To make sure that we are on the same page, I will sum up your proposed solution.&lt;/p&gt;
&lt;p&gt;Something like this right?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/3660.pastedimage1667221752044v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;With a recovery partition in the secondary slot.&lt;/p&gt;
[quote user=""]Swap golden recovery image:&lt;br /&gt; &lt;br /&gt; Keep a working, tested copy in Slot1 and copy this to Slot0 when recovery mode is activated.[/quote]
&lt;p&gt;In the default solution, we assume that the previous application is equal to the golden image, as it presumably worked.&lt;/p&gt;
&lt;p&gt;For the device to become bricked at this point, you need to upload a faulty image, and then upload another faulty image after.&lt;/p&gt;
&lt;p&gt;The chance of this is low.&amp;nbsp;&lt;br /&gt;First, you should do testing of the images before you confirm them.&lt;br /&gt;Then, for you to be able to do FOTA with a faulty image is also low.&lt;br /&gt;Lastly, to FOTA two faulty images in a row is even lower.&lt;/p&gt;
&lt;p&gt;But is not the BLE Recovery image simpler, and therefore have less chance to fail if I swap to it?&lt;br /&gt;This is true yes. However, if you for example make sure that the FOTA service start first for your device and nothing else starts for a couple of seconds after a reset, I would argue that you decrease the chance for something else to fail. &lt;br /&gt;Then the user can just reset the device if something deadlocks.&lt;/p&gt;
&lt;p&gt;Recovering from confirmed image is still impossible without serial recovery.&lt;br /&gt;However, even if you have a golden recovery partition, you usually stop being in &amp;quot;test mode&amp;quot; after a DFU. &lt;br /&gt;Now that the application is Confirmed, the bootloader will not swap back.&lt;br /&gt;The only way to make it swap back is to do a new DFU or tell MCUboot to revert from the application. You can do neither of these if the application bricks.&lt;br /&gt;In other words: you will have the same issue here no matter if you use a golden recovery image or the previous application.&lt;/p&gt;
[quote user=""]Make a minimal build of the SMP SVR BLE for the recovery image.&lt;br /&gt; &lt;br /&gt; This would be nice as I would have more space for the app.[/quote]
&lt;p&gt;It would be nice to have more space for the application.&lt;br /&gt;Unfortunately MCUboot requires that the slots that are swapped (primary and secondary) are the same size, so this does not work.&lt;/p&gt;
&lt;p&gt;To fix this you would have to &lt;strong&gt;Change MCUboot&lt;/strong&gt;(see below)&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;Add BLE to MCUboot&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Just have to start by saying: I do &lt;strong&gt;not&lt;/strong&gt; recommend this.&lt;br /&gt;But it is nice to have mentioned this option either way.&lt;/p&gt;
&lt;p&gt;If you want a golden recovery partition either way, it would be more or less the same as adding BLE to the bootloader:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firstly it would require ca the same amount of flash space.&lt;/li&gt;
&lt;li&gt;Secondly you require the golden recovery partition to be stable as well, so could as well be a part of MCUboot in that case.&lt;/li&gt;
&lt;li&gt;You will write to flash less times by not having to swap every time you need to boot.&lt;/li&gt;
&lt;li&gt;You could actually have recovery, and be able to detect FOTA on each boot, not matter if the application have crashed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now all of this sounds good, but here are some raesons to why you should not have BLE in MCUboot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can never update the BLE part of MCUboot. If any security vulnerabilities are found, you can not fix them.&lt;/li&gt;
&lt;li&gt;A bootloader should be as simple as possible, to decrease the chance of failure.&lt;/li&gt;
&lt;li&gt;You do not want to &lt;strong&gt;Change MCUboot&lt;/strong&gt;(see below)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Change MCUboot&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;MCUboot is a large project with over 1800 commits.&lt;br /&gt;The official code in MCUboot has been verified by others before added to the project.&lt;br /&gt;The MCUboot code has been tested by a lot of other people, and they are likely to have found errors, especially fatal ones.&lt;/p&gt;
&lt;p&gt;For any change to MCUboot, you loose some of these assurances.&lt;br /&gt;Small changes, such as 1-line fixes have a rather low chance of breaking stuff if tested properly.&lt;br /&gt;But if you add actual features to MCUboot, such as different size slots of BLE functionality, I would say that you will greatly increase the risk of something going wrong.&lt;br /&gt;This is the reason to why do not recommend large changes to MCUboot.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;How to make sure the default method works&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Okey, so if you are to use the default method, what can you do yo make sure it does not fail?&lt;br /&gt;Here are some suggestions by me. &lt;br /&gt;Disclaimer: There are ideas from the top of my head. It is not an exhaustive list, but to show that there are multiple things you can do to make your application more reliable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test the new application&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When doing DFU, enter test mode by default.&lt;br /&gt;Then do thorough testing of the application before confirming it.&lt;br /&gt;I must admit that I have not really worked a lot with writing testing for this, so I can not give any specific tips to this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fail to reset&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Make sure that when your application resets on errors as often as possible.&lt;br /&gt;Then make sure that your application has a known reset behavior, preferably one you can do FOTA from.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;What about unexpected deadlocks?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the customer can manually reset the device, for example by removing a battery, this should be fine I think.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Risk Management&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What about cosmic rays, what if the application still bricks?&lt;/p&gt;
&lt;p&gt;I will claim that no application can be 100% fault safe.&lt;br /&gt;Reliability is really just risk management.&lt;/p&gt;
&lt;p&gt;How much are you willing to invest to make the device reliable?&lt;br /&gt; And how reliable do you want your device to be?&lt;br /&gt;What is an acceptable chance for a device to brick?&lt;/p&gt;
&lt;p&gt;So maybe even ask yourself: If the device is cheap, is it fine if some of the devices are returned?&lt;/p&gt;
&lt;p&gt;On the other hand, if the device is expensive/critical, maybe you should fix this in hardware and add an option for serial recovery?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Remarks&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In short, I recommend the default MCUboot method of swapping to the previous image and testing.&lt;/p&gt;
&lt;p&gt;This has been a lot, but I hope to reuse the answer, cause as I said: you are not the first nor the last who ask about this.&lt;br /&gt;I also hope that it gave you some insights into this. &lt;br /&gt;Let me know if you have any questions to this!&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>