<?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>Using both TWI instances in nrf51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6305/using-both-twi-instances-in-nrf51822</link><description>Hello, 
 We&amp;#39;re creating a new design with the nRF518122 as a TWI master to two separate I2C busses. No SPI devices of any kind, so I don&amp;#39;t think there is a resource sharing issue. The reference manual indicates that the part has two separate TWI instances</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 Mar 2015 10:29:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6305/using-both-twi-instances-in-nrf51822" /><item><title>RE: Using both TWI instances in nrf51822</title><link>https://devzone.nordicsemi.com/thread/22001?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2015 10:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3688c738-c207-45c5-a437-3d2ae052759f</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;It would be pretty wasteful to copy the source, change it to use the other TWI and then have both in your binary. Much better would be to follow the example of the SPI master and edit the code to pass in an instance parameter which you supply to each call. It&amp;#39;s not a particularly difficult thing to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using both TWI instances in nrf51822</title><link>https://devzone.nordicsemi.com/thread/22002?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2015 07:32:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:040f6c24-5310-47e3-a2c6-ca2dccb5d989</guid><dc:creator>Bouke</dc:creator><description>&lt;p&gt;As to your second question: yes, the usages of TWI0 and TWI1 are exactly the same. So copying the source and adapting it for TWI0 (with a different set of pins of course) should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using both TWI instances in nrf51822</title><link>https://devzone.nordicsemi.com/thread/21999?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2015 07:06:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99013e20-16de-4cb0-a1ef-495d871ed87e</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;Yes, twi_hw_master is quite limited but multi-instance driver with blocking and non-blocking mode is coming soon - next SDK release.&lt;/p&gt;
&lt;p&gt;For now you need to do as Charles suggested or tweak implementation on your own.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using both TWI instances in nrf51822</title><link>https://devzone.nordicsemi.com/thread/22000?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2015 03:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a2eb0e7-b36f-413e-9731-1e425a4f2de2</guid><dc:creator>Charles Manning</dc:creator><description>&lt;p&gt;Assuming you do not need to access devices on both TWI buses simultaneously, you could set up the TWI to access one bus, then change the pin muxing to access the other bus when you need to.&lt;/p&gt;
&lt;p&gt;I did this with the UART and have 3 serial ports going: two for accessing peripherals and one for outputting debug info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>