<?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>FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash</link><description>Hi, 
 Working with the NRF5340-nrf7002 and the W25Q16RV flash memory in our project. 
 
 Initially, I configured an 8MB( W25Q64RV) external flash without issues and tested DFU-FOTA which is working as expected. However, after switching to the 2MB W25Q16RV</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Sep 2024 18:37:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash" /><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/503460?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 18:37:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b265ef1-e394-456e-abfb-b99252d3aa61</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please create a new support case for the new issue which is away from the original scope.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/503194?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2024 05:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37a57f1e-4af4-4119-a422-3e2bdb9d19dd</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Last time, I checked DFU over Wi-Fi in a separate project (net/download) that only included DFU and Wi-Fi-related functionality. Initially, I encountered some issues, which we were able to solve with your guidance. Thank you for that.&lt;/p&gt;
&lt;p&gt;Now, I&amp;rsquo;m facing a similar issue in my main application project. This project includes BT-GATT, Wi-Fi, a timer counter for scheduled work, GPIO for hardware interrupts, I2C for an OLED display, and ADC functionality. After developing these features, I&amp;rsquo;m now working on integrating the DFU functionality. However, I&amp;rsquo;m encountering a flash overflow issue.&lt;/p&gt;
&lt;p&gt;Could you please assist with resolving this?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;log link :&lt;a href="https://docs.google.com/document/d/1-Rrwc0nF4Tbn8exbthx3CiJblCC58wW8GaRwrIGEyZw/edit?usp=sharing"&gt;build_log&lt;/a&gt;&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/pastedimage1726809144753v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I have tried to remove debug logs and log related config in conf but the issue remains same.&lt;br /&gt;&lt;br /&gt;I have checked with both 2MB and 4MB.&lt;br /&gt;&lt;br /&gt;Here I share the proj.conf file&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
#
# This file contains selected Kconfig options for the application.

CONFIG_APP_EVENT_MANAGER=y
CONFIG_REBOOT=y

CONFIG_POSIX_MQUEUE=y
CONFIG_POLL=y
# CONFIG_PWM=y

#GPIO
CONFIG_GPIO=y

#RTC
CONFIG_COUNTER=y

# compiler
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_SIZE_OPTIMIZATIONS=y

# console
CONFIG_CONSOLE=y

# UART console
CONFIG_SERIAL=y

# logging
CONFIG_LOG=y
# CONFIG_APP_LOG_LEVEL_DBG=y
CONFIG_APP_LOG_LEVEL_OFF=y
# CONFIG_APP_LOG_LEVEL=0
CONFIG_LOG_MODE_DEFERRED=n
CONFIG_LOG_BUFFER_SIZE=512
CONFIG_LOG_PRINTK=n 

#PSA
CONFIG_PSA_WANT_ALG_HMAC=y

#Wifi
CONFIG_WIFI=y
CONFIG_WIFI_NRF700X=y

# WPA supplicant
CONFIG_WPA_SUPP=y

# System settings
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_NANO=n

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
# CONFIG_NET_LOG=y
CONFIG_NET_IPV6=n
CONFIG_NET_IPV4=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y

#DNS resolver
CONFIG_DNS_RESOLVER=y

# CONFIG_NET_STATISTICS=y

CONFIG_NET_PKT_RX_COUNT=8
CONFIG_NET_PKT_TX_COUNT=8

# Below section is the primary contributor to SRAM and is currently
# tuned for performance, but this will be revisited in the future.
CONFIG_NET_BUF_RX_COUNT=16
CONFIG_NET_BUF_TX_COUNT=16
CONFIG_NET_BUF_DATA_SIZE=128
CONFIG_HEAP_MEM_POOL_SIZE=153600
CONFIG_NET_TC_TX_COUNT=1

CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1
CONFIG_NET_MAX_CONTEXTS=5
CONFIG_NET_CONTEXT_SYNC_RECV=y

CONFIG_INIT_STACKS=y

CONFIG_NET_L2_ETHERNET=y

CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_INIT_TIMEOUT=0

CONFIG_NET_CONFIG_MY_IPV4_ADDR=&amp;quot;192.165.100.150&amp;quot;
CONFIG_NET_CONFIG_PEER_IPV4_ADDR=&amp;quot;192.165.100.1&amp;quot;

CONFIG_NET_SOCKETS_POLL_MAX=10

CONFIG_NET_CONNECTION_MANAGER=y

# DHCPv4
CONFIG_NET_DHCPV4=y
# CONFIG_NET_CONFIG_AUTO_INIT=n
# CONFIG_NET_CONFIG_NEED_IPV6=n
# CONFIG_NET_CONFIG_NEED_IPV4=n

# CONFIG_NET_CONFIG_LOG_LEVEL_DBG=y
# CONFIG_WIFI_LOG_LEVEL_DBG=y
# Zephyr NET Connection Manager Connectivity layer.
CONFIG_L2_WIFI_CONNECTIVITY=y
# CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n
# CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n
# CONFIG_L2_WIFI_CONNECTIVITY_CONNECTION_PERSISTENCE=n 

# Memories
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096

# Debugging
CONFIG_STACK_SENTINEL=y
CONFIG_DEBUG=y
# CONFIG_DEBUG_COREDUMP=y
# CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y
# CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y

# Kernel options
CONFIG_ENTROPY_GENERATOR=y

CONFIG_NET_L2_WIFI_MGMT=y

#BT
CONFIG_BT=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_GATT_CLIENT=y

CONFIG_BT_BUF_ACL_RX_SIZE=151
CONFIG_BT_L2CAP_TX_MTU=147
CONFIG_BT_BUF_ACL_TX_SIZE=151

CONFIG_BT_RX_STACK_SIZE=5120
CONFIG_BT_BONDABLE=n
CONFIG_BT_DEVICE_NAME_DYNAMIC=y

# Raw scan Options
CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS=n

#FLASH
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

CONFIG_NVS=y

CONFIG_SETTINGS=y
CONFIG_SETTINGS_NVS=y

#Wifi_credentials
CONFIG_WIFI_CREDENTIALS=y
CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES=1

CONFIG_NANOPB=y

CONFIG_WIFI_MGMT_EXT=y
# Setting BT supervision timeout to 75units (750ms) to avoid timeout of BT connection when radio is granted to Wi-Fi during scan.
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=75

# Similar to shell sample, add this option to ensure the event can get served.
CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=5000

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_WIFI_FIXED_MAC_ADDRESS=&amp;quot;22:22:22:44:44:44&amp;quot;

#I2C
CONFIG_I2C=y
CONFIG_I2C_NRFX=y

CONFIG_ADC=y
# CONFIG_NRFX_SAADC=y

# CONFIG_DNS_RESOLVER_LOG_LEVEL_DBG=y
# CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
CONFIG_NET_CONFIG_SETTINGS=n

CONFIG_PM_DEVICE=y
CONFIG_CRC=y
CONFIG_POWEROFF=y

#DFU
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
CONFIG_FW_INFO=y

# FOTA library
CONFIG_FOTA_DOWNLOAD=y

# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y

# DFU Target
CONFIG_DFU_TARGET=y

# HTTP
CONFIG_HTTP_PARSER=y
CONFIG_HTTP_PARSER_URL=y

# Image manager
CONFIG_IMG_MANAGER=y
# CONFIG_FLASH=y
# CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# Non-volatile Storage
# CONFIG_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Default partition for NVS is unused
CONFIG_PM_PARTITION_SIZE_NVS_STORAGE=0x0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;board/nrf7002dk_nrf5340_cpuapp_ns.conf&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# General
CONFIG_POSIX_CLOCK=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_LOG_BUFFER_SIZE=3072
CONFIG_HEAP_MEM_POOL_SIZE=81920
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_LOG=y

CONFIG_HW_STACK_PROTECTION=y
# CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y

# Optimize Wi-Fi stack to save some memory
CONFIG_NRF700X_RX_NUM_BUFS=16
CONFIG_NRF700X_MAX_TX_AGGREGATION=4

# Zephyr NET Connection Manager connectivity layer.
CONFIG_L2_WIFI_CONNECTIVITY=y
CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n
CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n

# Wi-Fi
CONFIG_WIFI=y
CONFIG_WIFI_NRF700X=y
# CONFIG_WIFI_NRF700X_LOG_LEVEL_ERR=y
CONFIG_WIFI_MGMT_EXT=y
CONFIG_WIFI_CREDENTIALS=y

# Shell
CONFIG_SHELL=y
CONFIG_SHELL_STACK_SIZE=6144

# WPA
CONFIG_WPA_SUPP=y
# CONFIG_WPA_SUPP_LOG_LEVEL_ERR=y

# NET sockets
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_TCP_WORKQ_STACK_SIZE=2048
CONFIG_NET_UDP=y
CONFIG_NET_DHCPV4=y
CONFIG_NET_DHCPV6=y
CONFIG_NET_CONTEXT_SNDTIMEO=y
CONFIG_NET_CONTEXT_RCVTIMEO=y
CONFIG_NET_TCP=y
CONFIG_NET_NATIVE=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# DNS
CONFIG_DNS_RESOLVER=y
CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000

# TLS
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_TLS_LIBRARY=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=81920
CONFIG_MBEDTLS_RSA_C=y
CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y

# Optimize TF-M
CONFIG_TFM_PROFILE_TYPE_SMALL=y
CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000
CONFIG_PM_PARTITION_SIZE_TFM=0x1fe00

# CONFIG_PM_PARTITION_SIZE_TFM=0x20000

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Serial Peripheral Interface (SPI)
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# Bootloader and FOTA related configurations

# MCUBOOT
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_USE_ALL_AVAILABLE_RAM=y
CONFIG_MCUBOOT_IMG_MANAGER=y

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# Download client (needed by AWS FOTA)
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_4096=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For MCUboot child image config and overlay already shared. I have use same childimage config for this project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/500423?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2024 12:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7596e65-7304-4818-ac6b-9698c8c8e785</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Happy to know that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/500345?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2024 06:59:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03f035d0-1641-4fdc-a307-fa512c616443</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;br /&gt;Thanks for your response.&lt;br /&gt;&lt;br /&gt;Follow the sample/ link you shared, the issues resolved, 2MB and 4MB flash is working fine.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/500262?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 16:38:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2813fce6-1a87-483a-afdc-98c4c77918b0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From your&amp;nbsp;&lt;a href="https://docs.google.com/document/d/1yALzS6LUUrogjSABGxXy_GoPqY-TEOBt-HDmHl98dd4/edit?usp=sharing" rel="noopener noreferrer" target="_blank"&gt;build_log_1&lt;/a&gt;, I see the mcuboot uses&amp;nbsp;&lt;span style="font-weight:400;"&gt;nrf7002dk_nrf5340_cpuapp&lt;/span&gt;&amp;nbsp;as the build target, so the board name for the mcuboot is&amp;nbsp;&lt;span&gt;nrf7002dk_nrf5340_cpuapp. That is the reason it cannot find the SPI in the log. Sorry for the mislead.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It doesn&amp;#39;t need to set the mcuboot board file as the second board configuration, the system would load it automatically according to the board name for the mcuboot.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;You can check out&amp;nbsp;&lt;/span&gt;&lt;a style="font-family:inherit;" href="https://devzone.nordicsemi.com/f/nordic-q-a/101302/zephyr-flash_erase-w25q32jv-0-524288-4096-faild--19/434758" rel="noopener noreferrer" target="_blank"&gt;this post regarding the overlay file&lt;/a&gt;&amp;nbsp;and &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.6.99-ncs2/boards/circuitdojo/feather/circuitdojo_feather_nrf9160_common.dtsi#L162"&gt;this sample&lt;/a&gt;&lt;span&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/500098?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 04:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa65cec7-fd6e-44d0-8115-3e8515a7f850</guid><dc:creator>Lavanya_Manohar</dc:creator><description>[quote userid="77782" url="~/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash/500067"]What is the board name you built for?&amp;nbsp;&lt;span&gt;Try to&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;synchronize the name of the board config/overlay files.&lt;/span&gt;[/quote]
&lt;p&gt;Board configurations: &lt;strong&gt;nrf7002dk_nrf5340_cpuapp_ns&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After change the child_imgae/mcuboot/boards/ conf and coverlay to&amp;nbsp;&lt;strong&gt;nrf7002dk_nrf5340_cpuapp_ns&amp;nbsp;&lt;/strong&gt;and try to build with below configuration.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1724819213099v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Facing compilation error :&amp;nbsp;&lt;a href="https://docs.google.com/document/d/1yALzS6LUUrogjSABGxXy_GoPqY-TEOBt-HDmHl98dd4/edit?usp=sharing" rel="noopener noreferrer" target="_blank"&gt;build_log_1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Can&amp;#39;t able to paste build log here so I have provided in link.&lt;br /&gt;&lt;br /&gt;And als try to build with below configurations&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1724819154767v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Facing compilation error :&amp;nbsp;&lt;a href="https://docs.google.com/document/d/1xgGS-yymU_thqWJHSPqnrFw-hk-xXL7-CYDs-_9kS6Q/edit?usp=sharing" rel="noopener noreferrer" target="_blank"&gt;build_log_2&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash/500067"]&lt;span&gt;Try to&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;synchronize the name of the board config/overlay files.&lt;/span&gt;[/quote]
&lt;p&gt;&lt;a href="https://docs.google.com/document/d/1xgGS-yymU_thqWJHSPqnrFw-hk-xXL7-CYDs-_9kS6Q/edit?usp=sharing" rel="noopener noreferrer" target="_blank"&gt;&amp;nbsp;&lt;/a&gt;But I have tried the same code without any changes for 8MB external flash. I didn&amp;#39;t face any error like this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/500067?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 18:59:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22c85f98-d673-44db-8f45-549fc7a5e35c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="Lavanya_Manohar"]board/nrf7002dk_nrf5340_cpuapp_ns.conf[/quote][quote user="Lavanya_Manohar"]board/nrf7002dk_nrf5340_cpuapp_ns.overlay[/quote][quote user="Lavanya_Manohar"]child image/mcuboot/board/&lt;span&gt;nrf7002dk_nrf5340_cpuapp.conf&lt;/span&gt;[/quote][quote user="Lavanya_Manohar"]&lt;span&gt;child image/mcuboot/board/&lt;/span&gt;&lt;span&gt;nrf7002dk_nrf5340_cpuapp.overlay&lt;/span&gt;[/quote]
&lt;p&gt;What is the board name you built for?&amp;nbsp;&lt;span&gt;Try to&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;synchronize the name of the board config/overlay files.&lt;/span&gt;&lt;/p&gt;
[quote user="Lavanya_Manohar"]How can I include those file in build configuration to ensure that the config are included?[/quote]
&lt;p&gt;&lt;span&gt;Try to&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;synchronize the name of the board config/overlay files.&lt;/span&gt;&lt;/p&gt;
[quote user="Lavanya_Manohar"]&lt;span&gt;I need guidance&amp;nbsp;to resolve&amp;nbsp;&lt;/span&gt; &amp;quot;W: Cannot upgrade: not a compatible amount of sectors&amp;quot; error?&amp;nbsp;[/quote]
&lt;p&gt;Do you get a different log after synchronizing the name of the board config/overlay files?&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499944?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 10:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:082068f2-bd61-4d74-a1d0-0f55153ed3d9</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Here I share the conf and overlay files.&lt;br /&gt;&lt;br /&gt;board/nrf7002dk_nrf5340_cpuapp_ns.conf&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
# General
CONFIG_POSIX_CLOCK=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_LOG_BUFFER_SIZE=3072
CONFIG_HEAP_MEM_POOL_SIZE=81920
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_LOG=y

CONFIG_HW_STACK_PROTECTION=y
# CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y

# Optimize Wi-Fi stack to save some memory
CONFIG_NRF700X_RX_NUM_BUFS=16
CONFIG_NRF700X_MAX_TX_AGGREGATION=4

# Zephyr NET Connection Manager connectivity layer.
CONFIG_L2_WIFI_CONNECTIVITY=y
CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n
CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n

# Wi-Fi
CONFIG_WIFI=y
CONFIG_WIFI_NRF700X=y
CONFIG_WIFI_NRF700X_LOG_LEVEL_ERR=y
CONFIG_WIFI_MGMT_EXT=y
CONFIG_WIFI_CREDENTIALS=y

# Shell
CONFIG_SHELL=y
CONFIG_SHELL_STACK_SIZE=6144

# WPA
CONFIG_WPA_SUPP=y
CONFIG_WPA_SUPP_LOG_LEVEL_ERR=y

# NET sockets
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_TCP_WORKQ_STACK_SIZE=2048
CONFIG_NET_UDP=y
CONFIG_NET_DHCPV4=y
CONFIG_NET_DHCPV6=y
CONFIG_NET_CONTEXT_SNDTIMEO=y
CONFIG_NET_CONTEXT_RCVTIMEO=y
CONFIG_NET_TCP=y
CONFIG_NET_NATIVE=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# DNS
CONFIG_DNS_RESOLVER=y
CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000

# TLS
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_TLS_LIBRARY=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=81920
CONFIG_MBEDTLS_RSA_C=y
CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y

# Optimize TF-M
CONFIG_TFM_PROFILE_TYPE_SMALL=y
CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000
CONFIG_PM_PARTITION_SIZE_TFM=0x1fe00

# CONFIG_PM_PARTITION_SIZE_TFM=0x20000

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Serial Peripheral Interface (SPI)
CONFIG_SPI=y
CONFIG_SPI_NOR=y
# CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# Bootloader and FOTA related configurations

# MCUBOOT
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_USE_ALL_AVAILABLE_RAM=y
CONFIG_MCUBOOT_IMG_MANAGER=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# Download client (needed by AWS FOTA)
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_4096=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;proj.conf&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096

# Networking
CONFIG_NETWORKING=y
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y
# CONFIG_HEAP_MEM_POOL_SIZE=1024

CONFIG_FW_INFO=y

# FOTA library
CONFIG_FOTA_DOWNLOAD=y

# Application Upgrade support
CONFIG_BOOTLOADER_MCUBOOT=y

# DFU Target
CONFIG_DFU_TARGET=y

# HTTP
CONFIG_HTTP_PARSER=y
CONFIG_HTTP_PARSER_URL=y

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# Non-volatile Storage
CONFIG_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Default partition for NVS is unused
CONFIG_PM_PARTITION_SIZE_NVS_STORAGE=0x0

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

CONFIG_WIFI_FIXED_MAC_ADDRESS=&amp;quot;22:22:22:44:44:44&amp;quot;

# CONFIG_NRFX_SPIM_LOG=y
# CONFIG_NRFX_QSPI_LOG=y
# CONFIG_SPI_LOG_LEVEL_DBG=y
# CONFIG_SPI_LOG_LEVEL_WRN=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;board/nrf7002dk_nrf5340_cpuapp_ns.overlay&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
// Update chosen node to use w25q32jv as external flash memory
/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;w25q32jv;
	};
};

// Disable mx25r64
&amp;amp;mx25r64 {
	status = &amp;quot;disabled&amp;quot;;
};

// Enable and configure SPI with W25Q32JV flash memory
&amp;amp;spi4 {
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;spi4_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;;
    w25q32jv: w25q32jv@0 {
        compatible = &amp;quot;jedec,spi-nor&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;133000000&amp;gt;; // 133 MHz
        jedec-id = [ef 40 16]; // Manufacturer and device ID for W25Q32JV
        sfdp-bfp = [
        e5 20 f9 ff  ff ff ff 01  44 eb 08 6b  08 3b 42 bb
        fe ff ff ff  ff ff 00 00  ff ff 40 eb  0c 20 0f 52
        10 d8 00 00  36 02 a6 00  82 ea 14 c2  e9 63 76 33
        7a 75 7a 75  f7 a2 d5 5c  19 f7 4d ff  e9 30 f8 80
        ];
        size = &amp;lt;0x400000&amp;gt;;  // 4 MiB
        has-dpd;
        t-enter-dpd = &amp;lt;10000&amp;gt;;  // 10 &amp;#181;s (10000 ns)
        t-exit-dpd = &amp;lt;30000&amp;gt;;   // 30 &amp;#181;s (30000 ns)
    };
};

&amp;amp;spi4_default {
    group1 {
        psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,   // P0.08
                &amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;, // P0.10
                &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;;  // P0.09
    };
};

&amp;amp;spi4_sleep {
    group1 {
        psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,   // P0.08
                &amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;, // P0.10
                &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;;  // P0.09
        low-power-enable;
    };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;child image/mcuboot/board/&lt;span&gt;nrf7002dk_nrf5340_cpuapp.conf&lt;/span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# General
CONFIG_FLASH=y
CONFIG_MULTITHREADING=y
CONFIG_MAIN_STACK_SIZE=4096

# Serial Peripheral Interface (SPI)
CONFIG_SPI=y
CONFIG_SPI_NOR=y
# CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# MCUBoot and Partition Manager
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
CONFIG_BOOT_MAX_IMG_SECTORS=2048
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;child image/mcuboot/board/&lt;/span&gt;&lt;span&gt;nrf7002dk_nrf5340_cpuapp.overlay&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
// Update chosen node to use w25q32jv as external flash memory
/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;w25q32jv;
	};
};

// Disable mx25r64
&amp;amp;mx25r64 {
	status = &amp;quot;disabled&amp;quot;;
};

// Enable and configure SPI with W25Q32JV flash memory
&amp;amp;spi4 {
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;spi4_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;;
    w25q32jv: w25q32jv@0 {
        compatible = &amp;quot;jedec,spi-nor&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;133000000&amp;gt;; // 133 MHz
        jedec-id = [ef 40 16]; // Manufacturer and device ID for W25Q32JV
        sfdp-bfp = [
        e5 20 f9 ff  ff ff ff 01  44 eb 08 6b  08 3b 42 bb
        fe ff ff ff  ff ff 00 00  ff ff 40 eb  0c 20 0f 52
        10 d8 00 00  36 02 a6 00  82 ea 14 c2  e9 63 76 33
        7a 75 7a 75  f7 a2 d5 5c  19 f7 4d ff  e9 30 f8 80
        ];
        size = &amp;lt;0x400000&amp;gt;;  // 4 MiB
        has-dpd;
        t-enter-dpd = &amp;lt;10000&amp;gt;;  // 10 &amp;#181;s (10000 ns)
        t-exit-dpd = &amp;lt;30000&amp;gt;;   // 30 &amp;#181;s (30000 ns)
    };
};

&amp;amp;spi4_default {
    group1 {
        psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,   // P0.08
                &amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;, // P0.10
                &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;;  // P0.09
    };
};

&amp;amp;spi4_sleep {
    group1 {
        psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,   // P0.08
                &amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;, // P0.10
                &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;;  // P0.09
        low-power-enable;
    };
};

// ============================================================================
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Error log we facing &amp;quot;W: Cannot upgrade: not a compatible amount of sectors&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
I: Starting bootloader
W: Cannot upgrade: not a compatible amount of sectors
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot

*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
Download client sample started
HTTP application update sample started
Using version 1
if up
Connecting to network
uart:~$&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;partition&amp;nbsp;&lt;span&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/3808.image-_2800_12_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I need guidance&amp;nbsp;to resolve&amp;nbsp;&lt;/span&gt; &amp;quot;W: Cannot upgrade: not a compatible amount of sectors&amp;quot; error?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In addition to above issue, Initialy I have found that the&amp;nbsp;child image/board/conf and overlay configuration is not reflected in output file - build/mcuboot. But after 2 to 3 build the config are reflected.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I include those file in build configuration to ensure that the config are included?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499874?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 05:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8543768-2040-432c-9650-b24a5e2d186a</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash/499818"]Are you using the static partition? [/quote]
&lt;p&gt;No, I&amp;#39;m not using the static partition. The partiton.yml which I have attached is automatically generated partition only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499818?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 16:14:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:506ee340-d56a-4e2e-a5c6-19f8f8965c2d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Are you using the static partition? If so, it seems the size of the primary slot and the second slot are not equal. You can remove the&amp;nbsp;&lt;span&gt;static partition and&amp;nbsp;&lt;/span&gt;let the partition manager general the partition automatically and then use that partition.yaml as the&amp;nbsp;&lt;span&gt;static partition.&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499756?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 12:34:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d3af9e6-4d79-4e9b-8b9a-b41d426ecb92</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&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/pastedimage1724676320928v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499755?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 12:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b55f8d61-f646-412a-ac9d-228f18a42d00</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;br /&gt;&lt;br /&gt;After modifying the external flash configuration (&lt;code&gt;sfdp-bfp&lt;/code&gt;) and commenting out &lt;code&gt;CONFIG_SPI_NOR_SFDP_DEVICETREE=y&lt;/code&gt;, I was able to compile the project without overflow issues. However, I&amp;#39;m encountering an issue related to sector counts in both 2MB and 4MB configurations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Observed Issue:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
I: Starting bootloader
W: Cannot upgrade: not a compatible amount of sectors
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot

[00:00:00.011,749] &amp;lt;inf&amp;gt; spi_nor: w25q32jv@0: 4 MiBy flash
[00:00:00.011,779] &amp;lt;err&amp;gt; spi_nor: BFP flash size mismatch with devicetree
[00:00:00.011,779] &amp;lt;err&amp;gt; spi_nor: SFDP read failed: -22
*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
Download client sample started
HTTP application update sample started
Using version 2
if up
Connecting to network&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;While debuging found that inccompatible&amp;nbsp;number of sectors.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Primary Flash (1MB):&lt;/strong&gt; 228 sectors detected&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Secondary Flash (4MB):&lt;/strong&gt; 128 sectors detected&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span id="pastedimage1724675425178v1" class="mceItem mceNonEditable mceInsertMediaItem mceInsertMediaItem mceInsertMediaItemImage" style="color:transparent;height:240px;width:320px;"&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;What are the bootloader settings, especially regarding the flash size and sector layout? &lt;br /&gt;2.The number of sectors is typically determined by the total flash size divided by the sector size. How to set these configuration for 2MB or 4MB flash?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499657?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 05:18:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bdd2a29-04c2-4bc5-8141-63f39ca6b2c9</guid><dc:creator>Lavanya_Manohar</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;br /&gt;Thank you for your response.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash/499581"]maybe the&amp;nbsp;2MB flash is not big enough for the updated image.[/quote]
&lt;p&gt;We also suspect this.&amp;nbsp;Therefore we tried 4MB&amp;nbsp;&lt;span&gt;W25Q32RV&amp;nbsp;external flash, facing same issue.&lt;br /&gt;&lt;br /&gt;My overlay&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;
// Update chosen node to use w25q32jv as external flash memory
/ {
	chosen {
		nordic,pm-ext-flash = &amp;amp;w25q32jv;
	};
};

// Disable mx25r64
&amp;amp;mx25r64 {
	status = &amp;quot;disabled&amp;quot;;
};

// Enable and configure SPI with W25Q32JV flash memory
&amp;amp;spi4 {
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;spi4_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;;
    w25q32jv: w25q32jv@0 {
        compatible = &amp;quot;jedec,spi-nor&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;133000000&amp;gt;; // 133 MHz
        jedec-id = [ef 40 16]; // Manufacturer and device ID for W25Q32JV
        sfdp-bfp = [
            e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04
            bb ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20
            0f 52 10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44
            83 68 44 30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff
            f0 d0 ff ff
        ];
        size = &amp;lt;0x400000&amp;gt;;  // 4 MiB
        has-dpd;
        t-enter-dpd = &amp;lt;10000&amp;gt;;  // 10 &amp;#181;s (10000 ns)
        t-exit-dpd = &amp;lt;30000&amp;gt;;   // 30 &amp;#181;s (30000 ns)
    };
};

&amp;amp;spi4_default {
    group1 {
        psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,   // P0.08
                &amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;, // P0.10
                &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;;  // P0.09
    };
};

&amp;amp;spi4_sleep {
    group1 {
        psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 8)&amp;gt;,   // P0.08
                &amp;lt;NRF_PSEL(SPIM_MISO, 0, 10)&amp;gt;, // P0.10
                &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 9)&amp;gt;;  // P0.09
        low-power-enable;
    };
};
&lt;/pre&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;build/zephyr/partition.yml file&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0xfa000
  end_address: 0xfc000
  placement:
    after:
    - tfm_otp_nv_counters
  region: flash_primary
  size: 0x2000
EMPTY_1:
  address: 0xf6000
  end_address: 0xf8000
  placement:
    after:
    - tfm_its
  region: flash_primary
  size: 0x2000
app:
  address: 0x30000
  end_address: 0xf4000
  region: flash_primary
  size: 0xc4000
external_flash:
  address: 0xe4000
  end_address: 0x80000
  region: external_flash
  size: -0x64000
mcuboot:
  address: 0x0
  end_address: 0x10000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0x10000
mcuboot_pad:
  address: 0x10000
  end_address: 0x10200
  placement:
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0x10000
  end_address: 0xf4000
  orig_span: &amp;amp;id001
  - tfm
  - app
  - mcuboot_pad
  region: flash_primary
  size: 0xe4000
  span: *id001
mcuboot_primary_app:
  address: 0x10200
  end_address: 0xf4000
  orig_span: &amp;amp;id002
  - app
  - tfm
  region: flash_primary
  size: 0xe3e00
  span: *id002
mcuboot_secondary:
  address: 0x0
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0xe4000
  placement:
    align:
      start: 0x4
  region: external_flash
  share_size:
  - mcuboot_primary
  size: 0xe4000
mcuboot_sram:
  address: 0x20000000
  end_address: 0x20080000
  orig_span: &amp;amp;id003
  - sram_primary
  - rpmsg_nrf53_sram
  - tfm_sram
  region: sram_primary
  size: 0x80000
  span: *id003
otp:
  address: 0xff8100
  end_address: 0xff83fc
  region: otp
  size: 0x2fc
rpmsg_nrf53_sram:
  address: 0x20070000
  end_address: 0x20080000
  placement:
    before:
    - end
  region: sram_primary
  size: 0x10000
sram_nonsecure:
  address: 0x2000c000
  end_address: 0x20080000
  orig_span: &amp;amp;id004
  - sram_primary
  - rpmsg_nrf53_sram
  region: sram_primary
  size: 0x74000
  span: *id004
sram_primary:
  address: 0x2000c000
  end_address: 0x20070000
  region: sram_primary
  size: 0x64000
sram_secure:
  address: 0x20000000
  end_address: 0x2000c000
  orig_span: &amp;amp;id005
  - tfm_sram
  region: sram_primary
  size: 0xc000
  span: *id005
tfm:
  address: 0x10200
  end_address: 0x30000
  inside:
  - mcuboot_primary_app
  placement:
    before:
    - app
  region: flash_primary
  size: 0x1fe00
tfm_its:
  address: 0xf4000
  end_address: 0xf6000
  inside:
  - tfm_storage
  placement:
    align:
      start: 0x4000
    before:
    - tfm_otp_nv_counters
  region: flash_primary
  size: 0x2000
tfm_nonsecure:
  address: 0x30000
  end_address: 0xf4000
  orig_span: &amp;amp;id006
  - app
  region: flash_primary
  size: 0xc4000
  span: *id006
tfm_otp_nv_counters:
  address: 0xf8000
  end_address: 0xfa000
  inside:
  - tfm_storage
  placement:
    align:
      start: 0x4000
    before:
    - tfm_ps
  region: flash_primary
  size: 0x2000
tfm_ps:
  address: 0xfc000
  end_address: 0x100000
  inside:
  - tfm_storage
  placement:
    align:
      start: 0x4000
    before:
    - end
  region: flash_primary
  size: 0x4000
tfm_secure:
  address: 0x10000
  end_address: 0x30000
  orig_span: &amp;amp;id007
  - mcuboot_pad
  - tfm
  region: flash_primary
  size: 0x20000
  span: *id007
tfm_sram:
  address: 0x20000000
  end_address: 0x2000c000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0xc000
tfm_storage:
  address: 0xf4000
  end_address: 0x100000
  orig_span: &amp;amp;id008
  - tfm_ps
  - tfm_its
  - tfm_otp_nv_counters
  region: flash_primary
  size: 0xc000
  span: *id008
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/114163/flash-overflow-issue-nrf5340-dfu-external-flash/499581"]You can check the settings for&amp;nbsp;&lt;span&gt;2MB flash to ensure the settings are correct.&amp;nbsp; &lt;/span&gt;[/quote]
&lt;p&gt;&lt;span&gt;I have check external flash using zephyr/sample/driver/spi_flash_at45. Both 2MB and 4MB are working fine.&lt;br /&gt;&lt;br /&gt;Any other configuration need to check?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FLASH overflow issue + nrf5340 + DFU external flash</title><link>https://devzone.nordicsemi.com/thread/499581?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 13:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1994e83a-7349-408f-8228-9819e25e542e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can check the settings for&amp;nbsp;&lt;span&gt;2MB flash to ensure the settings are correct.&amp;nbsp; I think the configs should be the same and only the overlay is different. (Maybe my understanding of your flash is wrong.) If everything is correct, maybe the&amp;nbsp;2MB flash is not big enough for the updated image. Since&amp;nbsp;mcuboot_secondary should be the same size of&amp;nbsp;mcuboot_primary, the size of the application might not be compatible with&amp;nbsp;mcuboot_primary/&amp;nbsp;mcuboot_secondary. Then,&amp;nbsp;&lt;/span&gt;&lt;span&gt;You can try to reduce the size of the application. See&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/test_and_optimize/optimizing/memory.html"&gt;Memory footprint optimization&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user=""]Here I share build i suspect[/quote]
&lt;p&gt;Guess your flash is connected via SPI, so you would see that message.&amp;nbsp;See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112034/partition_manager-incorrectly-identifies-qspi-use-for-external-flash"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>