<?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>Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71837/configuring-two-sensor-on-same-i2c-bus-in-zephyr-rtos</link><description>I have a sensor board with two sensor on same i2c bus connected to NRF52840. I am running nrf connect sdk (1.4.2). Both sensors give data independently, however when I merge it to a single code calling all necessary functions it initiate the both; channel_get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Jul 2023 10:19:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71837/configuring-two-sensor-on-same-i2c-bus-in-zephyr-rtos" /><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/438720?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2023 10:19:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51e54581-40a4-4a9e-a976-7d5806839ef1</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I do not see the author dropped their code here, so it seems this thread ended up incomplete.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/438628?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 20:34:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6150d96c-e309-4909-bb65-7b381a1a8e68</guid><dc:creator>swood</dc:creator><description>&lt;p&gt;Can you drop your code for this as an example? I&amp;#39;m trying to do the same thing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/382957?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 16:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbafa194-095b-4d21-accc-9af377d24ade</guid><dc:creator>AviveScott</dc:creator><description>&lt;p&gt;Have this been answered yet? I am using an NRF5340 with SDK 2.0.0. I am trying to tie 2 I2C ports to a single instantiation of i2c2 and would appreciate a sample implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/306386?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 14:18:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e69a92f6-450c-4139-95c9-d9c4f1e45cc0</guid><dc:creator>Bruno Saraiva</dc:creator><description>&lt;p&gt;Were you able to get this solved?&lt;br /&gt;I find it&amp;nbsp;surprising that any &amp;quot;I2C for dummies&amp;quot; document out there will show that one of the main features of an I2C bus is the possibility of using multiple devices in the same lines, simply using different addresses. And yet, this basic concept is not covered by any of the examples, and I see many posters having trouble to get things working properly sharing an I2C bus with more than one device using Zephyr. Particularly for the nRF5x chips, which are quite limited in I2C communication ports, this feature should be the second example in the book of their I2C sample codes!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/296170?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 09:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85350345-f6b7-4224-a65e-44cbf5be1189</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You need to have different gpio pins for SCL for driving two instances differently. You cannot drive the two instances using same SCL, else both will try to own the SDA pin at the same time.&lt;/p&gt;
&lt;p&gt;Can you show me some code snippets on how you initialized your twi code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/296149?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 07:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9c49592-35b1-4e7c-8fdc-6e7f07034b52</guid><dc:creator>new</dc:creator><description>&lt;p&gt;I am able to get the data from two sensor, by configuring it in a different lines i2c0 and i2c1, then configure the&amp;nbsp;devices separately. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/296145?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 07:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a384da31-0886-44cd-b2b9-f658ac7622dd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I do not think we have an example of using two instances of I2C in one example. Have you started to debug and see which part of the transaction gets stuck in the driver? Can you see that the initialization of the two instances went through without any errors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring two sensor on same i2c bus in Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/295462?ContentTypeID=1</link><pubDate>Sun, 21 Feb 2021 12:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be0a8a78-279a-4df7-abba-4ab024c49fc1</guid><dc:creator>new</dc:creator><description>&lt;p&gt;I have tried all different combinations of zephyr configuration to define two instances of i2c for two sensors, but unable to get data from both. Is there any example or guide to get two instances of twi with zephyr over nrf52840? Suggestions&amp;nbsp;would be really helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>