<?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>nrf9160 nvs controller crash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81150/nrf9160-nvs-controller-crash</link><description>Hello! 
 Following problem: 
 I try to save 100Byte uint8_t messages in the nvs on the nrf9160. 
 Sometimes it works and only some moving logs come up and sometimes the following error comes up and the controller crashes. 
 
 
 I tried to change the flash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Nov 2021 09:35:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81150/nrf9160-nvs-controller-crash" /><item><title>RE: nrf9160 nvs controller crash</title><link>https://devzone.nordicsemi.com/thread/337013?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 09:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97079e68-a020-4724-8e8e-f3d0c8621f38</guid><dc:creator>JBroemmling</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now disabled the log function because we have generally deleted most logs and will not use them later in the application.&lt;br /&gt;&lt;br /&gt;Thanks for your help!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Joshua&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 nvs controller crash</title><link>https://devzone.nordicsemi.com/thread/336602?ContentTypeID=1</link><pubDate>Fri, 29 Oct 2021 08:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecc0f8f7-4b6c-4a0c-aa93-963a32b51dbb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Joshua,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems that the logging assert is a red herring.&lt;/p&gt;
&lt;p&gt;Could you try adjusting the MAIN_STACK_SIZE to see if this is the culprit?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also run addr2line on the faulting content in R3 and LR register as well, which might tell us a bit more on where it came from. If possible, you can also attach your project (if it does not include any secret stuff).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 nvs controller crash</title><link>https://devzone.nordicsemi.com/thread/336390?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 09:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7859a30-5f5a-409c-a8bc-207c442d7ad0</guid><dc:creator>JBroemmling</dc:creator><description>&lt;p&gt;Thanks for your answer H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;the configuration was&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048&lt;/pre&gt;&amp;nbsp;before and now I tried it with&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=4096&lt;/pre&gt;&amp;nbsp;but it still crashes.&lt;/p&gt;
&lt;p&gt;And you are right, it crashes in &lt;pre class="ui-code" data-mode="text"&gt;zephyr/subsys/logging/log_core.c:1193&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Joshua&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 nvs controller crash</title><link>https://devzone.nordicsemi.com/thread/336360?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 08:40:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38564ab0-d3fc-4566-a829-d9b18e095e24</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;15:33:11.975 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,730] &#x1B;[1;31m&amp;lt;err&amp;gt; os: r0/a1:  0x00000004  r1/a2:  0x0000006d  r2/a3:  0x00000000&#x1B;[0m
15:33:12.113 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,730] &#x1B;[1;31m&amp;lt;err&amp;gt; os: r3/a4:  0x0002bc5d r12/ip:  0x20016f10 r14/lr:  0x00029c0f&#x1B;[0m
15:33:12.205 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,761] &#x1B;[1;31m&amp;lt;err&amp;gt; os:  xpsr:  0x41000000&#x1B;[0m
15:33:12.297 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,761] &#x1B;[1;31m&amp;lt;err&amp;gt; os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000&#x1B;[0m
15:33:12.435 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,761] &#x1B;[1;31m&amp;lt;err&amp;gt; os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000&#x1B;[0m
15:33:12.572 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,791] &#x1B;[1;31m&amp;lt;err&amp;gt; os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000&#x1B;[0m
15:33:12.664 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,791] &#x1B;[1;31m&amp;lt;err&amp;gt; os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000&#x1B;[0m
15:33:12.803 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,822] &#x1B;[1;31m&amp;lt;err&amp;gt; os: fpscr:  0x00000000&#x1B;[0m
15:33:12.895 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,852] &#x1B;[1;31m&amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0004c748&#x1B;[0m
15:33:12.988 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,852] &#x1B;[1;31m&amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0&#x1B;[0m
15:33:13.080 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:18.517,913] &#x1B;[1;31m&amp;lt;err&amp;gt; os: Current thread: 0x20016988 (logging)&#x1B;[0m
15:33:13.174 -&amp;gt; &#x1B;[4D&#x1B;[J[00:01:20.992,645] &#x1B;[1;31m&amp;lt;err&amp;gt; fatal_error: Resetting system&#x1B;[0m&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This shows that it is your logging thread that is causing the fault.&lt;/p&gt;
&lt;p&gt;In general, you can use arm-none-eabi-addr2line -e build-folder/zephyr/zephyr.elf 0xFAULTINGADDR to resolve the address to a source file and line number. In this case, I suspect the logging thread is running out of memory.&lt;/p&gt;
&lt;p&gt;Could you try adjusting the logging thread stack via this config?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>