<?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>DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89431/dts-for-sensor-example-using-nrf_psel-fails-to-build</link><description>Hi, 
 I&amp;#39;m trying to get up and running using the PMW3360 sensor driver ( https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/pmw3360.html ) using the NRF52840 DK. 
 I&amp;#39;m using the sample DTS provided on that page: 
 
 To my eye (I&amp;#39;ve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Jul 2022 06:46:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89431/dts-for-sensor-example-using-nrf_psel-fails-to-build" /><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/375246?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2022 06:46:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60b198f8-3f56-4a94-8f6e-ed73af5e3afc</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;No problem at all.&amp;nbsp;&lt;/p&gt;
[quote user="maxg"]&amp;#39;m sure I&amp;#39;m not the only NRF learner to make issues for themselves like this but I was having trouble finding similar issues to point me in the right direction.[/quote]
&lt;p&gt;No, you are definitely not the first or the last. It happens to everyone &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; There might be more on the issue in nRF5 SDK cases.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/375163?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 18:02:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:830f22e0-080b-40e8-99c5-091060f7fa28</guid><dc:creator>maxg</dc:creator><description>&lt;p&gt;That makes a lot of sense, and explains the behavior I was seeing with MOSI and the LEDs.&lt;/p&gt;
&lt;p&gt;From devboards I&amp;#39;ve used in the past, my assumption was that &amp;quot;if it&amp;#39;s on the headers, it&amp;#39;s not bound to anything else and is ready to use&amp;quot;, but clearly the NRF52840 DK is more flexible than that (which I think is a really good thing) and I should&amp;#39;ve perused the documentation for it more carefully.&lt;/p&gt;
&lt;p&gt;Appreciate you taking the time to troubleshoot this with me &amp;Oslash;yvind, I&amp;#39;m sure I&amp;#39;m not the only NRF learner to make issues for themselves like this but I was having trouble finding similar issues to point me in the right direction. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/375118?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 13:19:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca3a02a6-5311-48dc-b29f-7bd36fd2c88b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="maxg"]I believe should instead be:[/quote]
&lt;p&gt;Thanks for pointing out. I will forward this information.&amp;nbsp;&lt;/p&gt;
[quote user="maxg"]I switched my MOSI to P0.27 and all started to work correctly with the sensor. I have a feeling that the&amp;nbsp; GPIO pins I was trying for MOSI are hooked up to other peripherals on the DK and some interaction there was resulting in the voltage difference on just MOSI, but I&amp;#39;m not 100% sure.[/quote]
&lt;p&gt;Based on the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_buttons_leds.html"&gt;nRF52840DK HW User Guide &lt;/a&gt;it seems that you have tried to use the LEDs for SPI communication. Have you disconnected these (If intentionally used)?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1656681016661v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Also, P0.17 is &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_external_memory.html"&gt;connected to the external memory on the DK&lt;/a&gt;. To use this pin, &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/solder_bridge.html"&gt;please see the Solder Bridge Configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is also visible on the back of the board.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/374974?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 18:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c3801de-98e6-472f-ac9e-4c65fd69560f</guid><dc:creator>maxg</dc:creator><description>&lt;p&gt;No problem regarding delays, hope your summer vacation goes well.&lt;/p&gt;
&lt;p&gt;When I say sensor example, I mean the DTS example outlined here: &lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/pmw3360.html#id4"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/pmw3360.html#id4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It uses `SPI_*` (which doesn&amp;#39;t resolve) instead of `SPIM_*` for the psels in pinctrl. Please let me know if I&amp;#39;m missing something here. I looked over the changelog briefly and I don&amp;#39;t believe this has changed from 1.9.x to 2.x but I could be wrong. I&amp;#39;ll update to 2.x. &lt;/p&gt;
&lt;p&gt;To be explicit, this (as shown on the docs page):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;            psels = &amp;lt;NRF_PSEL(SPI_SCK, 0, 16)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPI_MISO, 0, 15)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPI_MOSI, 0, 17)&amp;gt;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I believe should instead be:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 16)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 17)&amp;gt;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is what the sticker says on my DK:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PCA10056

2.0.1

2020.46

683351964&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve had a chance to reference the pinctrl documentation.&lt;/p&gt;
&lt;p&gt;I switched my MOSI to P0.27 and all started to work correctly with the sensor. I have a feeling that the&amp;nbsp; GPIO pins I was trying for MOSI are hooked up to other peripherals on the DK and some interaction there was resulting in the voltage difference on just MOSI, but I&amp;#39;m not 100% sure.&lt;/p&gt;
&lt;p&gt;If there&amp;#39;s any additional insight on this topic that might come to mind for you, please let me know. I&amp;#39;m left wondering if I was doing something fundamentally incorrect with the DK hardware or my configuration (e.g. DTS or code).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/374843?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 08:09:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cdbd6b6-83cd-4585-bb73-adf11a644d66</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Max,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Due to summer vacation period we might need some time to find the answer to this.&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;[quote user="maxg"] if the docs need to be updated for the sensor example:[/quote]
&lt;p&gt;What exact sensor sample are you using? Will have the documentation team look into this. Note that there are changes introduces in v2.0.0 compared to v1.9.1. &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/migration/migration_guide_1.x_to_2.x.html#migration-notes-for-ncs-v2-0-0"&gt;Please see migration note for v2.0.0&lt;/a&gt;&lt;/p&gt;
[quote user=""]I&amp;#39;m trying to get up and running using the PMW3360 sensor driver (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/pmw3360.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/pmw3360.html&lt;/a&gt;) using the NRF52840 DK.[/quote]
&lt;p&gt;What version of the nRF52840DK are you using?&lt;/p&gt;
[quote user="maxg"]I believe I actually solved my issue, but I&amp;#39;m wondering if 2.0.0 does this differently or if the docs need to be updated for the sensor example:[/quote]
&lt;p&gt;Have you read through the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_pinctrl.html#pin-control"&gt;Pin Control in the nRF documentation&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/374822?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 05:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4356b4ad-bcbf-444b-a63d-46574d0847ef</guid><dc:creator>maxg</dc:creator><description>&lt;p&gt;Hmm, I still can&amp;#39;t track this issue down re: low voltage on MOSI. On my scope, MOSI voltage is -400mv to 800mv (1.2v peak-to-peak, but the -400mv is a bit suspect to me) and doesn&amp;#39;t trigger at all on my DLA with a threshold voltage of 1.5v.&lt;/p&gt;
&lt;p&gt;- I have no pullups/pulldowns on my PMW3360 board for MOSI&lt;/p&gt;
&lt;p&gt;- I&amp;#39;ve tried this pinctrl configuration, same issue:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
    spi1_default_alt: spi1_default_alt {
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 16)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
        };

        group2 {
            psels = &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 19)&amp;gt;;
            bias-pull-up;
            drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
        };
    };

    spi1_sleep_alt: spi1_sleep_alt {
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 16)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
            // low-power-enable;
        };
        group2 {
            psels = &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 19)&amp;gt;;
            bias-pull-up;
            drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
            // low-power-enable;
        };
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;- I&amp;#39;ve tried multiple output pins on the NRF52840 DK for MOSI, each has the same problem&lt;/p&gt;
&lt;p&gt;- Checked for shorts to ground or other pins on MOSI, nothing came up&lt;/p&gt;
&lt;p&gt;I&amp;#39;m inclined to suspect either an issue with my PMW3360 breakout board (though it&amp;#39;s pretty straightforward) or an SPI config issue on my end, but am wondering if there are any suggestions or hints.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/374816?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2022 03:50:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b93fadf-505f-4438-ad86-901c5296f26a</guid><dc:creator>maxg</dc:creator><description>&lt;p&gt;Hi &amp;Oslash;yvind, &lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the VS Code extension.&lt;/p&gt;
&lt;p&gt;I believe I actually solved my issue, but I&amp;#39;m wondering if 2.0.0 does this differently or if the docs need to be updated for the sensor example:&lt;/p&gt;
&lt;p&gt;Instead of `SPI_*` I needed to use `SPIM_*` in the `NRF_PSEL` statements inside the DTS. I found this out here: &lt;a href="https://docs.zephyrproject.org/apidoc/latest/nrf-pinctrl_8h.html#a2594557c5e765d65ea7627c5c49e07d6"&gt;https://docs.zephyrproject.org/apidoc/latest/nrf-pinctrl_8h.html#a2594557c5e765d65ea7627c5c49e07d6&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m running into some additional issues with SPI (I can&amp;#39;t seem to reliably instrument SPI using my DLA, in particular for the&amp;nbsp; MOSI pin the voltage seems to be low for some reason), but I think my other issue is resolved.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Max&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTS for sensor example using NRF_PSEL fails to build</title><link>https://devzone.nordicsemi.com/thread/374678?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 07:55:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d374a765-4e7d-49b4-ad4b-5d2e1ef4d5f7</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The initial issue that I can see is the difference in nRF Connect SDK versions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;-- Zephyr version: 3.0.99 (/Users/max/Documents/nrfconnect/zephyr)
-- Found dtc: /opt/nordic/ncs/v1.9.1/toolchain/bin/dtc (found suitable version &amp;quot;1.6.1&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)
-- Found toolchain: gnuarmemb (/opt/nordic/ncs/v1.9.1/toolchain)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Zephyr v3.0.99 is used in the latest version of nRF Connect SDK (v2.0.0), while it&amp;#39;s using toolchain from v1.9.1 which is Zephyr v2.7.99.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are you using VS Code extension or building from command line?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>