<?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>FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118825/fota-over-ble-using-external-flash-nrf-connect-sdk-2-9-0---upload-to-device-stuck</link><description>Hello, I&amp;#39;m trying to get FOTA over BLE (SoC &amp;amp; external Flash) working on NCS 2.9.0. The sysbuild and MCUboot configurations and overlays seem to be fine. The application builds and runs as expected on a nRF52840 device that has 4MB SPI NOR external flash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Feb 2025 19:07:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118825/fota-over-ble-using-external-flash-nrf-connect-sdk-2-9-0---upload-to-device-stuck" /><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/523105?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 19:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cebf6b3f-c557-493d-b969-43bf1a8e249e</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;Thanks. I doubt understand it either but will look re-check again.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll close this ticket. Thank you again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Ravi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/523001?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 09:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ca3c242-feb4-4580-a812-1ddb1fc74fda</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ravi,&lt;/p&gt;
&lt;p&gt;Thanks for the update. I&amp;#39;m afraid I don&amp;#39;t have any obvious explanations for why these configurations caused it to fail. CONFIG_FPROTECT&amp;nbsp; and&amp;nbsp;CONFIG_BOOT_ERASE_PROGRESSIVELY should both be enabled by default in the bootloader and I don&amp;#39;t see why enabling CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS should have any side effect.:&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/pastedimage1739525737854v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see a reason to enable FPROTECT in the application since the bootloader is responsible for configuring the flash memory protection.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/522764?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 06:30:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5074dbe-bf7a-4698-97ce-b17247831bf0</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;Thank you for sharing the peripheral_lbs_fota_spi.zip.&lt;br /&gt;&lt;br /&gt;It turns out that I&amp;nbsp;had a couple of other Kconfig settings from one of my earlier projects that were the cause of the issue. So, removing them resolved the issue.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
CONFIG_FPROTECT=y&lt;/pre&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Ravi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/522743?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 21:52:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77690bc5-9ca0-453a-bbc2-d9494df101d6</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;Thanks.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s odd, as I already had the external driver check Kconfig.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;# Enable MCUboot
SB_CONFIG_BOOTLOADER_MCUBOOT=y

# Configure bootloader to use more than one slot
SB_CONFIG_MCUBOOT_MODE_SINGLE_APP=n

# Use external 4MB SPI NOR Flash
SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I&amp;#39;ll check again and update you shortly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;/div&gt;
&lt;div&gt;Ravi&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/522690?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 15:34:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b4c2ff1-c936-4318-8dc5-3ed63a9da44a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thank you. CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU no longer selects the QSPI NOR driver as it did in earlier SDK versions, so it should not prevent you from selecting the SPI NOR driver.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is the same sample for the nRF52840 DK board except this version uses the SPIM3 instead of the QSPI for the exernal flash:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_fota_5F00_spi.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_fota_5F00_spi.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The key and maybe not obvious difference is that &amp;#39;SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK&amp;#39; needs to be enabled when you want to use the SPI NOR driver instead.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/522547?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 01:39:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c284b55c-b8b3-4035-8566-b412a2518312</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;Thank you for your quick response and the attached project. As always, it&amp;#39;s much appreciated.&lt;br /&gt;Regarding the upload issue: The message times out&amp;nbsp;and then displays&amp;nbsp;a &amp;quot;flash write failed: 12&amp;quot; error in the RTT/UARTconsole output and the nRF Connect Device Manager.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I&amp;#39;ve also identified the cause of the issue. As I suspected, it was a misconfiguration.&lt;/p&gt;
&lt;p&gt;Custom device under test:: nRF52840 board with 4MB SPI_NOR flash.(Sorry, I forgot to mention this earlier)&lt;br /&gt;NRF Connect SDK : v2.9.0&lt;br /&gt;Boot signature key file: ECDSA_P256 custom keys&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;br /&gt;With the custom nRF52840 board using the SoC Flash, FOTA over BLE works fine&amp;nbsp;when using Kconfig&amp;nbsp;&lt;span&gt;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU. &lt;br /&gt;&lt;br /&gt;However, this doesn&amp;#39;t work if the external flash on the device is SPI_NOR flash.&lt;br /&gt;&lt;br /&gt;A few NCS releases back,&amp;nbsp;someone reported that&amp;nbsp;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU used QSPI_NOR. I&amp;nbsp;&lt;/span&gt;thought the issue (bug?) was resolved.&lt;/p&gt;
&lt;div&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;Advertising successfully started
Connected
Security changed: 88:AE:07:41:7D:47 (public) level 4
[00:00:51.381,225] &amp;lt;wrn&amp;gt; bt_l2cap: Ignoring data for unknown channel ID 0x003a
[00:00:53.636,383] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:53.636,779] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:53.636,840] &amp;lt;err&amp;gt; mcumgr_img_grp: Irrecoverable error: flash write failed: 12&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;Anyway, if I explicitly list and use the Kconfig fragments defined in&amp;nbsp;&lt;span&gt;&lt;span&gt;&lt;span&gt;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU, then FOTA over BLE with the external flash works fine.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve now completed several tests for FOTA over BLE&amp;nbsp;using both SoC and SPI NOR Flash with&amp;nbsp;NCS v2.9.0. All works fine with nRF Connect Device Manager.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# here, using a list of Kconfig fragments in place of CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU
CONFIG_MCUMGR=y

# Configure dependencies for CONFIG_MCUMGR 
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y

# Configure MCUMGR transport to UART
CONFIG_MCUMGR_TRANSPORT_BT=y

# Enable the Bluetooth mcumgr transport
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

# Configure dependencies for CONFIG_MCUMGR_GRP_IMG 
CONFIG_IMG_MANAGER=y

# Configure dependencies for CONFIG_IMG_MANAGER 
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH=y

# Enable MCUMGR management for both OS and Images
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO=y

CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y

# Configure dependencies for CONFIG_MCUMGR_TRANSPORT_BT
CONFIG_BASE64=y&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I did check the &amp;nbsp;/opt/nordic/ncs/v2.9.0/nrf/samples/common/mcumgr_bt_ota_dfu/Kconfig to see if&amp;nbsp;&lt;/span&gt;NORDIC_QSPI_NOR is still a requirement for it but didn&amp;#39;t see it in the Kconfig, unless the dependency is specified elsewhere.&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;It would be nice to have&amp;nbsp;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU that works for both&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;NORDIC_QSPI_NOR and &amp;nbsp;&lt;/span&gt;SPI_NOR flash. Any chance you could follow up on this with dev? Thanks.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;I would like to take this opportunity to thank&amp;nbsp;Nordic teams for the excellent nRF Connect SDK training courses.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;Many thanks to you and your colleagues in Support for the on-going effort to bring the courses up&amp;nbsp;to&amp;nbsp;NCS v2.9.0.&amp;nbsp;&amp;nbsp;We&amp;#39;re almost there! It&amp;#39;s much appreciated!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best Regards,&lt;br /&gt;Ravi&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FOTA over BLE using external flash (nRF Connect SDK 2.9.0) - upload to device stuck</title><link>https://devzone.nordicsemi.com/thread/522530?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 22:05:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad7c627e-3add-453f-8d99-9ff275940e49</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ravi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t think of any reason why it would get stuck in the upload state. Does it stay like this until you exit the app, or does it time out eventually?&lt;/p&gt;
&lt;p&gt;I quickly tested FOTA with the peripheral_lbs sample in SDK v2.9.0 and have included the modified project I used for this test below. Maybe you can compare your configurations with this one?&lt;/p&gt;
&lt;p&gt;Files I added in this project:&lt;/p&gt;
&lt;p&gt;boards\nrf52840dk_nrf52840.conf // enable DFU related configuarations in app&lt;br /&gt;boards\nrf52840dk_nrf52840.overlay // select qspi flash dev for external memory region&lt;br /&gt;sysbuild\mcuboot.overlay //&amp;nbsp;&lt;span&gt;select qspi flash dev for external memory region&lt;/span&gt;&lt;br /&gt;sysbuild\mcuboot.conf&amp;nbsp; // enable QSPI NOR driver (requires multithreading)&lt;br /&gt;sysbuild.conf // enable bootloader and placement of secondary slot in external flash&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_fota.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_fota.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>