<?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>TWI and MPU6050</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10201/twi-and-mpu6050</link><description>Hi, 
 I&amp;#39;ve been searching the devzone for TWI examples, and preferably an example with MPU6050. Here are a conclusion of stuff that I found, but as some of them were for 2013/2014 wanted to check first that no updated versions are available: 
 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Nov 2015 04:32:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10201/twi-and-mpu6050" /><item><title>RE: TWI and MPU6050</title><link>https://devzone.nordicsemi.com/thread/37860?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2015 04:32:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1ce6b45-49b8-4f0f-9546-1c259c709d55</guid><dc:creator>FA</dc:creator><description>&lt;p&gt;I checked all the 5 modules I got June 2015 from Digikey and all of them are CE AA D0, which means Rev. 2. It would be great if you let me know how I can get Beacon modules with 3rd revision chips as ultimately I should use that revision. However, if there isn&amp;#39;t a way to know the revision before receiving the modules, can you please comment on what I asked about the file Alseth provided in &lt;a href="https://devzone.nordicsemi.com/question/309/best-place-to-get-started/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;. Based on that post it seems SDK 6 drivers can not work with the SoftDecive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI and MPU6050</title><link>https://devzone.nordicsemi.com/thread/37858?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2015 08:36:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ff054df-4f0c-4f5e-bd80-f17cb8f34cfa</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;What version of the Beacon do you have? What does the letters on the chip say (if it is hard to read you can use nRFgo Studio to see it as well)? There are Beacons with 3rd revision chips out there today. If you have a 2nd revision IC then you should use the SDK v6.1.0 and the drivers in there. However, the twi_hw_master drivers in SDK v6.1.0 and v9.0.0 are actually identical.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/51868/nrf51-51822-ic-revision-1-qfaba0-with-sdk-810/"&gt;Here&lt;/a&gt; is a short explanation of why SDK, SoftDevice, and chip revision compatibility is important.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI and MPU6050</title><link>https://devzone.nordicsemi.com/thread/37859?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2015 14:44:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70142e1d-a29f-4d72-b521-d2839f0a9af0</guid><dc:creator>FA</dc:creator><description>&lt;p&gt;Thanks Martin. I have the PCA20006 board from Nordic and when I was trying to use SD130 I was told here that those boards have the Rev. 2. For SD130 I managed to use them as I&amp;#39;m in initial test of the system and not production.
As you said, when I tried to look at the devzone I was very confused about which driver to use, which one works and...
So, by having Rev. 2 chips:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you think the drivers and example you provided will work on Rev 2?&lt;/li&gt;
&lt;li&gt;If not, is there any confirmed WORKING driver/example for Rev 2? SDK 9 still has the twi_hw_master.c drivers too, so does that mean they can be used somehow?&lt;/li&gt;
&lt;li&gt;Also, did you take a look at the sd_twi_hw_master.c file that Alseth has provided? Is that useable for SDK 9?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI and MPU6050</title><link>https://devzone.nordicsemi.com/thread/37857?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2015 08:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcdf9850-16b4-4f51-85db-0e5aa70c67b2</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The old twi_hw_master.c and twi_sw_master.c are legacy drivers. There has been a lot of confusion around these drivers as they have changed a bit over time to accommodate for a few erratas found in the 1st and 2nd revision of the nRF51. I&amp;#39;m not sure what chip revision is on your particular beacon, but you can compare the chip markings with the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf51/dita/nrf51/pdflinks/nrf51_comp_matrix.html"&gt;compatibility matrix&lt;/a&gt; to find out.&lt;/p&gt;
&lt;p&gt;If you have the 3rd revision IC then you should use the new TWI drviers found in SDK 9. They are the ones called nrf_drv_twi.c. Here is a &amp;quot;&lt;a href="https://devzone.nordicsemi.com/question/48894/hardware-twii2c-example/"&gt;getting started example&lt;/a&gt;&amp;quot; for these drivers.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not really sure if I understand your last question, but you will need to write to registers to set up and start up the MPU. And you will basically need to go through the registers in the MPU data sheet one-by-one to figure out which bits in the registers to be sets. Time consuming, yes, but it needs to be done.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>