<?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>Conflict between SPI1 and TWI1 on nRF51</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7045/conflict-between-spi1-and-twi1-on-nrf51</link><description>Hello 
 I&amp;#39;ve been having some strange problems with my SPI and TWI bus. In my setup, I&amp;#39;m using SPI0 and TWI1. I noticed that, even though I&amp;#39;m not using it, that SPI1 was consuming a lot of power so I disabled it with NRF_SPI0-&amp;gt;ENABLE = 0;. 
 Now I seem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 May 2015 20:39:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7045/conflict-between-spi1-and-twi1-on-nrf51" /><item><title>RE: Conflict between SPI1 and TWI1 on nRF51</title><link>https://devzone.nordicsemi.com/thread/24893?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 20:39:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:376aeb6a-ad17-4e81-bea2-ff2e203adf51</guid><dc:creator>kilianod</dc:creator><description>&lt;p&gt;I think I solved the problem. I switched to the twi_sw_master library instead of the hardware version and it works fine now, i.e. there is now no longer excessive current draw when not using the TWI bus. The nRF51 chip I&amp;#39;m using uses an older revision of the silicon, which I believe had problems with the TWI hardware implementation as described here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/36804/twi-module-lock-up-still-present-in-nrf51822-v3-pan-56/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conflict between SPI1 and TWI1 on nRF51</title><link>https://devzone.nordicsemi.com/thread/24892?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 19:31:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09743cb6-075b-407f-a5dd-e06eef04771b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Is your main problem now to disable and enable the TWI? or is it with the current cunsomption?
Are you using XTAL clock? if you are using internal RC HFCLK then this current consumption does not be explained unless there are other modules you are using and are active at the time of current measurement, Are you sure that you are measuring this increased current because of SPI1 or are there some other modules active?
what is your working environment like which SDK, SD and hardware?&lt;/p&gt;
&lt;p&gt;Do you wait for EVENTS_READY before using TWI!?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conflict between SPI1 and TWI1 on nRF51</title><link>https://devzone.nordicsemi.com/thread/24891?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 19:14:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3888fb4d-583b-49ff-96b0-a1340024a080</guid><dc:creator>kilianod</dc:creator><description>&lt;p&gt;Thanks, yes they have the same address and from looking at the Peripheral options in the debug menu I can see the TWI1 gets disabled when I disable the SPI1. Do you know a good way to disable the TWI1 bus after I&amp;#39;m finished using it? I&amp;#39;ve tried disabling with NRF_TWI1-&amp;gt;ENABLE = 0;	and enabling again with NRF_TWI1-&amp;gt;ENABLE = 1; but the bus never re-enables?
The combined SPI1/TWI1 bus seems to use a lot of current(~1mA) when its not in use so I&amp;#39;m trying to reduce this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conflict between SPI1 and TWI1 on nRF51</title><link>https://devzone.nordicsemi.com/thread/24890?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 18:18:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25820c6b-9038-4913-ac48-f981f08e49d1</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I think that SPI1 and TWI1 use shared hardware, I do not have the product specification in hand but their base addresses are same as far as i can remember.
Do not disable SPI1 when you are using TWI1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>