<?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>Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13139/multiple-twi-instances-sdk-11</link><description>Hi, 
 I&amp;#39;m currently running two separate TWI-instances on my nRF52 DK with SDK 11. 
 Each instance runs quite well with no issue, except for when instance 1 becomes active (it either reads or writes); the SDA-line on instance 0 becomes permanently low</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2017 14:04:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13139/multiple-twi-instances-sdk-11" /><item><title>RE: Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/thread/50083?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 14:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0161861e-ba8b-4a6b-a030-35ebbf59715f</guid><dc:creator>Henrik</dc:creator><description>&lt;p&gt;As far as I know TWI0 does not have fixed SDA and SCL pins, I believe they can be freely defined. However, it&amp;#39;s been a while since I worked with SDK 11.&lt;/p&gt;
&lt;p&gt;You can define SDA and SCL pins for a TWI-instance in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go to nrf_drv_config.h and change the defines (TWI1_CONFIG_SCL and TWI1_CONFIG_SDA) to whatever you like (either in hexadecimal (0x19) or decimal (25). It doesn&amp;#39;t matter).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a config, as you can see I did for my TWI instance 1. This will overwrite the values defined in nrf_drv_config.h as long as you apply the config to the nrf_drv_twi_init()-function.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/thread/50082?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 13:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:091c7594-1ee1-425d-81ee-6baee56e757d</guid><dc:creator>Akram Karimi</dc:creator><description>&lt;p&gt;Thanks. TWI0 has fixed SDA and SCL pins(26 and 27) but how to configure any other pin to be used as SDA and SCL for TWI1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/thread/50081?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 13:56:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d61586-6192-47ae-b1dc-d52fe5cd6f7f</guid><dc:creator>Henrik</dc:creator><description>&lt;p&gt;They decide which pins you would like to use as SDA and SCL on the board. 0x infront of the number means that I have decided to define the pins in hexadecimal.&lt;/p&gt;
&lt;p&gt;In this case I have chosen pin 25 as SCL and pin 24 as SDA. (For TWI 1)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/thread/50080?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 13:50:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d45a3c5-5416-4639-b6d6-27c4251ee0fd</guid><dc:creator>Akram Karimi</dc:creator><description>&lt;p&gt;Dear Henrik, do you know what are TWI1_CONFIG_SCL and TWI1_CONFIG_SDA defines? What are they for?
I have them as follows:
#define TWI1_CONFIG_SCL          0
#define TWI1_CONFIG_SDA          1&lt;/p&gt;
&lt;p&gt;While yours are different. I am using nRF52832 with SDK11.
Looking forward to your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/thread/50079?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 12:26:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c83ca85c-0b2f-4874-93a6-1dd7f8bc6c1e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Glad to hear that you were able to resolve the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple TWI-instances SDK 11</title><link>https://devzone.nordicsemi.com/thread/50078?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 08:57:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99da94ff-8e0d-4779-9823-61ea9b5983f4</guid><dc:creator>Henrik</dc:creator><description>&lt;p&gt;The issue has been resolved.&lt;/p&gt;
&lt;p&gt;If you have the same issue, make sure to assign enough bytes for reading the TWI-data. If you have any more questions about this issue, feel free to contact me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>