<?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>ERROR: FOTA download reverted to the previous version nRF9160.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71459/error-fota-download-reverted-to-the-previous-version-nrf9160</link><description>Dear Nordic engineer. 
 I am using nrf9160. 
 I follow the instructions to download Fota using AWS upload file update.bin. 
 After the device has downloaded the file and receives the FOTA_DOWNLOAD_EVT_FINISHED event, the device reboots and runs to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Feb 2021 03:10:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71459/error-fota-download-reverted-to-the-previous-version-nrf9160" /><item><title>RE: ERROR: FOTA download reverted to the previous version nRF9160.</title><link>https://devzone.nordicsemi.com/thread/294971?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 03:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a83d147-f4f1-43a9-8c83-b3ee28f02ea0</guid><dc:creator>haohv6</dc:creator><description>&lt;p&gt;Thank you, It works very well.&lt;/p&gt;
&lt;div style="left:146px;position:absolute;top:22.3333px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ERROR: FOTA download reverted to the previous version nRF9160.</title><link>https://devzone.nordicsemi.com/thread/294755?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 07:17:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f6cfa05-77f0-409e-9127-557edbefa23d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="haohv6"]I added the function &amp;quot;&lt;span&gt;boot_write_img_confirmed&lt;/span&gt;&lt;span&gt;()&amp;quot; after get event&amp;nbsp;&lt;/span&gt;&amp;quot;FOTA_DOWNLOAD_EVT_FINISHED&amp;quot;[/quote]
&lt;p&gt;You should call this function in your new firmware to verify the newly downloaded image.&lt;/p&gt;
&lt;p&gt;Call it in the top of main, like done in aws_fota.&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: ERROR: FOTA download reverted to the previous version nRF9160.</title><link>https://devzone.nordicsemi.com/thread/294740?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 03:16:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3772c7e7-ce85-47a1-9efa-2e5adb2ae7ae</guid><dc:creator>haohv6</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Sorry for reply late,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added the function &amp;quot;&lt;span&gt;boot_write_img_confirmed&lt;/span&gt;&lt;span&gt;()&amp;quot; after get event&amp;nbsp;&lt;/span&gt;&amp;quot;FOTA_DOWNLOAD_EVT_FINISHED&amp;quot;&lt;/p&gt;
&lt;p&gt;I have also added PM_STATIC_YML_FILE in CMakeList.txt&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
#

cmake_minimum_required(VERSION 3.8.2)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
# include($ENV{ZEPHYR_BASE}/../nrf/cmake/boilerplate.cmake)
# include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(vtracker)

set(PM_STATIC_YML_FILE
  ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml
  )

# NORDIC SDK APP START
target_sources(app PRIVATE src/main.c)
# NORDIC SDK APP END

# Include application events and configuration headers&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I use the board nrf9160dk_nrf9160ns&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After I download it, the device will run to the new version ok. At the 3rd minute, I turn off the device and turn it on again, it doesn&amp;#39;t work anymore, the screen shows the above revert message, please help me.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://prnt.sc/zsw0bb"&gt;https://prnt.sc/zsw0bb&lt;/a&gt;&lt;a href="https://prnt.sc/zswtbz"&gt;https://prnt.sc/zswtbz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is my pm_static file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0xc000
  placement:
    before:
    - mcuboot_pad
  region: flash_primary
  size: 0x4000
app:
  address: 0x1c200
  region: flash_primary
  size: 0x68e00
bsdlib_sram:
  address: 0x20010000
  placement:
    after:
    - spm_sram
    - start
  region: sram_primary
  size: 0x10000
mcuboot:
  address: 0x0
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0x10000
  placement:
    align:
      start: 0x8000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0x10000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - spm
  - app
  region: flash_primary
  sharers: 0x1
  size: 0x75000
  span: *id001
mcuboot_primary_app:
  address: 0x10200
  orig_span: &amp;amp;id002
  - app
  - spm
  region: flash_primary
  size: 0x74e00
  span: *id002
mcuboot_secondary:
  address: 0x85000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0x75000
nvs_storage:
  address: 0xfa000
  placement:
    before:
    - end
  region: flash_primary
  size: 0x6000
otp:
  address: 0xff8108
  region: otp
  size: 0x2f4
spm:
  address: 0x10200
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0xc000
spm_sram:
  address: 0x20000000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x10000
sram_primary:
  address: 0x20020000
  region: sram_primary
  size: 0x20000
sram_secure:
  address: 0x20000000
  orig_span: &amp;amp;id003
  - spm_sram
  region: sram_primary
  size: 0x10000
  span: *id003&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ERROR: FOTA download reverted to the previous version nRF9160.</title><link>https://devzone.nordicsemi.com/thread/293539?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 11:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b5c4bee-2e48-48f1-b16d-2c0397fe2a9c</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;Are you confirming the image in your new firmware?&lt;/p&gt;
&lt;p&gt;That can be done by calling this function:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/aws_fota/src/main.c#L588-L591"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/aws_fota/src/main.c#L588-L591&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If that does not work, can you ensure that the overall flash layout is equal on both your original image and new image?&lt;/p&gt;
&lt;p&gt;This can be done by setting static partitions:&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.99-dev1/nrf/scripts/partition_manager/partition_manager.html#configuring-static-partitions"&gt;http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.99-dev1/nrf/scripts/partition_manager/partition_manager.html#configuring-static-partitions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It essentially means that you take the original_project/build-folder/partitions.yml and copy this to the root of your new-application/ folder, and then reconfigure/recompile your new-application again.&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>