<?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>Connect CAN devices to Thingy91</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92211/connect-can-devices-to-thingy91</link><description>I am trying to connect two CAN devices mcp2515 to the SPI3 on the gpio spare of the tingy91 but I have a problem compiling the overlay file. Is there someone who can help me? 
 I am attaching the configuration and the overlay that gives me problems at</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Sep 2022 11:29:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92211/connect-can-devices-to-thingy91" /><item><title>RE: Connect CAN devices to Thingy91</title><link>https://devzone.nordicsemi.com/thread/387673?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 11:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f034766-3ec1-4e57-b2cb-e9f719f506da</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Thank you for posting the solution.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect CAN devices to Thingy91</title><link>https://devzone.nordicsemi.com/thread/387487?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 11:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb55e52f-dcb7-444d-813d-2c3e4d669088</guid><dc:creator>babos</dc:creator><description>&lt;p&gt;Hello Dejan,&lt;/p&gt;
&lt;p&gt;yes off course &amp;#39;CONFIG_CAN_MCP2515=y&amp;#39; but is for thingy91_nrf52840 board.&lt;/p&gt;
&lt;p&gt;I solved it like this:&lt;/p&gt;
&lt;p&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, 6)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 5)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 26)&amp;gt;;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 6)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MISO, 0, 5)&amp;gt;,
                    &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 26)&amp;gt;;
            low-power-enable;
        };
    };

};
&amp;amp;spi3 {
    status = &amp;quot;okay&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio0 3 GPIO_ACTIVE_LOW&amp;gt;,
               &amp;lt;&amp;amp;gpio1 11 GPIO_ACTIVE_LOW&amp;gt;,
               &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_LOW&amp;gt;,
               &amp;lt;&amp;amp;gpio0 9 GPIO_ACTIVE_LOW&amp;gt;;
    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;;

    can1_mcp2518: mcp2515@0 {
        compatible = &amp;quot;microchip,mcp2515&amp;quot;;
        spi-max-frequency = &amp;lt;1000000&amp;gt;;
        int-gpios = &amp;lt;&amp;amp;gpio0 27 0&amp;gt;;
        status = &amp;quot;okay&amp;quot;;
        label = &amp;quot;MCP2518A&amp;quot;;
        reg = &amp;lt;0x0&amp;gt;;
        osc-freq = &amp;lt;20000000&amp;gt;;
        bus-speed = &amp;lt;250000&amp;gt;;
        sjw = &amp;lt;1&amp;gt;;
        prop-seg = &amp;lt;2&amp;gt;;
        phase-seg1 = &amp;lt;7&amp;gt;;
        phase-seg2 = &amp;lt;6&amp;gt;;
        #address-cells = &amp;lt;1&amp;gt;;
        #size-cells = &amp;lt;0&amp;gt;;
    };
    can2_mcp2518: mcp2515@1 {
        compatible = &amp;quot;microchip,mcp2515&amp;quot;;
        spi-max-frequency = &amp;lt;1000000&amp;gt;;
        int-gpios = &amp;lt;&amp;amp;gpio0 28 0&amp;gt;;
        status = &amp;quot;okay&amp;quot;;
        label = &amp;quot;MCP2518B&amp;quot;;
        reg = &amp;lt;0x1&amp;gt;;
        osc-freq = &amp;lt;20000000&amp;gt;;
        bus-speed = &amp;lt;250000&amp;gt;;
        sjw = &amp;lt;1&amp;gt;;
        prop-seg = &amp;lt;2&amp;gt;;
        phase-seg1 = &amp;lt;7&amp;gt;;
        phase-seg2 = &amp;lt;6&amp;gt;;
        #address-cells = &amp;lt;1&amp;gt;;
        #size-cells = &amp;lt;0&amp;gt;;
    };
    ioexpander: mcp23sxx@2 {
        compatible = &amp;quot;microchip,mcp23sxx&amp;quot;;
        label = &amp;quot;MCP23S08&amp;quot;;
        #gpio-cells = &amp;lt;2&amp;gt;;
        ngpios = &amp;lt;8&amp;gt;;
        gpio-controller;
        reg = &amp;lt;0x2&amp;gt;;
        spi-max-frequency = &amp;lt;800000&amp;gt;;
    };
    adc104s021: spi-device@3 {
        compatible = &amp;quot;spi-device&amp;quot;;
        reg = &amp;lt;0x3&amp;gt;;
        spi-max-frequency = &amp;lt;800000&amp;gt;;
        label = &amp;quot;ADC104S021&amp;quot;;
    };
};
/{
    aliases{
        can-primary = &amp;amp;can1_mcp2518;
        can-secondary = &amp;amp;can2_mcp2518;
        io-expander = &amp;amp;ioexpander;
        adc104s021=&amp;amp;adc104s021;
    };
};
/ {
    chosen {
            zephyr,console = &amp;amp;cdc_acm_uart0;
    };
};

&amp;amp;zephyr_udc0 {
    cdc_acm_uart0: cdc_acm_uart0 {
            compatible = &amp;quot;zephyr,cdc-acm-uart&amp;quot;;
            label = &amp;quot;CDC_ACM_0&amp;quot;;
    };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Babos&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect CAN devices to Thingy91</title><link>https://devzone.nordicsemi.com/thread/387482?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 11:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01c92441-a93a-4c9e-885e-bd5cd0385b57</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Try adding this configuration option to your prj.conf&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CAN_MCP2515=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In addition, you could try adding a line right below &amp;amp;spi3 in your 52840dk_nrf52840.overlay file&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;compatible = &amp;quot;nordic,nrf-spim&amp;quot;;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>