<?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>How to I2C</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98538/how-to-i2c</link><description>Hello, 
 I want to control a CODEC via I2C. 
 I implemented the software following the DevAcademy below. 
 I2C Driver – Nordic Developer Academy (nordicsemi.com) 
 But I get the following build error: 
 C:\ncs\v2.3.0\zephyr\include\zephyr\device.h:83</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Apr 2023 06:49:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98538/how-to-i2c" /><item><title>RE: How to I2C</title><link>https://devzone.nordicsemi.com/thread/420388?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 06:49:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0a62d51-9aca-41f8-baf2-f130af2fd8f8</guid><dc:creator>gocchan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you, build was successful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to I2C</title><link>https://devzone.nordicsemi.com/thread/419562?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 08:20:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c210dcf1-c13f-4328-9d9e-1b0725002a46</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try moving &amp;quot;status = &amp;quot;okay&amp;quot;;&amp;quot; one step up?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2cX {
    status = &amp;quot;okay&amp;quot;;
    ...
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, since you are using ncs v2.x, you should use pinctrl for defining your pins. Here&amp;#39;s an example of using I2C1, with P1.02/P1.03 as the pinout:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	i2c1_default: i2c1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 1, 2)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 1, 3)&amp;gt;;
		};
	};

	i2c1_sleep: i2c1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 1, 2)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 1, 3)&amp;gt;;
			low-power-enable;
		};
	};
};

&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c1_sleep&amp;gt;;
	...
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to I2C</title><link>https://devzone.nordicsemi.com/thread/419467?ContentTypeID=1</link><pubDate>Sun, 09 Apr 2023 22:55:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e87ccdb-c5ec-4abe-8f70-0c97af6639a7</guid><dc:creator>gocchan</dc:creator><description>&lt;p&gt;I already put it in prj.conf.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to I2C</title><link>https://devzone.nordicsemi.com/thread/419423?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2023 06:46:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b2a95c-ea1c-45ee-aca7-ce86a923fb8d</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Put&lt;/p&gt;
&lt;p&gt;CONFIG_I2C=y&lt;/p&gt;
&lt;p&gt;in prj.conf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>