<?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>v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112851/v2-6-1-and-2-6-0-kernel-panic-in-sysworkq</link><description>Code runs fine in v2.53 but when running in v2.6, we get a kernel panic at the exit of a delayable workqueue function. 
 Tracing the code and line number, it dies in Zephyr. No idea where to go from here so any help would be appreciated. 
 ASSERTION FAIL</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Aug 2024 13:29:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112851/v2-6-1-and-2-6-0-kernel-panic-in-sysworkq" /><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/498474?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 13:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a5e75d4-4cd5-4400-902e-1cb8cd3b6048</guid><dc:creator>JyriLehtinen</dc:creator><description>&lt;p&gt;What a coincidence &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f603.svg" title="Smiley"&gt;&amp;#x1f603;&lt;/span&gt;&lt;br /&gt;Perhaps the issue is only in the LIS2DH driver.&lt;br /&gt;&lt;br /&gt;Anyhow, change&amp;nbsp;&lt;span&gt;int1-gpio-config to&amp;nbsp;&amp;lt;LIS2DH_DT_GPIO_INT_HIGH&amp;gt; (translates to value 3), that is actually more correct way for the interrupt trigger anyway, as if it remains high after processing the interrupt without ever falling down, there could be another interrupt to process. This should probably never happen but *in theory*...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/498472?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 13:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4d21ce2-2ec7-4d75-bdc0-f978903e8f85</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;We are still getting the error when we turn assert back on. We are using the LIS2DH as well. It appears to happen on another interrupt but here are the additions we made to devicetree. Is this correct?&lt;/p&gt;
&lt;p&gt;lis2dh: lis2dh@18 {&lt;br /&gt; compatible = &amp;quot;st,lis2dh&amp;quot;;&lt;br /&gt; reg = &amp;lt;0x18&amp;gt;;&lt;br /&gt; irq-gpios = &amp;lt;&amp;amp;gpio0 31 GPIO_ACTIVE_HIGH&amp;gt;,&lt;br /&gt; &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_HIGH&amp;gt;;&lt;br /&gt; int1-gpio-config = &amp;lt;LIS2DH_DT_GPIO_INT_EDGE_BOTH&amp;gt;;&lt;br /&gt; int2-gpio-config = &amp;lt;LIS2DH_DT_GPIO_INT_EDGE_BOTH&amp;gt;;&lt;br /&gt; disconnect-sdo-sa0-pull-up;&lt;br /&gt; };&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/498384?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 06:46:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:399d5bc3-80bb-47cc-9d89-72336d98ea76</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/jyrilehtinen"&gt;JyriLehtinen&lt;/a&gt;&amp;nbsp;Thanks for clarifying!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/nautdesigner"&gt;NautDesigner&lt;/a&gt;&amp;nbsp; have you had any success in finding a solution over the summer break? Could the solution be similar to the suggestion above?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/498195?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 07:50:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a066efb-af7a-4fcf-8bea-4ce9ab106eb8</guid><dc:creator>JyriLehtinen</dc:creator><description>&lt;p&gt;No,&amp;nbsp;we&amp;#39;re not working together.&lt;br /&gt;We solved our problem with the int1-gpio-config -parameters as described above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/498184?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 07:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07175046-4491-496a-9486-1f6e97234627</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/jyrilehtinen"&gt;JyriLehtinen&lt;/a&gt;&amp;nbsp;are you working on the same application as &lt;a href="https://devzone.nordicsemi.com/members/nautdesigner"&gt;NautDesigner&lt;/a&gt;&amp;nbsp;? If so, have you been able to solve the issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/496218?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 12:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d509a2ef-116f-444b-b4e1-b6f1d6af1413</guid><dc:creator>JyriLehtinen</dc:creator><description>&lt;p&gt;Alright, the issue was not present in the LIS2DH sample, but is in our production application, and for some reason the sensor driver doesn&amp;#39;t handle the interrupts correctly, resulting in the assertion failure:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERTION FAIL [(flags &amp;amp; ((1U &amp;lt;&amp;lt; 21) | (1U &amp;lt;&amp;lt; 22))) != 0U] @ WEST_TOPDIR/zephyr/include/zephyr/drivers/gpio.h:883
   Must either enable or disable interrupts&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The 2.6.1 LIS2DH devicetree binding has new properties,&amp;nbsp;&lt;strong&gt;int1-gpio-config&lt;/strong&gt; and&amp;nbsp;&lt;strong&gt;&lt;span&gt;int2-gpio-config&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;, setting them to &lt;strong&gt;&amp;lt;3&amp;gt;&lt;/strong&gt;&amp;nbsp;(LIS2DH_DT_GPIO_INT_LEVEL_HIGH) fixes the issue. A value of &lt;strong&gt;&amp;lt;0&amp;gt;&lt;/strong&gt; results in the assert failure, I assume it&amp;#39;s the default value.&lt;br /&gt;&lt;br /&gt;EDIT: I noticed the LIS2DH sample did not have assert enabled, setting&amp;nbsp;&lt;strong&gt;CONFIG_ASSERT=y&lt;/strong&gt; replicated the assertion fail without the proper int-gpio-config setting. Seems to run just fine without the assert.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/495530?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2024 05:58:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a20ecdb-8a8f-44e3-a503-71de45029b82</guid><dc:creator>JyriLehtinen</dc:creator><description>&lt;p&gt;Our application is using the ST&amp;#39;s LIS2DH on SPI bus with the Zephyr drivers, and it works fine on SDK version 2.5.1, but with 2.6.1 it causes the same assert error.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Still looking in to it, might have more information later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/493605?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2024 09:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af1d0e24-a4de-4366-9f22-176c5c863c51</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const struct gpio_dt_spec status = GPIO_DT_SPEC_GET_OR(SW3_NODE, gpios, {0});
gpio_pin_configure_dt(&amp;amp;status, GPIO_INPUT);

void statusCallback(const struct device *dev, struct gpio_callback *cb, uint32_t pins) {

//printk(&amp;quot;*****\nCallback\n*****\n&amp;quot;);
   if (gpio_pin_get_dt(&amp;amp;status)) {
      setStatusLED(true);
      //printk(&amp;quot;** Status LED On **\n&amp;quot;);
   } else {
      setStatusLED(false);
      //printk(&amp;quot;** Status LED Off **\n&amp;quot;);
   }
//printk(&amp;quot;* Leaving callback *\n&amp;quot;);
}

   int ret = gpio_pin_interrupt_configure_dt(&amp;amp;status, GPIO_INT_EDGE_BOTH); // edge falling is just an example.. you should set it what you need it to be
   if (ret != 0) {
      printk(&amp;quot;Error %d: failed to configure interrupt pin %d\n&amp;quot;, ret, status.pin);
   } else {
      gpio_init_callback(&amp;amp;fix_cb, statusCallback, BIT(status.pin));
      gpio_add_callback(status.port, &amp;amp;fix_cb);
   }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/493570?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2024 07:23:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad9df6db-0070-44e4-858d-0ac003ffb1fe</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thanks for sharing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From&amp;nbsp;\zephyr\include\zephyr\drivers\gpio.h&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * @brief Configure pin interrupts from a @p gpio_dt_spec.
 *
 * This is equivalent to:
 *
 *     gpio_pin_interrupt_configure(spec-&amp;gt;port, spec-&amp;gt;pin, flags);
 *
 * The &amp;lt;tt&amp;gt;spec-&amp;gt;dt_flags&amp;lt;/tt&amp;gt; value is not used.
 *
 * @param spec GPIO specification from devicetree
 * @param flags interrupt configuration flags
 * @return a value from gpio_pin_interrupt_configure()
 */
static inline int gpio_pin_interrupt_configure_dt(const struct gpio_dt_spec *spec,
						  gpio_flags_t flags)
{
	return gpio_pin_interrupt_configure(spec-&amp;gt;port, spec-&amp;gt;pin, flags);
}&lt;/pre&gt;&lt;/p&gt;
[quote user="NautDesigner"]int ret = gpio_pin_interrupt_configure_dt(&amp;amp;status, GPIO_INT_EDGE_BOTH);[/quote]
&lt;p&gt;What is &amp;amp;status pointing to in your case?&lt;br /&gt;&lt;br /&gt;Are you able to share more of your code around the interrupt configuration?&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: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/493188?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 13:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d22c20df-7a0d-4991-9f4c-85c258f9c7c3</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;int ret = gpio_pin_interrupt_configure_dt(&amp;amp;status, GPIO_INT_EDGE_BOTH);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/493183?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 13:46:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9990b9a8-c528-463b-9dbe-dd2dd6950a95</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;How are you calling&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;gpio_pin_interrupt_configure() i.e. what flags are you setting. This seems to be due to given function not having either&amp;nbsp;GPIO_INT_DISABLE&amp;nbsp;or&amp;nbsp;GPIO_INT_ENABLE.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/492918?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 09:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1e34f41-bcde-4c41-8dc0-8ec716f6d209</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt; D:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e .\build\zephyr\zephyr.elf 0x00045d93
D:/ncs/v2.6.1/zephyr/include/zephyr/drivers/gpio.h:883&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/492913?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 09:23:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5b9f719-5c9f-4c94-98da-af353fa5547d</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user=""]ASSERTION FAIL @ WEST_TOPDIR/zephyr/include/zephyr/drivers/gpio.h:883[/quote]
&lt;p&gt;The line it is referring to in this file is:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;__ASSERT&lt;/span&gt;&lt;span&gt;((flags &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt; (GPIO_INT_DISABLE &lt;/span&gt;&lt;span&gt;|&lt;/span&gt;&lt;span&gt; GPIO_INT_ENABLE)) &lt;/span&gt;&lt;span&gt;!=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0U&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;Must either enable or disable interrupts&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;Line 44 in assert.c does not provide any good information, other than &lt;code&gt;k_panic()&lt;/code&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you run addr2line on address&amp;nbsp;&lt;span&gt;0x00045d0b as well?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/492903?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 09:04:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2405b097-1de8-458d-a09e-6b274db0950b</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;Deleted all build folders and rebuilt the application.&lt;pre class="ui-code" data-mode="text"&gt;D:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e .\build\zephyr\zephyr.elf 0x000668c2
D:/ncs/v2.6.1/zephyr/lib/os/assert.c:44&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: v2.6.1 (and 2.6.0) Kernel Panic in sysworkq</title><link>https://devzone.nordicsemi.com/thread/492884?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 07:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89e8e8bc-2b0e-4bfa-95bf-ceb16a5551f3</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please provide the output&amp;nbsp;&lt;code&gt;C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-addr2line.exe -e /build/zephyr/zephyr.elf&amp;nbsp;&lt;span&gt;0x2000fb38&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;in command line ? Make sure to point to correct path of your toolchain folder&amp;nbsp;cf2149caf2.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If this does not work, please try with address 0x00045d0b&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This should give some indication of what is causing this fatal error. What happens if you remove the build folder completely?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>