<?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>LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73268/lis2dh-trigger-giving-z_arm_mpu_fault-lis2</link><description>Running the Zephyr LIS2DH sample program on a custom board works fine until I configure it to use the trigger and then it throws the z_arm_mpu_fault() error. It doesn&amp;#39;t matter if I have it use it&amp;#39;s own thread or the global thread. 
 Any idea what could</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 May 2021 10:21:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73268/lis2dh-trigger-giving-z_arm_mpu_fault-lis2" /><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/308132?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 10:21:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29f3c728-3aba-4f8c-bc3e-115c299a9c33</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/308045?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 03:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd1b0926-0fc4-4506-995e-a6cce87270f1</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;FYI opened a bug about this:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/34794"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/34794&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think previously if INT2 was not defined, it would fail gracefully. Something in the device tree API has changed which causes Zephyr to fault.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/305231?ContentTypeID=1</link><pubDate>Fri, 16 Apr 2021 08:35:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b07023f3-f970-45ce-81e7-357f3862b593</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Yes, that&amp;#39;s how you do it. Check how it&amp;#39;s done here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.4.99-ncs2/boards/arm/nrf9160_innblue21/nrf9160_innblue21_common.dts#L98"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.4.99-ncs2/boards/arm/nrf9160_innblue21/nrf9160_innblue21_common.dts#L98&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is often helpful to search trough NCS/Zephyr to figure out how stuff are done, either by using the search tools of an IDE, or the &lt;code&gt;git grep&lt;/code&gt; command. Now I simply typed in &lt;code&gt;git grep irq-gpios&lt;/code&gt; in the Zephyr repo and found the above.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/304913?ContentTypeID=1</link><pubDate>Wed, 14 Apr 2021 16:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25631e48-2180-47f3-9fa1-b7e6a213465a</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;How do you specify the 2nd interrupt pin? By adding a comma after the first irq-gpios?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/304912?ContentTypeID=1</link><pubDate>Wed, 14 Apr 2021 16:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a281c03-4aef-4942-8033-d316102d7150</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It seems like you got help with this here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/73838/lis2dh-int1-triggers-on-nrf9160"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/73838/lis2dh-int1-triggers-on-nrf9160&lt;/a&gt;. Should we close this case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/304148?ContentTypeID=1</link><pubDate>Sun, 11 Apr 2021 19:29:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:193f9f9a-5e69-4c0e-abeb-7f417b18a794</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;It turns out INT1 AND INT2 need to be specified in the .dts board file. How do you specify a second interrupt?&lt;/p&gt;
&lt;p&gt;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 12 0&amp;gt;; // GPIO_ACTIVE_HIGH&amp;gt;;&lt;br /&gt; label = &amp;quot;LIS2DH&amp;quot;;&lt;br /&gt; };&lt;/p&gt;
&lt;p&gt;Additionally, the Zephyr driver does not support motion sensing on INT1. After making some changes to the driver code, this still isn&amp;#39;t working. I&amp;#39;ll open another ticket in regards to this issue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302445?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 17:00:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e64164d4-8396-48f5-bc64-6cb6e94ae56c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It would be useful to see what&amp;#39;s happening on some higher abstraction layers (&lt;span&gt;string.c:147 is at the bottom of the stack&lt;/span&gt;). Try to do some &lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-4-0#h131sk0f71xdy1hliuda1vq9p8n11weqgr"&gt;debugging&lt;/a&gt; (put a breakpoint at &lt;span&gt;string.c:147&lt;/span&gt;) or simply add some logs (printk()) in the source files located in&amp;nbsp;zephyr\drivers\sensor\lis2dh (put logs in the init functions, which runs before main) to figure out where it fails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302403?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 14:09:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffcbd9f0-adf3-4505-98a8-bc4be67c286c</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;$ /c/Users/Paul/ncs/v1.5.0/toolchain/opt/bin/arm-none-eabi-addr2line -e zephyr.elf 0x00013052&lt;br /&gt;C:/Users/Paul/ncs/v1.5.0/zephyr/lib/libc/minimal/source/string/string.c:147&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5824.config.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8877.zephyr.dts"&gt;devzone.nordicsemi.com/.../8877.zephyr.dts&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302397?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 13:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8986e9da-161a-4776-8fa4-fac739133fcd</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cd &lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt;sample&lt;/span&gt;&lt;span&gt;&amp;gt;/&amp;lt;build folder&amp;gt;/zephyr&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;addr2line -e zephyr.elf&amp;nbsp;0x00013052&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;I guess: &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&amp;lt;sample&amp;gt;=&amp;lt;ncs locatiopn&amp;gt;\zephyr\samples\sensor\lis2dh&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&amp;lt;build folder&amp;gt;=build&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Could you also show me how you have configured&amp;nbsp;LIS2DH and the interrupt pin in the device tree. Upload the file &amp;lt;sample&amp;gt;/&amp;lt;build folder&amp;gt;/zephyr/zephyr.dts.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302373?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 13:13:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4771b64e-7aee-433c-9ff7-0cf96f913a8b</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;I made the following change:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_MAIN_STACK_SIZE=8192&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have the debugger stopping on the first line of main.c but it dies before then.&lt;/p&gt;
&lt;p&gt;I was able to get more data this time:&lt;/p&gt;
&lt;p&gt;[00:02:53.252,136] [1;31m&amp;lt;err&amp;gt; os: Exception occurred in Secure State[0m&lt;br /&gt;[00:02:53.259,063] [1;31m&amp;lt;err&amp;gt; os: ***** HARD FAULT *****[0m&lt;br /&gt;[00:02:53.264,862] [1;31m&amp;lt;err&amp;gt; os: Fault escalation (see below)[0m&lt;br /&gt;[00:02:53.271,423] [1;31m&amp;lt;err&amp;gt; os: ***** BUS FAULT *****[0m&lt;br /&gt;[00:02:53.277,160] [1;31m&amp;lt;err&amp;gt; os: Precise data bus error[0m&lt;br /&gt;[00:02:53.283,172] [1;31m&amp;lt;err&amp;gt; os: BFAR Address: 0x50008158[0m&lt;br /&gt;[00:02:53.289,367] [1;31m&amp;lt;err&amp;gt; os: r0/a1: 0x00000000 r1/a2: 0x00013ff2 r2/a3: 0x00000000[0m&lt;br /&gt;[00:02:53.298,492] [1;31m&amp;lt;err&amp;gt; os: r3/a4: 0xffffffff r12/ip: 0x0000000a r14/lr: 0x000112b3[0m&lt;br /&gt;[00:02:53.307,617] [1;31m&amp;lt;err&amp;gt; os: xpsr: 0x21000000[0m&lt;br /&gt;[00:02:53.313,079] [1;31m&amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00013052[0m&lt;br /&gt;[00:02:53.321,380] [1;31m&amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0[0m&lt;br /&gt;[00:02:53.329,559] [1;31m&amp;lt;err&amp;gt; os: Current thread: 0x20010178 (unknown)[0m&lt;br /&gt;[00:02:53.356,689] [1;31m&amp;lt;err&amp;gt; os: Halting system[0m&lt;br /&gt;[00:00:00.001,953] [0m&amp;lt;inf&amp;gt; lis2dh: int1 on GPIO_0.06&lt;/p&gt;
&lt;p&gt;Debugger shows it stopping here:&lt;/p&gt;
&lt;p&gt;SECTION_SUBSEC_FUNC(TEXT,__fault,z_arm_exc_spurious)&lt;/p&gt;
&lt;p&gt;mrs r0, MSP&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302324?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 09:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5cdcb89-d83e-4a67-afae-d8ec545cbefa</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Is that all the log you got? Did you not get &amp;quot;&lt;em&gt;Faulting instruction address (r15/pc):&amp;nbsp;&lt;span&gt;&amp;lt;faulting address&amp;gt;&lt;/span&gt;&lt;/em&gt;&amp;quot;? That should tell you exactly what line of code that is failing, by using&amp;nbsp;&lt;span&gt;addr2line -e zephyr.elf &amp;lt;faulting address&amp;gt;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302263?ContentTypeID=1</link><pubDate>Sun, 28 Mar 2021 20:45:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2682391-0a30-4af4-b859-c1ec8f382829</guid><dc:creator>NautDesigner</dc:creator><description>&lt;p&gt;Turning on those settings I get the following:&lt;/p&gt;
&lt;p&gt;[00:00:00.203,613] [0m&amp;lt;inf&amp;gt; lis2dh: int1 on GPIO_0.06[0m&lt;br /&gt;[00:00:00.204,071] [1;31m&amp;lt;err&amp;gt; os: Exception occurred in Secure State[0m&lt;br /&gt;[00:00:00.204,528] [1;31m&amp;lt;err&amp;gt; os: ***** HARD FAULT *****[0m&lt;br /&gt;[00:00:00.204,925] [1;31m&amp;lt;err&amp;gt; os: Fault escalation (see below)[0m&lt;br /&gt;[00:00:00.205,383] [1;31m&amp;lt;err&amp;gt; os: ***** BUS FAULT *****[0m&lt;br /&gt;[00:00:00.205,780] [1;31m&amp;lt;err&amp;gt; os: Precise data bus error[0m&lt;br /&gt;[00:00:00.206,207] [1;31m&amp;lt;err&amp;gt; os: BFAR Address: 0x50008158[0m&lt;br /&gt;[00:00:00.206,665] [1;31m&amp;lt;err&amp;gt; os: r0/a1: 0x00000000 r1/a2: 0x000485ac r2/a3: 0x00000000[0m&lt;br /&gt;[00:00:00.207,275] [1;31m&amp;lt;err&amp;gt; os: r3/a4: 0x00000001 r12/ip: 0x0000a000 r14/lr: 0x0003620d[0m&lt;br /&gt;[00:00:00.207,916] [1;31m&amp;lt;err&amp;gt; os: xpsr: 0x21000000[0m&lt;br /&gt;[00:00:00.208,343] [1;31m&amp;lt;err&amp;gt; os: s[ 0]: 0x00000000 s[ 1]: 0x00000000 s[ 2]: 0x00000000 s[ 3]: 0x00000000[0m&lt;br /&gt;[00:00:00.209,106] [1;31m&amp;lt;err&amp;gt; os: s[ 4]: 0x00000000 s[ 5]: 0x00000000 s[ 6]: 0x00000000 s[ 7]: 0x00000000[0m&lt;br /&gt;[00:00:00.209,838] [1;31m&amp;lt;err&amp;gt; os: s[ 8]: 0x00000000[00:00:00.203,338] [0m&amp;lt;inf&amp;gt; lis2dh: int1 on GPIO_0.06[0m&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LIS2DH Trigger Giving z_arm_mpu_fault()LIS2</title><link>https://devzone.nordicsemi.com/thread/302261?ContentTypeID=1</link><pubDate>Sun, 28 Mar 2021 19:58:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0066e83b-1de7-4a83-9796-76cff339c5f6</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you try set CONFIG_LOG=y, and CONFIG_RESET_ON_FATAL_ERROR=n. Then check the log to see the line that caused the issue (use &lt;span&gt;addr2line&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;The issue may be due to a stack overflow, check out the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72986/stack-overflow"&gt;ticket&amp;nbsp;Stack Overflow&lt;/a&gt;&amp;nbsp;for more information how to resolve the issue then.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>