<?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 configure NRF52840 TWI (I2C) peripherals</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67071/how-to-configure-nrf52840-twi-i2c-peripherals</link><description>Hello, everyone 
 I use NRF52840 to configure TWI to operate the sensor, but I don’t understand it. 
 Can the hardware TWI of 52840 be mapped to any IO? 
 Or is there a fixed IO with multiple multiplexing functions? 
 If it can be arbitrarily mapped and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Oct 2020 08:06:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67071/how-to-configure-nrf52840-twi-i2c-peripherals" /><item><title>RE: How to configure NRF52840 TWI (I2C) peripherals</title><link>https://devzone.nordicsemi.com/thread/274999?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 08:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9161fac5-4916-456c-9cfe-bc2d19ffa192</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, the nRF52840 has a pin crossbar feature, allowing you to map the pins of the serial interfaces to any GPIO. This is from the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/twim.html"&gt;TWIM chapter in the PS&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;The GPIOs used for each two-wire interface line can be chosen from any GPIO on the device and are independently configurable. This enables great flexibility in device pinout and efficient use of board space and signal routing.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;That said, there is not all pins that are&amp;nbsp;&lt;em&gt;recommended&lt;/em&gt; for use with all serial peripheral pins. As mentioned in the&amp;nbsp;&lt;a title="Pin assignments" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pin.html?cp=4_0_0_6_0"&gt;Pin assignments&lt;/a&gt;, some GPIOs are marked as &amp;quot;Standard drive, low frequency IO only&amp;quot;. You should avoid using these pins for pins that will handle high-frequency signals.&lt;/p&gt;
&lt;p&gt;The GPIOs are set in the &lt;a title="PSEL.SCL" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/twim.html?cp=4_0_0_5_30_6_18#register.PSEL.SCL"&gt;PSEL.SCL&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a title="PSEL.SDA" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/twim.html?cp=4_0_0_5_30_6_19#register.PSEL.SDA"&gt;PSEL.SDA&lt;/a&gt; registers.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>