<?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>I2C write/ read to 16-bit register address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110309/i2c-write-read-to-16-bit-register-address</link><description>I followed this example to enable I2C for my sensor: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-6-serial-com-i2c/topic/exercise-1-6-2/ . 
 However, my sensor uses 16-bit address instead of 8-bit as in the example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Apr 2024 14:08:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110309/i2c-write-read-to-16-bit-register-address" /><item><title>RE: I2C write/ read to 16-bit register address</title><link>https://devzone.nordicsemi.com/thread/481129?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2024 14:08:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eec3860-442e-4a4b-95ac-70fd7fab8f05</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The error &amp;#39;&amp;#39;i2c_nrfx_twim: Error on I2C line occurred for message 0&amp;#39;&amp;#39; this comes from the i2c driver, more specifically our nrfx port to the zephyr I2C API.&lt;/p&gt;
&lt;p&gt;You can look this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/drivers/i2c/i2c_nrfx_twim.c#L171"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/drivers/i2c/i2c_nrfx_twim.c#L171&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/drivers/i2c/i2c_nrfx_twi.c#L126"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/drivers/i2c/i2c_nrfx_twi.c#L126&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You need to enable i2cX in device tree with this line:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;compatible = &amp;quot;nordic,nrf-twim&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The EasyDMA capable peripheral NRF_TWIM is in use, which corresponds to i2c_nrfx_twim.c&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C write/ read to 16-bit register address</title><link>https://devzone.nordicsemi.com/thread/479468?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 13:51:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff08ed7-3d42-44eb-b651-01523a673e00</guid><dc:creator>mystic_harbor</dc:creator><description>&lt;p&gt;Can you help me fix this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C write/ read to 16-bit register address</title><link>https://devzone.nordicsemi.com/thread/479271?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 14:27:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d6ec3d1-ea73-468c-bc44-e46f01c97d25</guid><dc:creator>mystic_harbor</dc:creator><description>&lt;p&gt;I did, I wasn&amp;#39;t able to find any transactions&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C write/ read to 16-bit register address</title><link>https://devzone.nordicsemi.com/thread/479268?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 14:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8858a6e5-c7a5-463f-b5d9-6d718fe24f0c</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you checked the TWI lines with a logic analyzer, to see if the expected register address is output, and if the sensor outputs any of the expected data?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>