<?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>Saving coredump to flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87148/saving-coredump-to-flash</link><description>I&amp;#39;m trying to enable saving of coredump to flash. I&amp;#39;m running on nrf52840 with NRF SDK 1.6.1. 
 I have defined the following: 
 
 CONFIG_DEBUG_COREDUMP=y 
 CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION=y 
 CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y 
 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Sep 2023 12:08:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87148/saving-coredump-to-flash" /><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/448149?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2023 12:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47e89f16-679a-463f-af7b-20ac0152e2c4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Answered by Vidar here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/101071/saving-coredumps-to-external-flash/448143"&gt;RE: Saving coredumps to external flash&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/448009?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2023 15:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:310aa2ae-a762-488d-b5fc-ebc10d6f8590</guid><dc:creator>KLarocqueEMFluids</dc:creator><description>&lt;p&gt;No thats not an option not everyone can afford that out of the box. We should have something that is native to the chips. Its a shame that Nordic chips cant implement that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/367659?ContentTypeID=1</link><pubDate>Thu, 12 May 2022 13:48:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f04370a-e7b7-4331-85e8-6a5698a06d12</guid><dc:creator>Konstantin Klitenik</dc:creator><description>&lt;p&gt;Thanks, &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;. We will go with Memfault.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/367651?ContentTypeID=1</link><pubDate>Thu, 12 May 2022 13:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bf7e062-6151-499d-b486-886462b8166c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I got some feedback from the team. We have not heard of anyone using Zephyr&amp;#39;s built-in coredump functionality on Nordic ICs (or Arm in general), though it does seem to be supported.&lt;br /&gt; Most nRF Connect customers use memfault instead, would that be an option?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/memfault_ncs.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/memfault_ncs.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(Otherwise we will investigate using Zephyr&amp;#39;s coredump)&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Memfault&amp;#39;s integration supports storing coredumps in flash:&lt;/span&gt;&lt;br /&gt; &lt;span&gt;CONFIG_MEMFAULT_NCS_INTERNAL_FLASH_BACKED_COREDUMP&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note that memfault has its own coredump handling, it doesn&amp;#39;t use the upstream Zephyr one.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/366515?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 14:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09ade30e-9fc5-4b6e-a986-ace5f91fa87b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m checking with the developers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/365642?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2022 19:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d281f93-897b-4b14-b0ba-abe9b403741c</guid><dc:creator>joebambino</dc:creator><description>&lt;p&gt;Yes, &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt; , has there been any follow up?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/365625?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2022 15:13:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa459193-483e-4941-9ae3-a2af2813c6a5</guid><dc:creator>Konstantin Klitenik</dc:creator><description>&lt;p&gt;Any update on this? Is there a plan to support coredump to flash with BT enabled?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364327?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 20:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a11f1df-1a22-4f70-a126-daedba9cfc2d</guid><dc:creator>Konstantin Klitenik</dc:creator><description>&lt;p&gt;After more digging, it appears that the issue is with how nrf uses &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;k_sem_take()&lt;/span&gt;. According to Zephyr docs (&lt;a href="https://docs.zephyrproject.org/3.0.0/reference/kernel/synchronization/semaphores.html"&gt;https://docs.zephyrproject.org/3.0.0/reference/kernel/synchronization/semaphores.html&lt;/a&gt;), if k_sem_take is called from ISR, it must use K_NO_WAIT for timeout.&lt;/p&gt;
&lt;p&gt;However, NRF SDK uses K_FOREVER or actual timeout values in various places that are involved in the coredump. Because coredump is happening in the ISR, those timeout values are not valid. An assert gets triggered, or if asserts are disabled, I imagine Zephyr is unhappy, which is why we fail to take the semaphore.&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;__ASSERT(((arch_is_in_isr() == false) ||&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; K_TIMEOUT_EQ(timeout, K_NO_WAIT)), &amp;quot;&amp;quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;Same issue exists with mutexes.&lt;/span&gt;&amp;nbsp;&lt;/span&gt;nrf_flash_sync_exe()&lt;/span&gt; acquires a mutex but mutex lock has this assert&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;__ASSERT(!arch_is_in_isr(), &amp;quot;mutexes cannot be used inside ISRs&amp;quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364321?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 18:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9c22d72-83f1-4cf8-bb59-3ad32d3d7401</guid><dc:creator>Konstantin Klitenik</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/87148/saving-coredump-to-flash/364304#364304"]Seems like it&amp;#39;s&amp;nbsp;&lt;span&gt;stream_flash_init() that returns an error-code. Could you print the error-code, and post it here? E.g. change the line to something like this to print the value:&lt;/span&gt;[/quote]
&lt;p&gt;I traced the issue down to &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_flash_sync_exe()&lt;/span&gt; in&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;flash_sync_mpsl.c&lt;/span&gt;. The error happens when that function tries to obtain the semaphore (with my slight modification to print the status):&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;int status = k_sem_take(&amp;amp;_context.timeout_sem, K_MSEC(FLASH_TIMEOUT_MS));&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; LOG_ERR(&amp;quot;Sem take result: %d (%ld)\n&amp;quot;, status, FLASH_TIMEOUT_MS);&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; if (status &amp;lt; 0) {&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; LOG_ERR(&amp;quot;timeout&amp;quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; atomic_set(&amp;amp;_context.timeout_occured, 1);&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&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;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;This results in&amp;nbsp;&lt;/span&gt;&lt;/span&gt;EAGAIN:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp;&amp;lt;err&amp;gt; flash_sync_mpsl: Sem take result: -11 (22963)&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;/div&gt;
&lt;div&gt;I tried to play with the number of slots. I&amp;#39;ve tried 0, 1, and 2. All result in the same error.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_MPSL_TIMESLOT_SESSION_COUNT=2&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364314?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 16:47:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b652e67-4c76-44f7-8df9-4d6ed4b4c368</guid><dc:creator>Sigurd</dc:creator><description>[quote user=""]NRF SDK 1.6.1.[/quote][quote user="ST-Kon"]&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;coredump_flash_backend_start()&lt;/span&gt; adds an offset for the header but does not adjust the size but the same amount[/quote]
&lt;p&gt;I see there was a fix here recently(fixed in NCS v1.9.x), see these 2 commits:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/1dc74d70f265ab753b9ef3f00450426bc2ccf296"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/1dc74d70f265ab753b9ef3f00450426bc2ccf296&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/d5520f2e59b7d6d65bb8f4b6e848df1d46e95836"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/d5520f2e59b7d6d65bb8f4b6e848df1d46e95836&lt;/a&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: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364313?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 16:45:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff187b5-2ae3-42b0-85ce-ce934907561f</guid><dc:creator>Konstantin Klitenik</dc:creator><description>&lt;p&gt;OK, the CRC error was being caused because my defined partition size of 4k and the shell thread stack size (where I was triggering the crash from) was also 4k. This caused incomplete coredump from being written to flash. In such a case, the CRC is not being calculated correctly, it&amp;#39;s always off by 0x86. This probably should be fixed, even if incomplete coredump is saved.&lt;/p&gt;
&lt;p&gt;Once I increased the partition to be 8k, I was able to successfully read it using &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;coredump print.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So we just need to figure out how to make this work with BT enabled.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364306?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 15:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e86b5bb-c60b-4e3b-907d-f1c6e3fc2a10</guid><dc:creator>Konstantin Klitenik</dc:creator><description>&lt;p&gt;The code is&amp;nbsp;&lt;span&gt;ETIMEDOUT&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;116.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Interestingly, if I disable Bluetooth:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_BT=n&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_BT_PERIPHERAL=n&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_BT_CTLR=n&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Then I no longer see the timeout errors. It then complains about invalid parameter. Tracing that I found that because I put the coredump partition at the end of flash:&lt;/span&gt;&lt;/div&gt;
&lt;div&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;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;coredump_partition:&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; address: 0xff000&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; size: 0x1000&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; region: flash_primary&lt;/span&gt;&lt;/div&gt;
&lt;div&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;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;coredump_flash_backend_start()&lt;/span&gt; adds an offset for the header but does not adjust the size but the same amount. This causes&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;stream_flash_init()&lt;/span&gt; to fail with invalid parameter because the start address (which now includes the offset) plus size of partition is past the end of flash.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&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;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;offset = backend_ctx.flash_area-&amp;gt;fa_off; &lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; offset += ROUND_UP(sizeof(struct flash_hdr_t),&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; FLASH_WRITE_SIZE);&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&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;&lt;span&gt;After adjusting the size by the offset (&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;backend_ctx.flash_area-&amp;gt;fa_size - 0x10&lt;/span&gt;&lt;span&gt;,)&lt;/span&gt;,&amp;nbsp;&lt;/span&gt;I do see the coredump being written to flash. However, printing coredump fails because it fails CRC check. I&amp;#39;m currently trying to figure out why CRC in the header doesn&amp;#39;t match read CRC.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;In any case, we need to figure out why there is a timeout if BT is enabled. There also needs to be a bug filed to fix the size adjustment due to offset.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364304?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 15:39:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a8cbe0c-304d-4498-a22b-da0953847c75</guid><dc:creator>Sigurd</dc:creator><description>[quote user="ST-Kon"]00&amp;gt; E: Cannot start coredump![/quote]
&lt;p&gt;I see this line is being printed here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/subsys/debug/coredump/coredump_backend_flash_partition.c#L339"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/subsys/debug/coredump/coredump_backend_flash_partition.c#L339&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Seems like it&amp;#39;s&amp;nbsp;&lt;span&gt;stream_flash_init() that returns an error-code. Could you print the error-code, and post it here? E.g. change the line to something like this to print the value:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;LOG_ERR(&amp;quot;Cannot start coredump! return-value: %d&amp;quot;,ret);&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364243?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 13:14:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0963e02-372a-45c4-8994-7f2a562d5218</guid><dc:creator>Konstantin Klitenik</dc:creator><description>&lt;p&gt;Our application does use Bluetooth. I don&amp;#39;t have a sample application without Bluetooth that I can try on our board or even the DK board.&lt;/p&gt;
&lt;p&gt;We already had most of these set. The only difference was LOG_MODE. I updated LOG_MODE to be minimal but that did not make any difference. Still getting:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; =====&amp;gt; Crashing system... (this is expected crash)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: r0/a1: 0x00000003 r1/a2: 0x20013680 r2/a3: 0x00000040&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x0002532b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: xpsr: 0x41000000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: Faulting instruction address (r15/pc): 0x00042352&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: Current thread: 0x200031b0 (shell_rtt)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;// This is where it&amp;#39;s trying to dump the core to flash but is failing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: timeout&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;00&amp;gt; E: Cannot start coredump!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving coredump to flash</title><link>https://devzone.nordicsemi.com/thread/364145?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 08:45:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ffe378-cc41-4674-80c7-0223723cbf7d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You only see this issue on samples that uses Bluetooth?&lt;/p&gt;
&lt;p&gt;Could you try setting these configs? (taken&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/tests/subsys/debug/coredump_backends/prj_flash_partition.conf"&gt;from this .config file&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_DEBUG_COREDUMP=y
CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION=y
CONFIG_MP_NUM_CPUS=1
CONFIG_FLASH=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>