<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88129/nrf52832-dfu-over-ble-external-flash</link><description>We are trying to make DFU over BLE with external flash to overcome the large application size. This is what we are looking for: - Use BLE to transfer the OTA image - Since our application size id &amp;gt;250KB, planning to use an external flash to store the</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Sat, 04 Jun 2022 00:13:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88129/nrf52832-dfu-over-ble-external-flash" /><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/370947?ContentTypeID=1</link><pubDate>Sat, 04 Jun 2022 00:13:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:361df553-7b93-4cc1-966f-a319086a8cae</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edwin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I finally got this working on our custom board. The issue was with our custom board on how the Flash chip was powered. Because the Flash chip was controlled (ON/OFF) by the Nordic GPIO. Unless Nordic boots up and make that GPIO high flash was misbehaving. (This explains why Flash erase was not working during boot time but worked from the Application)&lt;/p&gt;
&lt;p&gt;We connected Flash with VCC directly (turning it ON always), and it solved the issue.&lt;/p&gt;
&lt;p&gt;I am attaching the code here for anyone&amp;#39;s reference:&amp;nbsp;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_dfu_2D00_externalflash_2D00_w25q80dv_2D00_dfu_2D00_working_2D00_nrf52832.zip"&gt;test-devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_dfu_2D00_externalflash_2D00_w25q80dv_2D00_dfu_2D00_working_2D00_nrf52832.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Code is compiled and tested on nRF52832, ncsv1.8.0 with the secondary partition on Winbond Flash (W25Q80DV)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I just have one follow-up question: What would be the status of nRF GPIO during boot time? high/low/floating?&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: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/370529?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 20:57:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73bbf3d8-cdfc-4e8a-8347-9b0b53eb621d</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edwin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you get a chance to look at this?&lt;/p&gt;
&lt;p&gt;Also, to add, whenever image validation fails, magic is still showing good in the logs:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On further digging it seems, it&amp;#39;s failing from:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.99-ncs1-rc1/boot/bootutil/src/tlv.c#L65"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/v1.6.99-ncs1-rc1/boot/bootutil/src/tlv.c#L65&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Second issue:&lt;/p&gt;
&lt;p&gt;And, in the next stage when it tries to erase the flash (to prevent booting from the secondary partition), it doesn&amp;#39;t fail but it doesn&amp;#39;t erase the flash either. This in turn always tries to boot from a secondary image on every boot.&lt;/p&gt;
&lt;p&gt;Flash erase is working fine from the application. I can erase the flash from the application and in the next boot, it doesn&amp;#39;t try to boot from the secondary partition.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;TIA!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/370298?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 20:00:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c8f89a0-52da-4e8c-a2e9-7dac5b639973</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the ack and I hope you are feeling well.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Meanwhile, I&amp;#39;ve made some progress and modified the example. Now, I am able to boot and download the image but when it tries to swap from the Secondary image, it fails with &amp;quot;E: Image in the secondary slot is not valid!&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Logs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.7.0-ncs1  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot*** Booting Zephyr OS build v2.7.0-ncs1  ***
Starting Bluetooth Peripheral LBS example
GPIO Periphal GPIO_0 initialised
build time: May 31 2022 12:30:46
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fd0
I: data wra: 0, 1c
I: SoftDevice Controller build revision: 
I: df c0 4e d6 1f 7c 66 09 |..N..|f.
I: 0a f5 2b a0 98 f2 43 64 |..+...Cd
I: 62 c5 a6 2a             |b..*    
I: No ID address. App must call settings_load()
Bluetooth initialized
Advertising successfully started
Connected
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: none
I: Swap type: test
I: Swap type: test
*** Booting Zephyr OS build v2.7.0-ncs1  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
E: Image in the secondary slot is not valid!
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot*** Booting Zephyr OS build v2.7.0-ncs1  ***
Starting Bluetooth Peripheral LBS example
GPIO Periphal GPIO_0 initialised
build time: May 31 2022 12:30:46
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fd0
I: data wra: 0, 1c
I: SoftDevice Controller build revision: 
I: df c0 4e d6 1f 7c 66 09 |..N..|f.
I: 0a f5 2b a0 98 f2 43 64 |..+...Cd
I: 62 c5 a6 2a             |b..*    
I: No ID address. App must call settings_load()
Bluetooth initialized
Advertising successfully started
Connected
I: Swap type: test
I: Swap type: test
I: Swap type: test
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Attaching the updated code for reference:&amp;nbsp;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_dfu_5F00_secondary_5F00_image_5F00_invalid.zip"&gt;test-devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_dfu_5F00_secondary_5F00_image_5F00_invalid.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the snapshot from the mobile application:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/dfu_5F00_app.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you please check this updated code?&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: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/370250?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 13:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed2a0163-41b8-4fb6-9001-2ed3e1abf592</guid><dc:creator>user26071</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I was out of office due to illness last week, but I will look into this as soon as I can.&lt;/p&gt;
&lt;p&gt;Sorry for the delay.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/369679?ContentTypeID=1</link><pubDate>Thu, 26 May 2022 15:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c201980-c131-4d18-bc99-e861ea735c3a</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We are still struggling with the DFU on nrf52832 with external flash. Could you please check the code and suggest what&amp;#39;s wrong here?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am attaching 2 codes for reference:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_dfu_5F00_flash_5F00_verified.zip"&gt;test-devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_dfu_5F00_flash_5F00_verified.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the code where I verified the external flash working fine. Flash APIs are working fine, BLE advertisements and logs on the serial device are working fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_dfu_5F00_not_5F00_working_5F00_with_5F00_dfu_5F00_changes.zip"&gt;test-devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_dfu_5F00_not_5F00_working_5F00_with_5F00_dfu_5F00_changes.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the modified code for DFU using an external flash. When I flash this from VS Code, I don&amp;#39;t see anything on serial or BLE advertisements. It seems it is not booting at all.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you please check and&amp;nbsp;guide us?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;TIA!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/369644?ContentTypeID=1</link><pubDate>Thu, 26 May 2022 05:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ab85066-5497-43bf-b151-edbca4578115</guid><dc:creator>user111276</dc:creator><description>&lt;p&gt;hi i am working on same . but i have w25q64jv&amp;nbsp; flash ( nrf52832-dk&amp;nbsp; + DFU over BLE + External flash w25q64jv ).&amp;nbsp; i am also facing same issue .&amp;nbsp; &lt;br /&gt;&lt;br /&gt;did found any solution for this ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/369627?ContentTypeID=1</link><pubDate>Wed, 25 May 2022 22:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1afc9c2-73af-4c2c-bf25-8119c414eee6</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;I don&amp;#39;t know what&amp;#39;s wrong with devzone website, the attachment&amp;nbsp;got missed in the previous comment. So, reattaching the code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_lbs_5F00_dfu.zip"&gt;test-devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_dfu.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/369625?ContentTypeID=1</link><pubDate>Wed, 25 May 2022 22:30:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34b8e2ec-5564-4be6-b102-270c228832ed</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I modified the Peripheral LBS example and get it to build. However, once I flash it, I don&amp;#39;t see it doing anything (no serial logs/advertisements).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you please check the attached code and help to understand what&amp;#39;s wrong?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So far I&amp;#39;ve verified the following things:&lt;/p&gt;
&lt;p&gt;- Flash chip works fine (I could read/write/erase using Flash APIs)&lt;/p&gt;
&lt;p&gt;- If I remove the pm_static.yaml and child_image/ folder from the project plus the comment&amp;nbsp; &amp;quot;nordic,pm-ext-flash&amp;quot; from overlay file, DFU works fine (but it uses internal flash)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;TIA!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/369412?ContentTypeID=1</link><pubDate>Wed, 25 May 2022 05:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19257993-e98c-4e03-b7be-e75980607375</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please ignore my previous comment. I just got it to build by moving the overlay file in boards/ as per suggestion in the thread:&amp;nbsp;&lt;a href="https://test-devzone.nordicsemi.com/f/nordic-q-a/83402/ncs1-8-0-52840-mcuboot-spi-external-flash-can-t-build-pass"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/83402/ncs1-8-0-52840-mcuboot-spi-external-flash-can-t-build-pass&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am continuing to pursue OTA with this sample now.&amp;nbsp;I shall get back to you in case I hit a roadblock.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;TIA!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/369393?ContentTypeID=1</link><pubDate>Wed, 25 May 2022 01:41:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:228147b1-145a-4c39-8057-203f17f458ef</guid><dc:creator>user112081</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I found an example of SPI-NOR in one of the other threads, and I am trying to build the same for my FLASH chip. However, it fails to build. Even though I&amp;#39;ve the right entry for Flash it&amp;#39;s throwing an error at compile time. I&amp;#39;ve already verified the Flash read/write so it doesn&amp;#39;t have any issue definitely.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Error message: &amp;quot;error: static assertion failed: &amp;quot;jedec,spi-nor jedec-id required for non-runtime SFDP&amp;quot;&lt;br /&gt; 1187 | BUILD_ASSERT(DT_INST_NODE_HAS_PROP(0, jedec_id),&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am attaching the modified code for your reference. Could you please check and guide?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0027.hello_5F00_world_5F00_spi_5F00_nor_5F00_ext_5F00_flash.zip"&gt;test-devzone.nordicsemi.com/.../0027.hello_5F00_world_5F00_spi_5F00_nor_5F00_ext_5F00_flash.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Board used: nrf52dk_nrf52832&lt;/p&gt;
&lt;p&gt;SDK version: v1.8.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 + DFU over BLE + External flash</title><link>https://test-devzone.nordicsemi.com/thread/368817?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 11:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47ad9362-644d-4556-a40d-816132adf1da</guid><dc:creator>user26071</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can check out the application samples found in NCS\nrf\applications\machine_learning\configuration\nrf5340dk_nrf5340_cpuapp\prj.conf&lt;/p&gt;
&lt;p&gt;This is a sample that uses an external flash chip for DFU. Study the prj.conf file and the pm_static.yml file from that example as a reference on how to get started. It would of course require some configurations, as the nRF52832 only has one core, but at least it should give an idea.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>