<?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>Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56882/problem-using-3-instances-of-spim-on-nrf52840-zephyr-rtos</link><description>When enabling 3 instances of SPIM (1,2,3) on NRF52840 the application doesn&amp;#39;t start at all. 
 Weirdly however, the application works fine when SPI3 takes SPIM3 and the rest SPI0, SPI2 respectively, or when SPIM1 and SPIM2 are enabled and &amp;quot;SPI3 instance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Feb 2020 09:13:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56882/problem-using-3-instances-of-spim-on-nrf52840-zephyr-rtos" /><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/235094?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2020 09:13:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aef06c09-e2b8-4335-83f5-3ac4b4ca6a8b</guid><dc:creator>Ibrahimk</dc:creator><description>&lt;p&gt;Solved &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;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/22893"&gt;github.com/.../22893&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/234228?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2020 15:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8358309-d4c7-443d-8064-90e7daab1546</guid><dc:creator>Ibrahimk</dc:creator><description>&lt;p&gt;Sorry for the latency&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;here are the project files&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blenode.zip"&gt;devzone.nordicsemi.com/.../blenode.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/232452?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2020 07:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69f4ba4b-7860-4269-94bd-8b11af200fac</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Since you already have the setup to reproduce this, can you please give me a simplified project to test this. Will save a lot of my time trying to set it up.. Are you using Nordic Connect SDK or cloning Zephyr directly? which version ?&lt;br /&gt;Once I reproduce it, we can try to figure out a workaround for this problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/232023?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2020 09:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81136089-518b-4c62-9c07-8326b79c087c</guid><dc:creator>Ibrahimk</dc:creator><description>&lt;p&gt;Thank you for your reply Susheel,&lt;/p&gt;
&lt;p&gt;I also think there is a bug in the driver.&lt;/p&gt;
&lt;p&gt;Having looked at the driver implementation of SPIM, I have not found any special treatment for the SPI 3 instance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/231851?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2020 11:28:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:699b4bad-e69f-4fd9-a79b-f2c6370080af</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;smells like a bug in the driver. Let me reproduce this tomorrow and we can together agree on a workaround.&lt;/p&gt;
&lt;p&gt;BTW, have you checked if the erratas workaround have been applied?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/231846?ContentTypeID=1</link><pubDate>Thu, 30 Jan 2020 11:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19a4f20e-101d-4519-8fd0-ed4e570ae340</guid><dc:creator>Ibrahimk</dc:creator><description>&lt;p&gt;Thank you for your answer, &lt;/p&gt;
&lt;p&gt;The behavior is that the device_get_binding() function does not return a reference to the SPI1 or SPI2 devices if either of them chooses SPIM driver and the SPI3 is enabled with SPIM.&lt;/p&gt;
&lt;p&gt;The application keeps on restarting in this function before reaching the while(true) loop&lt;/p&gt;
&lt;p&gt;static void spi_init(){&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_1_dev = device_get_binding(&amp;quot;SPI_1&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!spi_1_dev) printk(&amp;quot;no SPI1!\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else printk(&amp;quot;found SPI1!\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_0_dev1 = device_get_binding(&amp;quot;GPIO_0&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!gpio_0_dev1) printk(&amp;quot;no gpio_0_dev1!&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs1_control.delay = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs1_control.gpio_dev = gpio_0_dev1;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs1_control.gpio_pin = 14;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_1_cfg.cs = &amp;amp;cs1_control;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_2_dev = device_get_binding(&amp;quot;SPI_2&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!spi_2_dev) printk(&amp;quot;no Spi2!\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else printk(&amp;quot;found SPI2!\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_0_dev2 = device_get_binding(&amp;quot;GPIO_0&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!gpio_0_dev2) printk(&amp;quot;no gpio_0_dev2!&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs2_control.delay = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs2_control.gpio_dev = gpio_0_dev2;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs2_control.gpio_pin = 26;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_2_cfg.cs = &amp;amp;cs2_control;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_3_dev = device_get_binding(&amp;quot;SPI_3&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!spi_3_dev) printk(&amp;quot;no SPI3\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else printk(&amp;quot;found SPI3!\n&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_0_dev3 = device_get_binding(&amp;quot;GPIO_0&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!gpio_0_dev3) printk(&amp;quot;no gpio_0_dev3!&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs3_control.delay = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs3_control.gpio_dev = gpio_0_dev3;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cs3_control.gpio_pin = 24;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_3_cfg.cs = &amp;amp;cs3_control;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;the application would work if both SPI1 and SPI2 chooses the SPI driver without easyDMA but that is not the behavior I want&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/230579?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 11:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6cfc7a2-e1f6-4dfd-9b91-ef9f36350a7c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Also note that there are few Errata&amp;#39;s on SPIM3, could affect the initialization of the driver. Check the code to see if the workarounds for these are applied. I would suggest not to use SPIM3, but that it your call.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF52840_Rev2%2FERR%2FnRF52840%2FRev2%2Flatest%2Fanomaly_840_174.html&amp;amp;cp=4_0_1_0_1_16"&gt;Errata 174&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF52840_Rev2%2FERR%2FnRF52840%2FRev2%2Flatest%2Fanomaly_840_193.html&amp;amp;cp=4_0_1_0_1_24"&gt;Errata 193&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF52840_Rev2%2FERR%2FnRF52840%2FRev2%2Flatest%2Fanomaly_840_195.html&amp;amp;cp=4_0_1_0_1_26"&gt;Errata 195&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF52840_Rev2%2FERR%2FnRF52840%2FRev2%2Flatest%2Fanomaly_840_195.html&amp;amp;cp=4_0_1_0_1_26"&gt;Errata 198&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using 3 instances of SPIM on NRF52840 Zephyr RTOS</title><link>https://devzone.nordicsemi.com/thread/230571?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 11:37:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e72a95d1-0edd-4480-aa36-a654ece09281</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;haven&amp;#39;t seen this myself, but what does it mean that the application start at all? So it does not reach to the main()? If so, there could be something in the driver initialization phase that fails that happens before the control reaches to main. Please start the program in the debugger to see what is the failure.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>