<?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>Do I need pull-up resistors when using I2C or does the driver set them up in software?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113717/do-i-need-pull-up-resistors-when-using-i2c-or-does-the-driver-set-them-up-in-software</link><description>I&amp;#39;m pretty new to embedded development/electronics and I&amp;#39;m trying to interface with a I2C pressure sensor, but I can&amp;#39;t seem to communicate with it. I&amp;#39;m using nrf52840dk board and nrf Connect sdk / toolchain v2.7.0. 
 At first, I just connected the sensor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Aug 2024 14:08:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113717/do-i-need-pull-up-resistors-when-using-i2c-or-does-the-driver-set-them-up-in-software" /><item><title>RE: Do I need pull-up resistors when using I2C or does the driver set them up in software?</title><link>https://devzone.nordicsemi.com/thread/497185?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 14:08:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f33c7c43-6a8b-4e62-9c09-35eeebb67fcd</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;Glad to hear that you got it working.&lt;/p&gt;
&lt;p&gt;To enable internal pull resistors, you need to set this in the device tree node by adding &amp;quot;bias-pull-up;&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	new_pinctrl_default: new_pinctrl_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 26)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 27)&amp;gt;;
			bias-pull-up;
		};
	};

	new_pinctrl_sleep: new_pinctrl_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 26)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 27)&amp;gt;;
			low-power-enable;
		};
	};    
};

&amp;amp;i2c0 {
    ...
	pinctrl-0 = &amp;lt;&amp;amp;new_pinctrl_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;new_pinctrl_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please note that the internal pull resistors are too weak for 400 kHz operation, but will work for 100 kHz i2c transfers.&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: Do I need pull-up resistors when using I2C or does the driver set them up in software?</title><link>https://devzone.nordicsemi.com/thread/497182?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 13:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e94cda5-dfda-40b9-917f-ec8a7c2fbc60</guid><dc:creator>olalonde</dc:creator><description>&lt;p&gt;I used external 5k pull up resistors and it seems to be working now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>