<?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>Bus Fault - Precise Data bus Error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84170/bus-fault---precise-data-bus-error</link><description>Hi All, 
 We are using NCS v1.7.1 on our custom designed nRF52840 board. We have a touch screen interfaced with I2C to our device. There is one more controller connected on the same I2C bus, I will send commands to the controller via I2C to perform some</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Feb 2022 17:37:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84170/bus-fault---precise-data-bus-error" /><item><title>RE: Bus Fault - Precise Data bus Error</title><link>https://devzone.nordicsemi.com/thread/350955?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 17:37:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f46c7bff-b383-4ef4-a9a4-eacb57abb580</guid><dc:creator>Sriharsha Desai</dc:creator><description>&lt;p&gt;Hi Edvin, problem is solved. It is indeed because of accessing the BAD Pointer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bus Fault - Precise Data bus Error</title><link>https://devzone.nordicsemi.com/thread/350217?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 13:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29a467d2-50e0-425d-a2c2-ca5413b204be</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Bus faults are a bit tricky debug, but I suspect that this is caused by a bad pointer somewhere.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You probably have gcc installed somewhere on your computer (in my case it is located under C:/Program files(x86)/GNU Tools ARM Embedded\9 2019-q4-major/&lt;/p&gt;
&lt;p&gt;Inside there, there is a tool found in bin/ called arm-none-eabi-addr2line.exe Add the path to this folder to your environment variables. We will use it later.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now, if you have recompiled your project since you posted this log, please check what the log says again. Some addresses may have changed.&lt;/p&gt;
[quote user=""]Faulting instruction address (r15/pc): 0x00049350&lt;br /&gt;[/quote]
&lt;p&gt;Check what address this line is pointing to. If it is still the same address, then open a cmd window in your build folder, and use the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;arm-none-eabi-addr2line -e _build/zephyr/zephyr.elf 0x49350&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will give you a file name and a line number.&lt;/p&gt;
&lt;p&gt;You can also check addr2line on the address in your link register (LR/R14):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;arm-none-eabi-addr2line -e _build/zephyr/zephyr.elf 0x0004934b&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What you should see is that your link register will point to one function that calls the function in your r15/pc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What functions do you find here? Do you see anything that could cause the application to fault? A bad pointer? A callback function that hasn&amp;#39;t been set properly? Something trying to access a pointer that is out of bands?&lt;/p&gt;
&lt;p&gt;Perhaps you can add some logging around that place, and see whether you get some log info before the crash?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>