<?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 in i2c and peripheral UART sample code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117276/bus-fault-in-i2c-and-peripheral-uart-sample-code</link><description>Hi team, 
 
 I am using ncsv2.8.0, on our custom designed nrf52832 board. 
 Here I am trying to integrate i2c driver code for bme688 along with bsec library in peripheral_uart sample code. 
 I am able to compile but when I am trying to run the code, I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Dec 2024 09:51:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117276/bus-fault-in-i2c-and-peripheral-uart-sample-code" /><item><title>RE: Bus fault in i2c and peripheral UART sample code</title><link>https://devzone.nordicsemi.com/thread/515061?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2024 09:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6c51a14-dfd2-469a-a4bc-a4c3a87612a0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;First, there are a lot (!) of compiler errors in your application. You should fix those. most of them are unused parameters and functions, which are ok, but you have a lot of undeclared functions that are being used.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also struggle to understand your application flow. It seems to be your i2c write function that is not working.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Particularly, this happens in:&lt;/p&gt;
&lt;p&gt;Bsec_Iface_Init() -&amp;gt; bme68x_init() -&amp;gt;&amp;nbsp;bme68x_soft_reset() -&amp;gt;&amp;nbsp;bme68x_set_regs() -&amp;gt;&amp;nbsp;rslt = dev-&amp;gt;write() (bme68x_i2c_write())&lt;/p&gt;
&lt;p&gt;in your i2c_burst_write_dt() the first parameter should be pointing to your I2C instance from devicetree. From what I can tell, you are using &amp;quot;i2c_dev&amp;quot;, coming from inft_ptr-&amp;gt;config-&amp;gt;i2c, but your inft_ptr is just a pointer being set to BME68X_I2C_ADDR_LOW (=0x76) in&amp;nbsp;bme68x_interface_init(). This needs to point to the I2C instance from devicetree. Try this instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(i2c_burst_write_dt(&amp;amp;dev_i2c, reg_addr, reg_data, len)){&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in bme68x_i2c_write().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t get it working, but I don&amp;#39;t have the sensor that you have. I recommend you have a look at the DevAcademy&amp;#39;s NCS Fundamentals course, and particularly the exercise on I2C:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-6-serial-com-i2c/topic/exercise-1-6-2/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-6-serial-com-i2c/topic/exercise-1-6-2/&lt;/a&gt;&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><item><title>RE: Bus fault in i2c and peripheral UART sample code</title><link>https://devzone.nordicsemi.com/thread/514841?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 07:42:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4eba851-e1a3-4c2e-849e-963dae79234b</guid><dc:creator>Mushtakh Shaikh</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7103.peripheral_5F00_uart.zip"&gt;devzone.nordicsemi.com/.../7103.peripheral_5F00_uart.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>