<?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>why FOTA (application and modem) wasn&amp;#39;t downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97184/why-fota-application-and-modem-wasn-t-downloading-the-firmware-updates-when-rtt-logging-was-enabled-and-the-debugger-was-removed</link><description>Hi, 
 My device : nrf1960 
 SDK version : 1.9.1 
 prj.conf when debugger is connected, the device was able to download firmware updates. why device wasn&amp;#39;t downloading the FOTA (application and modem) firmware updates when RTT logging was enabled and the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2023 08:42:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97184/why-fota-application-and-modem-wasn-t-downloading-the-firmware-updates-when-rtt-logging-was-enabled-and-the-debugger-was-removed" /><item><title>RE: why FOTA (application and modem) wasn't downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/thread/413727?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 08:42:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bb8d417-84e0-4288-91bb-63956612d80e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;In terms of why enabling RTT can be problematic I think this is relevant:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/90178/rtt-presence-not-properly-detected"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/90178/rtt-presence-not-properly-detected&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the problem may be that the code is hanging because it&amp;#39;s not able to flush RTT log. Maybe also some of your child images use RTT?&lt;/p&gt;
[quote user="Praveen Deshmane"]3) when&amp;nbsp;CONFIG_LOG_BACKEND_RTT=y and&amp;nbsp;&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE_DROP"&gt;CONFIG_LOG_BACKEND_RTT_MODE_DROP&lt;/a&gt;=y, enabled and&amp;nbsp;CONFIG_SHELL_BACKEND_RTT=n,&amp;nbsp; even though fota update was successfully downloaded and why it is reverting to previous version?[/quote]
&lt;p&gt;Do I understand it correctly that everything works if you completely disable RTT (also for child images)?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You have checked that you have called&amp;nbsp;boot_write_img_confirmed()?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why FOTA (application and modem) wasn't downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/thread/413455?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 09:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea6391d2-eb78-43d3-9ae2-e88b8c2a8b0e</guid><dc:creator>Praveen Deshmane</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;br /&gt;&lt;br /&gt;Any update?&lt;br /&gt;&lt;br /&gt;Best Regards&lt;br /&gt;&lt;br /&gt;Praveen Deshmane&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why FOTA (application and modem) wasn't downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/thread/413142?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 05:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f417eb03-178a-4545-9a5b-d19c4c99987f</guid><dc:creator>Praveen Deshmane</dc:creator><description>&lt;p&gt;Hello Kenneth,&lt;br /&gt;&lt;br /&gt;I tried to add&amp;nbsp;&lt;span&gt;CONFIG_LOG_BACKEND_RTT_MODE_DROP&lt;/span&gt;&lt;span&gt;=y, since it is dependent on&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_LOG_BACKEND_RTT, I needed to enable this too in prj.conf.&lt;br /&gt;&lt;br /&gt;During build process, I encountered below problem.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\ift_praveen\ncs\v1.9.1\zephyr\include\toolchain\gcc.h:61:36: error: static assertion failed: &amp;quot;Conflicting log RTT backend enabled on the same channel&amp;quot;   61 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, &amp;quot;&amp;quot; MSG)      |                                    ^~~~~~~~~~~~~~C:\Users\ift_praveen\ncs\v1.9.1\zephyr\subsys\shell\backends\shell_rtt.c:12:1: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;   12 | BUILD_ASSERT(!(IS_ENABLED(CONFIG_LOG_BACKEND_RTT) &amp;amp;&amp;amp;      | ^~~~~~~~~~~~[102/387] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/shell/shell.c.objninja: build stopped: subcommand failed.&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;Due to &amp;quot;Conflicting log RTT backend enabled on the same channel&amp;quot;, I commented out the following configurations in my prj.conf&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# CONFIG_SHELL_BACKEND_RTT=y
# CONFIG_SHELL_RTT_INIT_LOG_LEVEL_WRN=y
# CONFIG_SHELL_RTT_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I was successfuly able to build and run the application.&lt;br /&gt;&lt;br /&gt;Scenario 1&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The device was able to download fota updates when the &amp;quot;debugger is disconnected and RTT enabled&amp;quot;. But cannot able to enter shell commands.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;After restart, during the bootup the device trying to install the updates, but it is reverted to pevious version.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Scenario 2&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The device was able to download fota updates when the &amp;quot;debugger is connected and RTT enabled&amp;quot;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;After restart, during the bootup the device trying to install the updates, but it is reverted &lt;/span&gt;&lt;span&gt;to pevious version.&lt;br /&gt;&lt;br /&gt;MY OBSERVATIONS&lt;br /&gt;&lt;br /&gt;I have followed this ticket&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71459/error-fota-download-reverted-to-the-previous-version-nrf9160"&gt;ERROR: FOTA download reverted to the previous version nRF9160.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and made sure that&lt;br /&gt;&lt;br /&gt;1. boot_write_img_confirmed() is called in the top of main.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;2. overall flash layout is equal on both original image and new image&amp;nbsp;&lt;br /&gt;&lt;br /&gt;RTT log&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[04:45:33.993,700] &amp;lt;dbg&amp;gt; download_client: http_parse: Copying 71 payload bytes
[04:45:33.993,800] &amp;lt;inf&amp;gt; download_client: Downloaded 447559/447559 bytes (100%)
[04:45:33.993,800] &amp;lt;inf&amp;gt; download_client: Download complete
[04:45:34.092,600] &amp;lt;inf&amp;gt; dfu_target_mcuboot: MCUBoot image upgrade scheduled. Reset device to apply
[04:45:34.094,800] &amp;lt;dbg&amp;gt; UPDATE_TH: fota_dl_event_handler: FOTA DOWNLOAD FINISHED
[04:45:34.094,800] &amp;lt;dbg&amp;gt; UPDATE_TH: fota_dl_event_handler: FOTA_DOWNLOAD_EVT_FINISHED
messages dropped:   1 
[04:45:34.095,100] &amp;lt;dbg&amp;gt; UPDATE_TH: fota_dl_event_handler: App download is complete!&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;MY QUESTIONS&amp;nbsp;&lt;br /&gt;&lt;br /&gt;1) when i was using&amp;nbsp;CONFIG_SHELL_BACKEND_RTT=y is enabled and debugger is connected, the device was able to downoad fota and updated to new version. why cant now?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;2)&amp;nbsp;when CONFIG_SHELL_BACKEND_RTT=y is enabled and debugger is disconnected&lt;br /&gt;why fota was not able to download the updates?&lt;br /&gt;&lt;br /&gt;3) when&amp;nbsp;CONFIG_LOG_BACKEND_RTT=y and&amp;nbsp;&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE_DROP"&gt;CONFIG_LOG_BACKEND_RTT_MODE_DROP&lt;/a&gt;=y, enabled and&amp;nbsp;CONFIG_SHELL_BACKEND_RTT=n,&amp;nbsp; even though fota update was successfully downloaded and why it is reverting to previous version?&lt;br /&gt;&lt;br /&gt;NOTE&lt;br /&gt;&lt;br /&gt;I am not calling LOG_PANIC() anywhere in my application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best Regards&lt;br /&gt;&lt;br /&gt;Praveen Deshmane&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why FOTA (application and modem) wasn't downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/thread/412985?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 11:38:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54f00384-1903-42f2-84cc-4f1c5e15fa5c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should use&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE_DROP"&gt;CONFIG_LOG_BACKEND_RTT_MODE_DROP&lt;/a&gt;=y, so please add that in any case.&lt;/p&gt;
&lt;p&gt;Can you check if you are calling&amp;nbsp;LOG_PANIC() anywhere? I do believe this call is blocking until log buffer is empty, so you may need to comment this one out.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why FOTA (application and modem) wasn't downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/thread/412936?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 09:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ca3eb4d-47a6-4ded-9f87-ff7a8bf60e2b</guid><dc:creator>Praveen Deshmane</dc:creator><description>&lt;p&gt;Hello Kenneth,&lt;br /&gt;&lt;br /&gt;Thank you for your reply.&lt;br /&gt;&lt;br /&gt;Here is the complete prf.conf file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_TRUSTED_EXECUTION_NONSECURE=y


# General config
CONFIG_REBOOT=y
CONFIG_RING_BUFFER=y

# LOGGNG
CONFIG_LOG=y
CONFIG_LOG_BUFFER_SIZE=2048
CONFIG_LOG2_MODE_DEFERRED=y
CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_LOG_DEFAULT_LEVEL=4

# Console
CONFIG_PRINTK=y
CONFIG_UART_CONSOLE=n
CONFIG_SHELL=y
CONFIG_KERNEL_SHELL=y
CONFIG_DEVICE_SHELL=y
CONFIG_POSIX_CLOCK=y
CONFIG_DATE_SHELL=y
CONFIG_SHELL_STACK_SIZE=1536
CONFIG_SHELL_BACKEND_SERIAL=n
CONFIG_SHELL_LOG_BACKEND=y
CONFIG_SHELL_RTT_LOG_LEVEL_DBG=y
CONFIG_SHELL_RTT_INIT_LOG_LEVEL_WRN=y

CONFIG_THREAD_MONITOR=y
CONFIG_INIT_STACKS=y
CONFIG_BOOT_BANNER=n
CONFIG_THREAD_NAME=y

#enable RTT shell
CONFIG_USE_SEGGER_RTT=y
CONFIG_SHELL_BACKEND_RTT=y
CONFIG_SEGGER_RTT_BUFFER_SIZE_DOWN=32

# UART
CONFIG_UART_ASYNC_API=y

# Modem library
CONFIG_NRF_MODEM_LIB=y
CONFIG_MODEM_INFO=y

CONFIG_MODEM_KEY_MGMT=y
CONFIG_DOWNLOAD_CLIENT=y


CONFIG_NEWLIB_LIBC=y

CONFIG_NEWLIB_LIBC_NANO=n

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_NETWORK_MODE_LTE_M=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

CONFIG_LTE_LOCK_BANDS=y
CONFIG_LTE_LOCK_BAND_MASK=&amp;quot;0000000001000000000000000000&amp;quot;

# Network
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y

# PDN library
CONFIG_PDN=y
CONFIG_PDN_SYS_INIT=n
CONFIG_PDN_DEFAULTS_OVERRIDE=y
CONFIG_PDN_DEFAULT_APN=&amp;quot;myapn&amp;quot;
CONFIG_PDN_DEFAULT_FAM_IPV4=y
CONFIG_PDN_DEFAULT_AUTH_CHAP=y
CONFIG_PDN_DEFAULT_USERNAME=&amp;quot;username&amp;quot;
CONFIG_PDN_DEFAULT_PASSWORD=&amp;quot;password&amp;quot;


CONFIG_AGPS_OFFLINE_FLG=y


CONFIG_HEAP_MEM_POOL_SIZE=29696

# for debug
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y

CONFIG_OPENOCD_SUPPORT=y
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_PRIVILEGED_STACK_SIZE=1024
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096


# Flash
CONFIG_SPI=y
CONFIG_FLASH=y

# I2C
CONFIG_I2C_NRFX=y
CONFIG_I2C=y

#IMU
CONFIG_SENSOR=y
CONFIG_ICM42605=y
CONFIG_ICM42605_TRIGGER_NONE=y


# json
CONFIG_JSON_LIBRARY=y

CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# for Zmod library
CONFIG_FPU=y
CONFIG_FPU_SHARING=y
CONFIG_FP_HARDABI=y

CONFIG_CPU_LOAD=y

CONFIG_DATE_TIME=y


CONFIG_APP_VERSION=&amp;quot;v0.0.4&amp;quot;

CONFIG_DEVELOP_MODE=y

CONFIG_CJSON_LIB=y
CONFIG_FOTA_DOWNLOAD=y
CONFIG_FOTA_SOCKET_RETRIES=5

#DFU 
CONFIG_DFU_TARGET=y

# MCUBOOT
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_IMG_MANAGER=y

# Image manager
CONFIG_IMG_MANAGER=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# Download client
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=2048
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_1024=y
CONFIG_DOWNLOAD_CLIENT_RANGE_REQUESTS=n
CONFIG_DOWNLOAD_CLIENT_LOG_LEVEL_DBG=y
CONFIG_DOWNLOAD_CLIENT_LOG_HEADERS=y
CONFIG_DOWNLOAD_CLIENT_TCP_SOCK_TIMEO_MS=600000 


# DFU Target
CONFIG_DFU_TARGET_STREAM=y
CONFIG_DFU_TARGET_FULL_MODEM=y

# Full modem firmware from external flash support
CONFIG_FMFU_FDEV=y
CONFIG_CDDL_GEN=y

#SPI NOR
CONFIG_SPI_NOR=y

#Stream flash
CONFIG_STREAM_FLASH=y
CONFIG_STREAM_FLASH_ERASE=y

#libmodem
CONFIG_NRF_MODEM_LIB_SYS_INIT=n

#Prevalidation is not yet supported by the modem firmware, so skip it for now.
CONFIG_FMFU_FDEV_SKIP_PREVALIDATION=n

CONFIG_NO_OPTIMIZATIONS=y
CONFIG_EXTRA_EXCEPTION_INFO=y
CONFIG_NCS_SAMPLES_DEFAULTS=n

# Crypto
CONFIG_OBERON_BACKEND=y
CONFIG_NORDIC_SECURITY_BACKEND=y
# Disable all non-used crypto
CONFIG_NRF_SECURITY_RNG=n
CONFIG_MBEDTLS_AES_C=n
CONFIG_MBEDTLS_CHACHA20_C=n
CONFIG_MBEDTLS_POLY1305_C=n
CONFIG_MBEDTLS_ECP_C=n
CONFIG_MBEDTLS_RSA_C=n
CONFIG_MBEDTLS_DHM_C=n
CONFIG_MBEDTLS_SHA1_C=n
CONFIG_MBEDTLS_SHA384_C=n
CONFIG_MBEDTLS_SHA512_C=n
CONFIG_MBEDTLS_GCM_C=n
# This is the one we need
CONFIG_MBEDTLS_SHA256_C=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I tried adding&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE_DROP"&gt;CONFIG_LOG_BACKEND_RTT_MODE_DROP&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It doesnt worked.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Praveen Deshmane&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why FOTA (application and modem) wasn't downloading the firmware updates when RTT logging was enabled and the debugger was removed</title><link>https://devzone.nordicsemi.com/thread/412818?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 16:58:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10837761-4f3e-459b-9131-0e6d5b0db17d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you make sure you are using&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE_DROP"&gt;CONFIG_LOG_BACKEND_RTT_MODE_DROP&lt;/a&gt;=y&amp;nbsp;instead of BLOCK:&amp;nbsp;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_LOG_BACKEND_RTT_MODE&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>