<?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>Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94992/asset-tracker-v2---crashes-trying-to-read-non-existent-config</link><description>ncs2.1.0 
 I have one unit, that somehow works, and when I loaded the code into any other blank devices it crashes. 
 The kernel panic provides hardly any info, but I&amp;#39;m pretty sure it is related to reading the config from storage and there is nothing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Dec 2022 06:09:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94992/asset-tracker-v2---crashes-trying-to-read-non-existent-config" /><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401629?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2022 06:09:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e00b26c9-07b3-4741-9dbe-6cc85961866e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Marshall, that is good news! Happy to hear you found the root cause :)&amp;nbsp;&lt;/p&gt;
[quote user="Marshall"]Thanks for the help![/quote]
&lt;p&gt;No problem. Any time! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401615?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2022 01:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e2d4d10-ccc6-4a55-904b-af9d14ff3812</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;whew - I found it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I loaded up ncs 2.2.0 and started porting my changes across, When I got to the indication LED. it faulted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have a ws2812 LED, and am using PWM to drive it, I created a new module, that had subscribed to events, and shifted my init code into this module. this also included the init for the LED.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the AT2 was attempting to drive the LED, before it had been assigned any memory.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It was weird that it was only crashing at the settings module, and if it could read the settings, it would work fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess it was indeed a timing issue, if the unit booted fast enough, the LED would be init&amp;#39;d in the new module and all was well, if it took that teeny bit longer to search for settings it would crash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the help! really appreciate it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now to consider if I carry on porting my changes across to v2.2.0! :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Marshall&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401608?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 23:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72f4924b-b1ca-4ab7-b6c2-907cb48fa79f</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERTION FAIL [handler != ((void *)0)] @ WEST_TOPDIR/zephyr/kernel/work.c:666
[00:00:00.861,419] &amp;lt;err&amp;gt; os: r0/a1:  0x00000004  r1/a2:  0x0000029a  r2/a3:  0x00000001
[00:00:00.861,450] &amp;lt;err&amp;gt; os: r3/a4:  0x000376b1 r12/ip:  0x00000000 r14/lr:  0x0004f03b
[00:00:00.861,480] &amp;lt;err&amp;gt; os:  xpsr:  0x41000000
[00:00:00.861,480] &amp;lt;err&amp;gt; os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
[00:00:00.861,511] &amp;lt;err&amp;gt; os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
[00:00:00.861,541] &amp;lt;err&amp;gt; os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
[00:00:00.861,541] &amp;lt;err&amp;gt; os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
[00:00:00.861,572] &amp;lt;err&amp;gt; os: fpscr:  0x00000000
[00:00:00.861,572] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00055430
[00:00:00.861,602] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:00.861,633] &amp;lt;err&amp;gt; os: Current thread: 0x20013000 (sysworkq)
[00:00:00.989,868] &amp;lt;err&amp;gt; fatal_error: Resetting system
opito:~$ &amp;#253;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf 376b1&lt;br /&gt;C:/ncs/v2.1.0/zephyr/drivers/console/uart_console.c:88&lt;br /&gt;PS C:\opito\zephyr\opito_base_oct22&amp;gt; arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf 4f03b&lt;br /&gt;C:/ncs/v2.1.0/zephyr/kernel/work.c:667 (discriminator 3)&lt;br /&gt;PS C:\opito\zephyr\opito_base_oct22&amp;gt; arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf 55430&lt;br /&gt;C:/ncs/v2.1.0/zephyr/lib/os/assert.c:44&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401490?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 11:21:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d72dc962-455c-4840-a0cf-4b49efa08de3</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Are you still seeing the&amp;nbsp;ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0?&lt;br /&gt;&lt;br /&gt;If you are still seeing the error, are you seeing the same numbers at&amp;nbsp;r3/a4 and&amp;nbsp;r14/lr ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401486?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 11:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07fd814a-a354-4925-a1b6-7f3bf71c7fe3</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;I&amp;#39;ve messed around so much, I don&amp;#39;t know if the same addresses are still in the same places, hopefully it&amp;#39;s something to work with.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf 0x00037485&lt;br /&gt;C:/ncs/v2.1.0/zephyr/drivers/clock_control/clock_control_nrf.c:749&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf 0x0004ee0f&lt;br /&gt;C:/ncs/v2.1.0/zephyr/kernel/sem.c:99&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Marshall&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401485?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 11:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7c159cc-c362-4b52-ab28-f6aeab46489c</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Marshall, thanks for providing this information. This gives us more to work with.&lt;br /&gt;&lt;br /&gt;Would it be possible to also run the following&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf&amp;nbsp;0x00037485&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;arm-zephyr-eabi-addr2line.exe -e build_opito_nrf9160\zephyr\zephyr.elf&amp;nbsp;0x0004ee0f&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I will discuss the issue with our bootloader team.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401484?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 11:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc4945ad-5c00-4d9d-8018-a8041aaae443</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;it does still crash at flash_map.c:flash_read&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know what&amp;#39;s going on.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401460?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 10:11:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf0d312b-ed4b-4d56-b7ef-132446b27cee</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;Hi Oyvind&lt;/p&gt;
&lt;p&gt;Yes it is a modified version of the ATv2, I have external flash for the FOTA, allowing me almost all of the 1MB internal flash for application (except for the bootloader and the settings)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have added a couple of strings to the settings.&lt;/p&gt;
&lt;p&gt;If I put a breakpoint in flash_map.c as below and run it from boot pressing the Run each time the breakpoint is hit. the application will boot fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I disable the breakpoint and run it, it crashes. It feels like some sort of timing issue?&lt;/p&gt;
&lt;p&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/pastedimage1671530664712v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I then connect to the cloud and write some settings into the flash it all runs merrily from then on, once it can find something in the settings.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried moving the settings to external flash, but the partition manager borks when you try it, by disabling FCB and enabling NVS (all in the prj.conf file)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks Marshall&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401283?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2022 13:21:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:945b2517-c0a4-49fb-bae1-b993fb14686f</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello Marshall,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you changed anything in the Asset Tracker v2?&amp;nbsp; I&amp;#39;ve never seen this issue with the ATv2 out of the box. I will need some more information in order to try to reproduce it on my side.&lt;br /&gt;&lt;br /&gt;What devices are you using? Is this on a development kit, Thingy:91 or custom HW?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;/*----------------!!!!!!-----------*/&lt;br /&gt; /* on a blank device this disappears and causes a panic*/&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What are you basing this on? Can you provide more information?&lt;br /&gt;&lt;br /&gt;Thanks:&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker V2 - Crashes trying to read non-existent config</title><link>https://devzone.nordicsemi.com/thread/401219?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2022 11:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a9ed0ef-a7ff-40e0-b115-07eeabee8bbd</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;update - It looks like it might be a timing issue?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/26723"&gt;NULL handler in work queue entry can be called resulting in silent reboot &amp;middot; Issue #26723 &amp;middot; zephyrproject-rtos/zephyr &amp;middot; GitHub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>