<?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>nrf5340dk SPI communication with BMI270 gyroscope</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86889/nrf5340dk-spi-communication-with-bmi270-gyroscope</link><description>Hello, I am trying to communicate with a Bosch BMI 270 device( datasheet ) using the nrf5340dk. I originally tried to use I2C since there was an example file available for this but I didn&amp;#39;t manage to get it working and I&amp;#39;m supposed to use SPI anyways</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Apr 2022 06:23:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86889/nrf5340dk-spi-communication-with-bmi270-gyroscope" /><item><title>RE: nrf5340dk SPI communication with BMI270 gyroscope</title><link>https://devzone.nordicsemi.com/thread/363101?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 06:23:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cea41d32-8c11-4245-b224-3a32d5ca8bf8</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]For I2C you&amp;#39;re supposed to use the 0x68 register but I couldn&amp;#39;t find one for SPI in the datasheet so I just used the same(probably wrong)[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Yes, that is wrong. Since SPI is using the master-slave principle, you have to add the slave number counting from 0, instead of the physical I2C bus address.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Referring to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/samples/sensor/adxl362/README.html#adxl362-three-axis-accelerometer"&gt;ADXL362&lt;/a&gt; sample, and especially the containing &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-v2.7.1/samples/sensor/adxl362/boards/nrf52dk_nrf52832.overlay"&gt;.overlay file&lt;/a&gt; as a reference.&lt;br /&gt;&lt;br /&gt;Please be aware that the nRF5340 application core has i2c1 enabled by default. Due to &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fchapters%2Fmemory%2Fappmem.html&amp;amp;cp=3_0_0_4_2_0&amp;amp;anchor=instantiation"&gt;memory instantiation&lt;/a&gt;, you have to disable i2c1 if you would like to run spi1. You can check the status and its dependencies in &lt;em&gt;../&amp;lt;build_folder&amp;gt;/zephyr/zephyr.dts&lt;/em&gt; after performing a successful build.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>