<?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>magnetometer on spi</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36880/magnetometer-on-spi</link><description>i am using mpu 9250 and and using https://github.com/Martinsbl/nrf5-mpu-examples this examples. 
 the question is can i use magnetometer on spi protocol? 
 because i have not found any code on spi?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Nov 2020 14:26:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36880/magnetometer-on-spi" /><item><title>RE: magnetometer on spi</title><link>https://devzone.nordicsemi.com/thread/281854?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 14:26:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c1ad844-8a87-4360-bef8-05eb23993307</guid><dc:creator>SamirFarhat</dc:creator><description>&lt;div class="author"&gt;
&lt;div class="avatar"&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/samirfarhat"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;
&lt;p&gt;1. Write to the USER_CTRL register, setting I2C_MST_EN&lt;/p&gt;
&lt;p&gt;2. Write to I2C_MST_CTRL, setting the bus speed 400KHz and to stop between read&lt;/p&gt;
&lt;p&gt;3. Write to I2C_MST_DELAY_CTRL, enabling delay odr for the slave you wish the mag to be represented by(the following instructions will assume 0.&lt;/p&gt;
&lt;p&gt;4. Write to I2C_SLV0_ADDR to write mode, and slave address to the magnetometer (0x0C)&lt;/p&gt;
&lt;p&gt;5. Write to I2C_SLV0_REG, setting the address to be written as the address of CTRL2 in the magnetometer&lt;/p&gt;
&lt;p&gt;6. Populate ICM20948_I2C_SLV0_DO with the desired control setting&lt;/p&gt;
&lt;p&gt;7. Write to ICM20948_I2C_SLV0_CTRL,&amp;nbsp; enabling the mag and setting the grouping and bytes to be read&lt;/p&gt;
&lt;p&gt;8. Switch I2C_SLV0_ADDR to read mode and I2C_SLV0_REG to HXL&lt;/p&gt;
&lt;p&gt;9. EXT_SLV_SENS_DATA_(00 to 06) will now be populated with HXL to ST2. It should be noted that reading ST2 is necessary as this automatically triggers the data to update in the axis registers.&lt;/p&gt;
&lt;p&gt;10. Additionally, FIFO_EN_1 can be set to write slv(magnetometer) data to the FIFO&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: magnetometer on spi</title><link>https://devzone.nordicsemi.com/thread/141876?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 09:58:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2209ec4-95fd-49e6-8b27-f5768970ebba</guid><dc:creator>awneil</dc:creator><description>[quote userid="72270" url="~/f/nordic-q-a/36880/magnetometer-on-spi"][/quote]
&lt;p style="padding-left:30px;"&gt;can i use magnetometer on spi protocol?&lt;/p&gt;
&lt;p&gt;As already noted, that question will be answered in the magnetometer&amp;#39;s &lt;strong&gt;datasheet&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT&lt;/p&gt;
&lt;p&gt;In fact, you don&amp;#39;t even need to open the datasheet - it is stated on the &lt;strong&gt;Product Page&lt;/strong&gt; on the manufacturer&amp;#39;s web site:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.invensense.com/products/motion-tracking/9-axis/mpu-9250/"&gt;https://www.invensense.com/products/motion-tracking/9-axis/mpu-9250/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: magnetometer on spi</title><link>https://devzone.nordicsemi.com/thread/141873?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 09:29:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7677e314-8283-4d6d-9648-62f7c6c01ee8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is really a question you should ask InvenSense, and not Nordic. The information should also be available in the datasheet of the device.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>