<?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 function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76764/i2c-function-sdk-v1-6-0-rc2</link><description>Hello, 
 I need to connect a custom I2C device to the nRF52-DK, and I am using the sdk v1.6.0-rc2. 
 I am new to this development environment and I don&amp;#39;t know how to initialize I2C and what functions to use to write / read a register with I2C. 
 There</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Dec 2021 18:43:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76764/i2c-function-sdk-v1-6-0-rc2" /><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/344846?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 18:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ec404db-c11d-4b73-856b-e8b92bc4f748</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Thanks, Swathy.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I was able to make I2C work with my sensor. My sensor works at 50kbps, so I had to change the register in SDK.&lt;/p&gt;
&lt;p&gt;I am using nRF Connect SDK 1.8.0 and I changed the register (TWIM_FREQUENCY_FREQUENCY_K100) value in nrf52_bitfields.h and it worked for me.&lt;/p&gt;
&lt;p&gt;But this&amp;nbsp;change is outside my application i.e. if I&amp;nbsp;migrate to&amp;nbsp;new SDK later on then I&amp;#39;ll need to do change in that SDK as well.&amp;nbsp;So, I was just wondering if there is a way to change this register from my application itself?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/344833?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 16:07:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0b302b8-ffd2-481a-8899-74cb555dc53a</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is the &lt;a href="https://github.com/crfosse/ncs_projects/tree/main/peripheral_zephyr/i2c"&gt;updated link&lt;/a&gt; to the sample git code that Heidi shared. Kindly refer it.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/344442?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 19:15:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faf248a4-a0b7-430d-a1dd-e964c6bdb9d9</guid><dc:creator>embeddedER</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;There,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am also trying to do similar thing&amp;nbsp;by connecting nRFDK with my custom sensor which is using I2C (bit-bang).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you folks have this working can anyone share the sample code? I don&amp;#39;t find I2C sample in even the latest 1.8.0 nRF Connect SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, Heidi, the link which you shared for sample git code is not reachable.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any help would be great.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/317403?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 08:42:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94b38269-353b-4517-8f81-7cc5339dfde1</guid><dc:creator>Fb62</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have solved&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I add in the&amp;nbsp; prj.conf&lt;/p&gt;
&lt;p&gt;CONFIG_I2C=y&lt;/p&gt;
&lt;p&gt;and now get the device.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/317293?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 15:24:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59485b31-76aa-49e1-9ee8-0637f1ce8bf0</guid><dc:creator>Fb62</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;when i call:&lt;/p&gt;
&lt;div class="author"&gt;
&lt;div class="avatar"&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/heidi"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;i2c_dev = device_get_binding(&amp;quot;I2C_1&amp;quot;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I get error bindig failed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Where are defined the device NAME?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fausto&lt;/span&gt;&lt;/p&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/317275?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 14:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd6838de-4bd6-4833-acb9-048c0a5256c0</guid><dc:creator>Fb62</dc:creator><description>&lt;p&gt;Hi Heidi,&lt;/p&gt;
&lt;p&gt;I try whit&amp;nbsp; using the sample.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Fausto&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C function sdk v1.6.0-rc2</title><link>https://devzone.nordicsemi.com/thread/317272?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 14:23:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d88512c5-1713-49fa-8165-1ac430ae60a3</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, we don&amp;#39;t have any official basic I2C samples available in NCS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But a colleague of mine has&amp;nbsp;&lt;a href="https://github.com/crfosse/ncs_projects/tree/main/peripheral/i2c"&gt;this I2C sample&lt;/a&gt;&amp;nbsp;on his private GitHub, a simple I2C scanner for the nRF5340 DK or the nRF9160 DK. It should be easy enough to port to the nRF52 DK you are using.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I recommend starting with taking a look at the I2C documentation available in Zephyr (see&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/peripherals/i2c.html"&gt;Peripherals I2C&lt;/a&gt;). And also take a look at how the Devicetree works (see&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/howtos.html#devicetree-howtos"&gt;Devicetree HOWTOs&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The functions used to configure the I2C driver.&lt;/p&gt;
&lt;p&gt;i2c_dev = device_get_binding(&amp;quot;I2C_1&amp;quot;);&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/peripherals/i2c.html#c.i2c_configure"&gt;i2c_configure&lt;/a&gt;(i2c_dev, dev_config);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And then&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/peripherals/i2c.html#c.i2c_transfer"&gt;i2c_transfer&lt;/a&gt;() to perform the data transfer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>