<?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>Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97800/interfacing-imu-sensor-lsm6dsl-with-spi</link><description>Hi 
 I am using nrf52840dk- nrf52840 board to interface the IMU Sensor using SPI instead of I2C using nrf connect sdk for vs code. But I am facing error. 
 Below I have attached the overlay file I created for LSM6DSL. I haven&amp;#39;t changed anything in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 May 2024 12:06:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97800/interfacing-imu-sensor-lsm6dsl-with-spi" /><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/481370?ContentTypeID=1</link><pubDate>Wed, 01 May 2024 12:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74d9a38f-9904-4200-822a-6db815dd8288</guid><dc:creator>rania amara</dc:creator><description>&lt;p&gt;hi i&amp;#39;m trying to do the same thing &amp;quot;interfacing imu sensor(lsm6dso) with i2c and i dont know how to set the right overlay file ,can you help me ?&lt;/p&gt;
&lt;h1 class="name"&gt;&lt;/h1&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/428452?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 12:17:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:855c120b-3025-4faf-a1ad-e3815458098d</guid><dc:creator>Mindtech</dc:creator><description>&lt;p&gt;Yes, i got the following answer&lt;/p&gt;
&lt;p&gt;&amp;quot;&amp;lt;err&amp;gt; spi_nrfx_spim: Timeout waiting for transfer complete&amp;quot;&lt;/p&gt;
&lt;p&gt;I will try to see the signals with a logic analyzer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/428277?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 20:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af8ca2f6-174e-4fec-8df5-fe1c89fe9e8f</guid><dc:creator>stc114533</dc:creator><description>&lt;p&gt;Have you tried printing the log messages? What did you get?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/427998?ContentTypeID=1</link><pubDate>Mon, 29 May 2023 14:59:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3b47110-cdd1-4a52-ae93-11d8c4c19eb8</guid><dc:creator>Mindtech</dc:creator><description>&lt;p&gt;Thanks, it&amp;#39;s very similar to my device tree... I believe I&amp;#39;m missing some other detail.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/427992?ContentTypeID=1</link><pubDate>Mon, 29 May 2023 12:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b86676a2-a588-400d-aee3-0f32e3d3f3d3</guid><dc:creator>stc114533</dc:creator><description>&lt;p&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;This is everything I have for spi3, hope that helps.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 3)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 5)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 4)&amp;gt;;
        };
    };
    spi3_sleep: spi3_sleep {
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 3)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 5)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 4)&amp;gt;;
        };
    };
};


st_lsm6dsl: &amp;amp;spi3 {
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;spi3_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi3_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 8 GPIO_ACTIVE_LOW&amp;gt;;
    lsm6dsl: lsm6dsl@0 {
        compatible = &amp;quot;st,lsm6dsl&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
        spi-max-frequency = &amp;lt;10000000&amp;gt;;
        reg = &amp;lt;0&amp;gt;;
        irq-gpios = &amp;lt;&amp;amp;gpio0 9 0&amp;gt;;
    };
};&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/427887?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 17:22:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ee23b03-65af-47db-86c1-7cc466183940</guid><dc:creator>Mindtech</dc:creator><description>&lt;p&gt;I have the same problem you described, but with the nRF9160, could you share your complete device tree overlay?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/424647?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 17:03:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b7fe677-054a-42ac-bf73-dbdf83980c74</guid><dc:creator>stc114533</dc:creator><description>&lt;p&gt;So I printed out the log messages, found that it&amp;#39;s because I didn&amp;#39;t&amp;nbsp;set the irq-gpios in overlay. Now everything works as expected.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;st_lsm6dsl&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi3&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spim&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pinctrl-0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi3_default&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pinctrl-1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;spi3_sleep&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pinctrl-names&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;default&amp;quot;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;&amp;quot;sleep&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;cs-gpios&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;gpio0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO_ACTIVE_LOW&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;lsm6dsl:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;lsm6dsl&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;st,lsm6dsl&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;spi-max-frequency&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;10000000&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;reg&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;span&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;irq-gpios = &amp;lt;&amp;amp;gpio0 9 0&amp;gt;;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/424091?ContentTypeID=1</link><pubDate>Fri, 05 May 2023 20:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc141f74-f2b8-4c8e-a638-90acdd461afb</guid><dc:creator>stc114533</dc:creator><description>&lt;p&gt;Have you solved it?&amp;nbsp;I also did the same thing as you did and I encountered&amp;nbsp;the same problem, it&amp;#39;d be great if you can guide me to make it work. I&amp;#39;m also using the sample code, so it&amp;#39;s probably my overlay that causes this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/415798?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 16:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78a88fd9-4222-4a5b-a66a-f5e7d6211769</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;OK,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The only other thing I can think of is changing the frequency. The data sheet says the minimum spi clock time is 100ns (10MHz). In your overlay, it is set to only 100KHz. Try changing it to &amp;quot;&lt;span&gt;&lt;/span&gt;&lt;span&gt;spi-max-frequency&lt;/span&gt;&lt;span&gt; =&amp;lt;&lt;/span&gt;&lt;span&gt;10000000&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/415787?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 16:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:251f2231-7a71-4f61-aa76-90c5594c8fc0</guid><dc:creator>Thanuha</dc:creator><description>&lt;p&gt;that is already there in the example code i am not changing in the example code i am just adding the overlay file which I shared above&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interfacing IMU Sensor (LSM6DSL) with SPI</title><link>https://devzone.nordicsemi.com/thread/415778?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 15:33:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f02939e7-ec1d-4b69-a4c6-ed554cc3a2ba</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;There are only a few things that would cause this. Either the initialization function in the driver for LSM6DSL is failing (it would print an error) or the device information can not be found in the device tree.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Looking at the driver in &amp;quot;..\ncs\v2.0.0\zephyr\drivers\sensor\lsm6dsl\lsm6dsl.c&amp;quot;, if the initialization fails you will see one of two possible errors:&lt;/p&gt;
&lt;p&gt;1. LOG_ERR(&amp;quot;Failed to initialize sensor bus&amp;quot;);&lt;/p&gt;
&lt;p&gt;2. LOG_ERR(&amp;quot;Failed to initialize chip&amp;quot;);&lt;/p&gt;
&lt;p&gt;So if you have logging enabled and odn&amp;#39;t see either of these errors then the driver can&amp;#39;t find the device information from the device tree. How are you getting the variable &amp;quot;lsm6dsl_dev&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>