<?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>nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110047/nrf52840-with-mcuboot-over-smp-using-spi-flash---fails-to-boot</link><description>Hello, I&amp;#39;m trying to use MCUBOOT with external flash on a nRF52840 board that has 4MB SPI flash. I&amp;#39;m using nRF Connect SDK v2.6.0. I&amp;#39;ve verified that the SPI flash works fine using the &amp;quot;spi_flash&amp;quot; sample. 
 With CONFIG_BOOTLOADER_MCUBOOT=n, SMP with SPI</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Apr 2024 11:50:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110047/nrf52840-with-mcuboot-over-smp-using-spi-flash---fails-to-boot" /><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479687?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 11:50:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f087eda-17ee-44ed-b604-0b3f3f18033e</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Thank you for your assistance in resolving my issues. Greatly appreciated!&lt;br /&gt;&lt;br /&gt;The ticket can be marked as closed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Ravi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479639?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 08:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3094b0-220d-4420-a130-0155817d6670</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi again Ravi,&lt;/p&gt;
&lt;p&gt;Glad to hear that the sample was good enough to show you how it could be set up for your device!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And yes, that would be the missing configuration you needed!&lt;/p&gt;
&lt;p&gt;I will mark this case as verified solved/but feel free to open new cases for new topics or reopen this case if you have additional questions related to this cases topic&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479597?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 06:52:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2599bec4-36ef-4780-84d8-bff9a1d824a2</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;HI Andreas,&lt;br /&gt;&lt;br /&gt;It&amp;#39;s ok. I forgot to add the following in the mcuboot configuration.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;CONFIG_MCUBOOT_INDICATION_LED&lt;/span&gt;&lt;span&gt;=y&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you for your&amp;nbsp;&lt;/span&gt;assistance. It&amp;#39;s much appreciated!&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&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: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479588?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 06:00:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:941de7a3-086e-465e-bcbc-30cb8302c2ab</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hello Andreas,&lt;br /&gt;&lt;br /&gt;Success! Thank you for providing the correct configuration for project and mcuboot.&lt;br /&gt;&lt;br /&gt;I changed the project structure a little as I want to use it to target another board as well.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;├── CMakeLists.txt
├── README.rst
├── boards
│&amp;#160;&amp;#160; ├── particle_xenon.conf
│&amp;#160;&amp;#160; └── particle_xenon.overlay
├── build_xenon

├── child_image
│&amp;#160;&amp;#160; └── mcuboot
│&amp;#160;&amp;#160;     └── boards
│&amp;#160;&amp;#160;         ├── particle_xenon.conf
│&amp;#160;&amp;#160;         └── particle_xenon.overlay
├── prj.conf
├── sample.yaml
└── src
    ├── bluetooth_smp.c
    ├── bluetooth_smp.h
    └── main.c
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the partition manager report showing external_flash (4MB) and mcuboot_secondary partition.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;quark11:smp_ble_feat_spi quark11$ west build -t partition_manager_report -b particle_xenon -d build_xenon
-- west build: running target partition_manager_report
[1/1] cd /Users/quark11/Documents/2024_dfu_projects/smp_ble...24_dfu_projects/smp_ble_feat_spi/build_xenon/partitions.yml
  external_flash (0x400000 - 4096kB): 
+---------------------------------------------+
| 0x0: mcuboot_secondary (0xf0000 - 960kB)    |
| 0xf0000: external_flash (0x310000 - 3136kB) |
+---------------------------------------------+

  flash_primary (0x100000 - 1024kB): 
+--------------------------------------------------+
| 0x0: mcuboot (0x10000 - 64kB)                    |
+---0x10000: mcuboot_primary (0xf0000 - 960kB)-----+
| 0x10000: mcuboot_pad (0x200 - 512B)              |
+---0x10200: mcuboot_primary_app (0xefe00 - 959kB)-+
| 0x10200: app (0xefe00 - 959kB)                   |
+--------------------------------------------------+

  sram_primary (0x40000 - 256kB): 
+--------------------------------------------+
| 0x20000000: sram_primary (0x40000 - 256kB) |
+--------------------------------------------+

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve used nRF Connect iOS to verify DFU over BLE with the secondary application slot (mcuboot_secondary) located on the external flash.&lt;/p&gt;
&lt;p&gt;I did notice that in the nRF Connect iOS, after selecting &amp;quot;DFU&amp;quot; and uploading the &amp;quot;app_update_bin&amp;quot; file, I got &amp;quot;Error: Not supported&amp;quot; message.&lt;br /&gt;&lt;br /&gt;After power cycling the Particle Xenon board, the&amp;nbsp;new firmware ran successfully&amp;nbsp;on the device. So, DFU over BLE seems to work fine.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll review and clean up prj.conf later.&lt;br /&gt;&lt;br /&gt;Here is the console output showing initial firmware and then upload after a minor code change.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v3.5.99-ncs1 ***
Hello World! particle_xenon
Sample for BLE DFU feat SPI and external flash!
[00:00:00.003,967] &amp;lt;inf&amp;gt; bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            36 f0 e5 0e 87 68 48 fb  02 fd 9f 82 cc 32 e5 7b |6....hH. .....2.{
                                            91 b1 5c ed                                      |..\.             
[00:00:00.005,920] &amp;lt;inf&amp;gt; bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.005,920] &amp;lt;inf&amp;gt; bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.005,950] &amp;lt;inf&amp;gt; bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
[00:00:00.006,713] &amp;lt;inf&amp;gt; bt_hci_core: Identity: DF:FA:B3:62:79:11 (random)
[00:00:00.006,744] &amp;lt;inf&amp;gt; bt_hci_core: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059
[00:00:00.006,774] &amp;lt;inf&amp;gt; bt_hci_core: LMP: version 5.4 (0x0d) subver 0x118f
[00:00:00.006,774] &amp;lt;inf&amp;gt; smp_bt_sample: Bluetooth initialized
[00:00:00.007,598] &amp;lt;inf&amp;gt; smp_bt_sample: Advertising successfully started
This is version 2.
[00:00:23.039,611] &amp;lt;inf&amp;gt; smp_bt_sample: Connected
[00:00:23.238,067] &amp;lt;wrn&amp;gt; bt_l2cap: Ignoring data for unknown channel ID 0x003a
[00:00:34.385,314] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:34.492,156] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:34.492,431] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:35.695,312] &amp;lt;inf&amp;gt; mcumgr_img_grp: Erased 0x40000 bytes of image slot
[00:00:36.020,721] &amp;lt;inf&amp;gt; mcumgr_img_grp: Erased 0x10000 bytes of image slot trailer
[00:01:07.249,877] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:01:07.251,037] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: perm
uart:~$ *** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.251,617] &amp;lt;inf&amp;gt; mcuboot: Starting bootloader
[00:00:00.252,471] &amp;lt;inf&amp;gt; mcuboot: Primary image: magic=good, swap_type=0x3, copy_done=0x1, image_ok=0x1
[00:00:00.252,746] &amp;lt;inf&amp;gt; mcuboot: Secondary image: magic=good, swap_type=0x3, copy_done=0x3, image_ok=0x1
[00:00:00.252,746] &amp;lt;inf&amp;gt; mcuboot: Boot source: none
[00:00:00.253,204] &amp;lt;inf&amp;gt; mcuboot: Image index: 0, Swap type: perm
[00:00:00.913,269] &amp;lt;inf&amp;gt; mcuboot: Starting swap using move algorithm.


*** Booting nRF Connect SDK v3.5.99-ncs1 ***
Hello World! particle_xenon
[00:00:00.003,784] &amp;lt;inf&amp;gt; app: DFU test #2

Sample for BLE DFU feat SPI and external flash!
[00:00:00.004,455] &amp;lt;inf&amp;gt; bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            36 f0 e5 0e 87 68 48 fb  02 fd 9f 82 cc 32 e5 7b |6....hH. .....2.{
                                            91 b1 5c ed                                      |..\.             
[00:00:00.006,378] &amp;lt;inf&amp;gt; bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.006,408] &amp;lt;inf&amp;gt; bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.006,439] &amp;lt;inf&amp;gt; bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
[00:00:00.007,171] &amp;lt;inf&amp;gt; bt_hci_core: Identity: DF:FA:B3:62:79:11 (random)
[00:00:00.007,202] &amp;lt;inf&amp;gt; bt_hci_core: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059
[00:00:00.007,232] &amp;lt;inf&amp;gt; bt_hci_core: LMP: version 5.4 (0x0d) subver 0x118f
[00:00:00.007,263] &amp;lt;inf&amp;gt; smp_bt_sample: Bluetooth initialized
[00:00:00.008,087] &amp;lt;inf&amp;gt; smp_bt_sample: Advertising successfully started
This is version 2.
uart:~$ &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In my mcuboot overlay (particle_xenon.overlay), I have&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;mx25l32;
	};

	aliases {
		mcuboot-button0 = &amp;amp;mode_button;
		mcuboot-led0 = &amp;amp;status_green;
	};
};&lt;/pre&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
I can get into MCUBOOT mode using &amp;quot;mode button&amp;quot; &amp;amp; &amp;quot;reset button&amp;quot; but the defined led doesn&amp;#39;t turn on.&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;Any idea why that may be the case? Thanks.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479334?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 06:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ef40a60-10bb-4fd6-ab36-f6f6eb4e74de</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Glad to hear that,&lt;/p&gt;
&lt;p&gt;You may also investigate how the SPI flash is set up in the app&lt;em&gt;.&lt;/em&gt;overlay as well as mcuboot.overlay and&amp;nbsp;transfer that to the&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/samples/drivers/spi_flash/README.html"&gt;SPI flash JESD sample&lt;/a&gt;&amp;nbsp; from Zephyr. It&amp;nbsp;&lt;em&gt;should&lt;/em&gt; work given that you enter the right parameters.&lt;/p&gt;
&lt;p&gt;As you see, the pins I&amp;#39;ve selected are based spi2&amp;#39;s default pin setup but if you need different pins, you can also modify &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/configuring_app/hardware/pin_control.html"&gt;pin control&lt;/a&gt;&amp;nbsp;for &amp;amp;spi2_default and _sleep by doing something like this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; &amp;amp;pinctrl {
         spi2_default: spi2_default {
                 group1 {
                         psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 29)&amp;gt;,
                                 &amp;lt;NRF_PSEL(SPIM_MISO, 0, 31)&amp;gt;,
                                 &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 30)&amp;gt;;
                 };
         };
 
         spi2_sleep: spi2_sleep {
                 group1 {
                         psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 29)&amp;gt;,
                                 &amp;lt;NRF_PSEL(SPIM_MISO, 0, 31)&amp;gt;,
                                 &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 30)&amp;gt;;
                         low-power-enable;
                 };
         };
 };
 &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479289?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 15:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c964bf9a-595b-4ebf-9dd4-b2774812a474</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;HI Andreas,&lt;br /&gt;&lt;br /&gt;It&amp;#39;s not an issue at all. I thought you must be either tied up or perhaps on vacation.&lt;br /&gt;&lt;br /&gt;Thank you so much for taking the time to prepare an example. It&amp;#39;s much appreciated.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll try your sample with a Particle Xenon (nRF52840) board that has external SPI flash. I&amp;#39;ll have to change the &amp;quot;spi2&amp;quot; overlay to point to the board&amp;#39;s flash.&amp;nbsp;&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: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479160?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 09:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c42b939-1bc7-4584-a69e-226416e28d2e</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi Ravi&lt;/p&gt;
&lt;p&gt;Apologies for the long response time, I&amp;#39;ve unfortunately been occupied with unforeseen things.&lt;/p&gt;
&lt;p&gt;I spent this morning creating a sample showcasing BLE DFU where the secondary slot resides on external flash with SPI instead of QSPI.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The sample is not optimized, and prj.conf has some configs that might not be necessary but I&amp;#39;ve tested and verified that the update goes through using the nRF Connect app following the brief steps mentioned in the samples READme&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/smp_5F00_ble_5F00_feat_5F00_spi.zip"&gt;devzone.nordicsemi.com/.../smp_5F00_ble_5F00_feat_5F00_spi.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This should hopefully be enough to showcase how to set this up&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/479076?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 01:04:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf54b9bd-c758-4e38-84fd-792cc0f28e99</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/ahaug"&gt;AHaug&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi Andrea,&lt;br /&gt;&lt;br /&gt;Do you have any update on a solution? Thanks.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&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: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/478605?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 19:00:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a54323ea-9e71-4289-8742-b77fbe0552bf</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;br /&gt;&lt;br /&gt;Do you have any updates?&lt;br /&gt;&lt;br /&gt;It may also be worth reaching out to your colleague&lt;span&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;, as he provided the &amp;quot;mcuboot_external_flash&amp;quot; example &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Ravi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/478112?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 14:46:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ee1185d-816a-494b-b51b-b7d153cadedc</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hello Andreas,&lt;br /&gt;I tried your suggestion before programming the device but it made no difference.&lt;br /&gt;&lt;br /&gt;Also, please note that the device has SPI flash and not QSPI.&lt;/p&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: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/477963?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 08:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce754477-2604-419d-8896-674ec08b27e5</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for sharing this. I will have a closer look today and get back to you with more info when I have more.&lt;/p&gt;
&lt;p&gt;In the meanwhile, could you try to&amp;nbsp;&lt;em&gt;&lt;span&gt;nrfjprog --qspieraseall -f nrf52&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;before programming the device and see if the behavior is still the same?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/477870?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 15:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f1e188b-2e3c-4d64-8bd7-4715f0651355</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;br /&gt;&lt;br /&gt;I checked were I got the &amp;quot;mcuboot_external_flash&amp;quot; example from.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s from your colleague,&amp;nbsp;Vidar Berg (Case ID: 322102). He provided &lt;span&gt;8475.hello_world_dfu.zip&lt;span class="Apple-converted-space"&gt;&amp;nbsp;as an example of Serial recovery mode and FOTA over BLE about few&amp;nbsp;months back.&lt;br /&gt;&lt;br /&gt;The example was for QSPI flash, I&amp;#39;ve made a minor change to use the external 4MB SPI flash on the particle_xenon board.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108287/ncs-2-5-1-sample-application-with-mcuboot-updates-from-external-flash"&gt;NCS 2.5.1 sample application with MCUBoot updates from external flash&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT&lt;/span&gt;&lt;span&gt;=y and nRF52840 device connected to a Mac over serial, I do see the MCUBOOT port enumerated. However, there&amp;#39;s no device &amp;#39;zephyr&amp;#39; for FOTA BLE.&lt;br /&gt;&lt;br /&gt;Normally, to enter serial recovery mode, I&amp;#39;d press&amp;nbsp;the RESET&amp;nbsp;button while keeping MODE button on the particle_xenon&amp;nbsp;pressed. As serial recovery mode comes up immediately on device connection to Mac, it confirms that the fw application isn&amp;#39;t running, it&amp;#39;s still in MCUBOOT.&lt;br /&gt;&lt;br /&gt;I can connect to it using mcumgr to view slot-0 image.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;quark11:~ quark11$ mcumgr --conntype=serial --connstring=&amp;#39;dev=/dev/cu.usbmodem14201,baud=115200&amp;#39; image list
Images:
 image=0 slot=0
    version: 1.2.3.4
    bootable: false
    flags: 
    hash: c8f175ea09650363419dc2449acb06114a72aec0aacbc8d476553bc289889428
Split status: N/A (0)&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;I&amp;#39;ve also tried to upload a known working fw application image using mcumgr. The image gets uploaded but doesn&amp;#39;t run.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/477866?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 15:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9acd494d-e9bb-4b3b-9125-89e2d71ecf47</guid><dc:creator>zpm1066</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;br /&gt;&lt;br /&gt;Thank you for looking at this issue. It&amp;#39;s much appreciated.&lt;br /&gt;&lt;br /&gt;The application I&amp;#39;m building for test purposes is &amp;quot;mcuboot_external_flash&amp;quot; for particle_xenon board. I believe its from Nordic or one of the simple SMP sample to demo use of external flash.&lt;br /&gt;&lt;br /&gt;When&amp;nbsp;RTT is enabled, I don&amp;#39;t get any output at the J-Link RTT Viewer&amp;nbsp;and no UART console gets enumerated. &lt;br /&gt;&lt;br /&gt;With&amp;nbsp;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT&lt;/span&gt;&lt;span&gt;=n, I get the expected output at both RTT and UART console, and I&amp;#39;m able to connect to &amp;quot;zephyr&amp;quot; SMP service via nRF Connect app.&lt;br /&gt;&lt;br /&gt;The problem appears to be somewhere within mcuboot code, perhaps due to possible misconfiguration or something else.&lt;br /&gt;&lt;br /&gt;When debugging using J-Link, debugger hits a breakpoint&amp;nbsp;in opt &amp;gt; nordic &amp;gt; v2.6.0 &amp;gt; bootloader &amp;gt; mcuboot &amp;gt; boot &amp;gt; boot_serial &amp;gt; serial &amp;gt; boot_serial.c at line&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;quot; if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;rc&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;!&lt;/span&gt;&lt;span&gt;full_line&lt;/span&gt;&lt;span&gt;) { &amp;quot; in boot_serial_read_console.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;Stepping from there leads to into the depths of&amp;nbsp;&amp;nbsp;&amp;quot; ... &amp;gt; core &amp;gt; cortex_m &amp;gt; reset.S&amp;quot;. The firmware never gets into main().&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Task which waits reading console, expecting to get image over
 * serial port.
 */
static void
boot_serial_read_console(const struct boot_uart_funcs *f,int timeout_in_ms)
{
    int rc;
    int off;
    int dec_off = 0;
    int full_line;
    int max_input;
    int elapsed_in_ms = 0;

#ifndef MCUBOOT_SERIAL_WAIT_FOR_DFU
    bool allow_idle = true;
#endif

    boot_uf = f;
    max_input = sizeof(in_buf);

    off = 0;
    while (timeout_in_ms &amp;gt; 0 || bs_entry) {
        /*
         * Don&amp;#39;t enter CPU idle state here if timeout based serial recovery is
         * used as otherwise the boot process hangs forever, waiting for input
         * from serial console (if single-thread mode is used).
         */
#ifndef MCUBOOT_SERIAL_WAIT_FOR_DFU
        if (allow_idle == true) {
            MCUBOOT_CPU_IDLE();
            allow_idle = false;
        }
#endif
        MCUBOOT_WATCHDOG_FEED();
#ifdef MCUBOOT_SERIAL_WAIT_FOR_DFU
        uint32_t start = k_uptime_get_32();
#endif
        rc = f-&amp;gt;read(in_buf + off, sizeof(in_buf) - off, &amp;amp;full_line);
        if (rc &amp;lt;= 0 &amp;amp;&amp;amp; !full_line) {
#ifndef MCUBOOT_SERIAL_WAIT_FOR_DFU
            allow_idle = true;
#endif
            goto check_timeout;
        }
        off += rc;
        if (!full_line) {
            if (off == max_input) {
                /*
                 * Full line, no newline yet. Reset the input buffer.
                 */
                off = 0;
            }
            goto check_timeout;
        }
        if (in_buf[0] == SHELL_NLIP_PKT_START1 &amp;amp;&amp;amp;
          in_buf[1] == SHELL_NLIP_PKT_START2) {
            dec_off = 0;
            rc = boot_serial_in_dec(&amp;amp;in_buf[2], off - 2, dec_buf, &amp;amp;dec_off, max_input);
        } else if (in_buf[0] == SHELL_NLIP_DATA_START1 &amp;amp;&amp;amp;
          in_buf[1] == SHELL_NLIP_DATA_START2) {
            rc = boot_serial_in_dec(&amp;amp;in_buf[2], off - 2, dec_buf, &amp;amp;dec_off, max_input);
        }

        /* serve errors: out of decode memory, or bad encoding */
        if (rc == 1) {
            boot_serial_input(&amp;amp;dec_buf[2], dec_off - 2);
        }
        off = 0;
check_timeout:
        /* Subtract elapsed time */
#ifdef MCUBOOT_SERIAL_WAIT_FOR_DFU
        elapsed_in_ms = (k_uptime_get_32() - start);
#endif
        timeout_in_ms -= elapsed_in_ms;
    }
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is the partitions.yml. As you can see, mcuboot_secondary is using the external flash. Its size is 0xee000, same as mcuboot_primary.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0x12200
  end_address: 0x100000
  region: flash_primary
  size: 0xede00
external_flash:
  address: 0xee000
  end_address: 0x400000
  region: external_flash
  size: 0x312000
mcuboot:
  address: 0x0
  end_address: 0x12000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0x12000
mcuboot_pad:
  address: 0x12000
  end_address: 0x12200
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0x12000
  end_address: 0x100000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  region: flash_primary
  size: 0xee000
  span: *id001
mcuboot_primary_app:
  address: 0x12200
  end_address: 0x100000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0xede00
  span: *id002
mcuboot_secondary:
  address: 0x0
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0xee000
  placement:
    align:
      start: 0x4
  region: external_flash
  share_size:
  - mcuboot_primary
  size: 0xee000
sram_primary:
  address: 0x20000000
  end_address: 0x20040000
  region: sram_primary
  size: 0x40000
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Does the partition map look ok?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Anything else in the app and mcboot configuration or overlay that may possibly be incorrect?&lt;br /&gt;&lt;br /&gt;Let me know how I can assist further. I can upload a zipped copy the project if needed. &amp;nbsp;Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Ravi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with MCUBOOT over SMP using SPI Flash - Fails to boot</title><link>https://devzone.nordicsemi.com/thread/477791?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 11:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5980f62-d45d-412d-8ef8-e434b8c84c3f</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi Ravi,&lt;/p&gt;
&lt;p&gt;Could you post any device logs and or/track where in the code your application reaches before it does not boot? I&amp;#39;m assuming that your fw hangs in the bootloader if it never gets to the application.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>