<?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>Support on nrf9160 SDK V2.2 to V2.4 OTA upgrade</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101999/support-on-nrf9160-sdk-v2-2-to-v2-4-ota-upgrade</link><description>Hi, 
 We have encountered with an issue currently experiencing on the nRF9160 LTE module supplied by Nordic. Our current deployments are built using version V2.2.0 of the SDK, but we have noted that Nordic have released an updated version of their SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Jul 2023 13:07:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101999/support-on-nrf9160-sdk-v2-2-to-v2-4-ota-upgrade" /><item><title>RE: Support on nrf9160 SDK V2.2 to V2.4 OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/439027?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2023 13:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b01f8c0-1a07-4090-b400-297fc51b7b3d</guid><dc:creator>Didrik Rokhaug</dc:creator><description>[quote user="GD_Electronics"]1) The current application based on V2.2 has default partitioning which is dynamic and now if we consider to upgrade to SDK V2.4 changing the memory partition to static , can we define the current image address as static in V2.4 i.e pointing to previous image address ? this shall resolve the issue believed to be encountered during OTA .[/quote]
&lt;p&gt;In the build folder there is a file called partitions.yml, which specifies how the flash is partitioned.&lt;/p&gt;
&lt;p&gt;This file can be copied to your (new) project directory (i.e. next to the CMakeLists.txt and prj.conf files), and renamed to &amp;quot;pm_static.yml&amp;quot;, and the Partition Manager will automatically use the same flash partitions.&lt;/p&gt;
&lt;p&gt;Note that this will configure &lt;em&gt;all&lt;/em&gt; the partitions statically, while you only need the bootloader-related partitions to be statically configured for the FOTA to&amp;nbsp; work. There are some cases (e.g. when going from SPM to TF-M) where you don&amp;#39;t want all the partitions to be statically defined, as some of them might change.&lt;/p&gt;
[quote user="GD_Electronics"]2) In regard moving from SPM -&amp;gt; TFM , will the device brick if we plan to downgrade from TFM(V2.4) to SPM(V2.2) in near future ?[/quote]
&lt;p&gt;MCUBoot considers SPM and TF-M part of the application, so changing between the two should not cause any problems for MCUBoot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Support on nrf9160 SDK V2.2 to V2.4 OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/438972?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2023 10:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c33ddca-00ce-4b50-86d8-9f4081a8fbbd</guid><dc:creator>GD_Electronics</dc:creator><description>&lt;p&gt;Thank you for your feedback. i&amp;#39;ve couple of queries as mentioned below&lt;/p&gt;
&lt;p&gt;1) The current application based on V2.2 has default partitioning which is dynamic and now if we consider to upgrade to SDK V2.4 changing the memory partition to static , can we define the current image address as static in V2.4 i.e pointing to previous image address ? this shall resolve the issue believed to be encountered during OTA .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2) In regard moving from SPM -&amp;gt; TFM , will the device brick if we plan to downgrade from TFM(V2.4) to SPM(V2.2) in near future ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Support on nrf9160 SDK V2.2 to V2.4 OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/437296?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 14:26:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93168b8c-f931-4413-a9b2-e2290f5cffe0</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]They refer to the change to the memory model implemented in 2.4.0 which they believe will not be compatible with applications built using V2.2.0 or lower.[/quote]
&lt;p&gt;Are you talking about the flash partition layout, or something else?&lt;/p&gt;
&lt;p&gt;The partition layout is by default configured dynamically on each build, which will typically mean that when you change SDK version for the application, the application will get a different flash partition layout than the bootloader on the devices have. This problem can be fixed by using a static partition configuration: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/scripts/partition_manager/partition_manager.html#static-configuration"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/scripts/partition_manager/partition_manager.html#static-configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The easiest way to do this is to copy &amp;lt;build directory&amp;gt;/partitions.yml to your project directory (next to CMakeLists.txt and prj.conf), and rename it to pm_static.yml.&lt;/p&gt;
&lt;p&gt;A small sidenote here that I&amp;#39;ll come back to later: Only the partitions used by the bootloader need to be statically defined. These are the mcuboot, mcuboot_pad, mcuboot_primary and mcuboot_secondary partitions (assuming you only have mcuboot, and not multiple bootloaders).&lt;/p&gt;
[quote user="GD_Electronics"]We also have a concern about how peripherals are used. TFM needs UART1, used to communicate with the appliance.[/quote]
&lt;p&gt;TF-M only uses UART1 for logging. If you do not need logs from TF-M, you can set &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/kconfig/index.html#CONFIG_TFM_LOG_LEVEL_SILENCE"&gt;CONFIG_TFM_LOG_LEVEL_SILENCE&lt;/a&gt; to free up the UART.&lt;/p&gt;
&lt;p&gt;Alternatively, if you want TF-M logs on bootup and when handling a fatal error, but not when the application is running, you can use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/kconfig/index.html#CONFIG_TFM_SECURE_UART_SHARE_INSTANCE"&gt;CONFIG_TFM_SECURE_UART_SHARE_INSTANCE&lt;/a&gt;.&lt;/p&gt;
[quote user="GD_Electronics"]Additionally, we think it might be risky to do an OTA from an SPM to TFM application, as we are unsure what might happen if a power failure or reset occurs at an inopportune time. Normally if this occurs the device will just revert to a working image. However, we don&amp;#39;t know how the SPM to TFM update is handled internally in the chip, other than there is a region in memory reserved for these. If this does prove to a risk, with no fallback mechanism, only option left is to go for a one-time update.[/quote]
&lt;p&gt;Seen from the bootloader, both the SPM and TF-M is just part of the application. The bootloader doesn&amp;#39;t know about either. So there shouldn&amp;#39;t really be any difference on that front. When it comes to flash partition layout, the important parts are the mcuboot_primary and secondary slots. How the application and SPM/TF-M splits these slots is not important (for the bootloader).&lt;/p&gt;
&lt;p&gt;This means that in your pm_static.yml file, you only need to specify the bootloader related partitions, plus any other partitions you want to be static (e.g. if the application has a partition it uses for persistent storage).&lt;/p&gt;
[quote user="GD_Electronics"]The primary problem we ran into with the upgrade was that authentication with the server was failing. As far as we can tell we will need to use the &amp;quot;TFM profile LARGE&amp;quot;, as the &amp;quot;minimal&amp;quot; profile does not support 512-bit hashing, and it looks like the &amp;quot;LARGE&amp;quot; profile will require flash layout changes. But this still needs further investigation.[/quote]
&lt;p&gt;Configuring TF-M is not optimal at the moment, but you can use TFM_PROFILE_TYPE_NOT_SET (which is basically a custom profile), and then look in &amp;lt;build directory&amp;gt;/zephyr/.config for PSA_WANT options that you don&amp;#39;t need, which you can then disable (in the prj.conf file) to reduce the size of TF-M.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Support on nrf9160 SDK V2.2 to V2.4 OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/437196?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 09:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:825002fc-d60f-432c-a6c2-851c6579723b</guid><dc:creator>GD_Electronics</dc:creator><description>&lt;p&gt;Adding more details below which might help in further investigation..&lt;/p&gt;
&lt;p&gt;Based on our preliminary Analysis it was found and suspected the issue could be because of dynamic partition management, but this was not our only concern when moving to versions of the nRF SDK newer than 2.2.0. Based on our initial testing a more pressing issue is the need to switch from using the SPM (secure partition manager), which we currently use, to the TFM (Trusted Firmware Module).&lt;/p&gt;
&lt;p&gt;The primary problem we ran into with the upgrade was that authentication with the server was failing. As far as we can tell we will need to use the &amp;quot;TFM profile LARGE&amp;quot;, as the &amp;quot;minimal&amp;quot; profile does not support 512-bit hashing, and it looks like the &amp;quot;LARGE&amp;quot; profile will require flash layout changes. But this still needs further investigation.&lt;/p&gt;
&lt;p&gt;We also have a concern about how peripherals are used. TFM needs UART1, used to communicate with the appliance. We did remap all peripherals to be compatible with TFM, which seemed to work OK. However, when attempting to downgrade a device OTA (going from post 2.2.0 to 2.2.0 or earlier) the device was bricked, which we think is because of this remapping. Again, this also needs further investigation.&lt;/p&gt;
&lt;p&gt;Additionally, we think it might be risky to do an OTA from an SPM to TFM application, as we are unsure what might happen if a power failure or reset occurs at an inopportune time. Normally if this occurs the device will just revert to a working image. However, we don&amp;#39;t know how the SPM to TFM update is handled internally in the chip, other than there is a region in memory reserved for these. If this does prove to a risk, with no fallback mechanism, only option left is to go for a one-time update.&lt;/p&gt;
&lt;p&gt;Kindly let us know your thoughts on this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>