<?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>Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1711/problem-with-twi-and-mpu9150-mpu6050</link><description>I am using an nRF51422 and attempting to interface
it with an MPU9150/6050 using your MPU6050 driver and
the underlying twi_hw_master.c. 
 I have modified twi_master_config.h to match my
board topology (Pin 10 - clk, Pin 11 - data). 
 twi_master_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Jun 2014 12:53:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1711/problem-with-twi-and-mpu9150-mpu6050" /><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7556?ContentTypeID=1</link><pubDate>Tue, 03 Jun 2014 12:53:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01a71efb-ea60-4b95-882b-ed8ae0fc1c0b</guid><dc:creator>Marius R.</dc:creator><description>&lt;p&gt;The above link is broken (like every other link in this forum). Can anyone tell me how to get this file anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7555?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2014 06:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6693b2a4-3747-4dd6-9e60-f2792b8e43b3</guid><dc:creator>Tom P</dc:creator><description>&lt;p&gt;Brian,&lt;/p&gt;
&lt;p&gt;Thanks for the hint. I think I&amp;#39;m doing it correctly but
earlier I wrote some code to try &lt;em&gt;every&lt;/em&gt; address just
in case :-). Going to try turning off the soft device and
disabling the ADC, etc. Hopefully something will work!&lt;/p&gt;
&lt;p&gt;Tom&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7554?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2014 11:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5980010c-30da-4f30-8457-642ddbfd6fe3</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Tom,&lt;/p&gt;
&lt;p&gt;I know this may be a silly question, but are you remembering to shift the MPU9150 address from 8bit (0x68) to a 7bit like this:&lt;/p&gt;
&lt;p&gt;// Left shift I2C address one bit (7bit result)
m_device_address = (uint8_t)(device_address &amp;lt;&amp;lt; 1);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7553?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2014 11:11:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b4e4511-0d75-4b67-945e-1a8ef5e0ab38</guid><dc:creator>Tom P</dc:creator><description>&lt;p&gt;Thanks for the try Brian. Your version seems to behave the same way the stock version does; not able to read or write a 9150 register. At least no more resetting! Perhaps I&amp;#39;m doing something really stupid. No GPIO setup .. just twi initialize and mpu initialize. It&amp;#39;s 2am so I&amp;#39;m not thinking clearly. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7552?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2014 10:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e705f388-673c-4c51-a889-94753fc7864c</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Tom,&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re willing to give it a shot, here&amp;#39;s my sd_twi_hw_master.c file that I modified for my MPU6050/9150 to work correctly.  You will notice that I had to comment out the err_code in the twi_master_init().  Also, don&amp;#39;t forget to change pin numbers for SDA / SCL on lines 25 and 26 (or comment them out).  Fingers crossed...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/sd_5F00_twi_5F00_hw_5F00_master.c"&gt;sd_twi_hw_master.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7551?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2014 10:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06f567b-2028-4d1b-9453-73a8ac67eff4</guid><dc:creator>Tom P</dc:creator><description>&lt;p&gt;Thanks for the suggestion! Didn&amp;#39;t seem to work for me.  The twi_master_init() now seems to cause a system reset and gets caught in a loop. I turn on an LED at the start of my program and now it&amp;#39;s blinking. Still nothing on the scope and still scratching my head.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with TWI and MPU9150/MPU6050</title><link>https://devzone.nordicsemi.com/thread/7550?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2014 09:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:161dc426-538c-4f40-a566-eea2c1d954dd</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Tom,&lt;/p&gt;
&lt;p&gt;I ran into similar problems when using the softdevice &amp;amp; TWI.  Replacing the twi_hw_master.c file with sd_twi_hw_master.c file should help.  Here&amp;#39;s the link to the file:  &lt;a href="https://devzone.nordicsemi.com/index.php/best-place-to-get-started#reply-2059"&gt;sd_twi_hw_master.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>