<?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>Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63253/two-spi-interfaces-compilation-error</link><description>Hi, I have the same issue as in here: https://devzone.nordicsemi.com/f/nordic-q-a/62676/2-spi-devices-nordic-nrf52382 but for me the Debug/Release-toggle does not work. I use SDK 15.3 and Softdevice s132 with a BC832. I try to connect (in the end 3 but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Aug 2020 11:53:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63253/two-spi-interfaces-compilation-error" /><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/262771?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 11:53:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:249c7a35-03f8-44b8-9db9-845b74df3d06</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="OS Na"](and sorry for the long silence, was on vacation)[/quote]
&lt;p&gt;No problem at all!&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="OS Na"]redownloading the SDK resolved the issue and also the original project compiles with several SPI instances. Thank you very much for the tip![/quote]
&lt;p&gt;I am happy to hear that this resolved your issue.&lt;br /&gt;To avoid this issue in the future, please make sure that you are not modifying the SDK files directly, but rather making renamed copies of the files you would like to change, and adding them to a separate location in your project directory. This way, it will also be easier for someone else to familiarize with your code in the future.&lt;br /&gt;&lt;br /&gt;I hope you had a great vacation, and that you are well!&lt;br /&gt;&lt;br /&gt;Please do not hesitate to open a new ticket if you should encounter any issues or questions in the future.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/262514?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 08:05:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa1c3844-4959-45c6-876c-3c3a718988f1</guid><dc:creator>OS Na</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;redownloading the SDK resolved the issue and also the original project compiles with several SPI instances. Thank you very much for the tip!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best wishes&lt;/p&gt;
&lt;p&gt;(and sorry for the long silence, was on vacation)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/258379?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 15:04:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c41bfc8-ac94-4379-8280-a9591cdc7b56</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;I took a look at the project you provided, and &amp;quot;unfortunately&amp;quot; it compiled just fine in both Release and Debug configuration - without making any changes to it ( both SPI instances defined and instanciated )..&lt;br /&gt;I am also able to init both the instances, by duplicating the configuration provided and changing it to what I would assume is the SPI1 config.&lt;br /&gt;Adding the third instance is not a problem either, it compiles as expected without errors or warnings.&lt;br /&gt;&lt;br /&gt;Could you download the project you provided and see if you still get the error, when the project is placed in /SDK15.3/examples/peripheral/nordicUpload&lt;br /&gt;If you are seeing an error here, I would suggest that you re-download the SDK to make sure you are not working with a broken / modified SDK.&lt;br /&gt;&lt;br /&gt;Looking over your sdk_config it also seems appropriately configured for using the legacy SPI driver with easyDMA ( actually using the nrfx_spim driver ).&lt;br /&gt;I do not immediately see anything that needs re configuring here, intriguing!&lt;br /&gt;&lt;br /&gt;I look forward to hearing back from you regarding the test of the project you yourself provided.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/258270?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 10:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a50ec38-2885-4b8c-8ec7-84f5aa079ba0</guid><dc:creator>OS Na</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;i prepared an example that should be free of sensitive matters, so it&amp;#39;s fine (even took out the BLE stuff for readability). But thank you. If you really need my complete project I will come back to that offer. Figuring out what is going on should also work on this one here, though.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When compiled, it throws the above mentioned error. If one comments out lines 150 and 151 of the main.c, then it compiles without complaining. If line 148 is set to &amp;#39;1&amp;#39; or &amp;#39;2&amp;#39; in the end, it also throws the error.&lt;/p&gt;
&lt;p&gt;file:&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nordicUpload.zip"&gt;devzone.nordicsemi.com/.../nordicUpload.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if you need (to know) anything else.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best wishes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/258253?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 08:52:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dab374d1-ec3a-4336-ba70-ab1d45182e81</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="OS Na"]thanks for your quick reply.[/quote]
&lt;p&gt;It is no problem at all, I am happy to help!&lt;/p&gt;
[quote user="OS Na"]Thank you for the easyDMA hint. However, the use of easyDMA seemed to work just fine with SPI_INSTANCE == 0, SPI0_USE_EASY_DMA == 1 and &lt;strong&gt;NRFX_SPI0_ENABLED == 0&lt;/strong&gt; (and NRFX_SPI_ENABLED == 1). SPIM was disabled for all instances while doing so. (The configuration described here is the one I provided above.)[/quote]
&lt;p&gt;Yes, if you are using the legacy spi driver with the easyDMA option set, then it will use the SPIM functionaltiy. You could see line 859 of apply_old_config for how this happens.&lt;br /&gt;The apply_old_config override of sdk_config is known to cause some confusion, but it is implemented to provide backwards compatibility.&lt;/p&gt;
[quote user="OS Na"]Maybe it helps, if I provide a minimal not-working example?[/quote]
&lt;p&gt;Yes, that would be very helpful to have a look at, so that I may see how you are doing the configuration.&lt;br /&gt;Please provide a .zip file of the entire project directory you are working with. Bear in mind that I do not have a BC832 module at hand to test with, so I will work with a nRF52 DK instead.&lt;br /&gt;Since this is a compilation issue this should not matter for now.&lt;br /&gt;&lt;br /&gt;I may also set the case to private viewing mode so that it is only viewable to you yourself and the support staff here at Nordic, in the case that the code is sensitive - just let me know if you would like me to do this.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/258180?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 16:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d5417c4-4be6-49d5-bcdc-8a8a512e6a99</guid><dc:creator>OS Na</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for your quick reply.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;it works, if I only use one instance and it works (separately) with all three GPIO-pinnings I want to use. However it only works with SPI_INSTANCE set to 0. As described, if I change that to 1 or 2, even if only instantiating one SPI instance, it causes the error.&lt;br /&gt;&lt;br /&gt;Thank you for the easyDMA hint. However, the use of easyDMA seemed to work just fine with SPI_INSTANCE == 0, SPI0_USE_EASY_DMA == 1 and &lt;strong&gt;NRFX_SPI0_ENABLED == 0&lt;/strong&gt; (and NRFX_SPI_ENABLED == 1). SPIM was disabled for all instances while doing so. (The configuration described here is the one I provided above.)&lt;br /&gt;&lt;br /&gt;Maybe it helps, if I provide a minimal not-working example?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best wishes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two SPI interfaces, compilation error</title><link>https://devzone.nordicsemi.com/thread/258078?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 11:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:248a5046-96f9-4c31-a148-f5d15e4e71d2</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;The code snippet you included above looks all right for the purpose of creating SPI instances.&lt;/p&gt;
[quote user=""]I would prefer having an interface for each of them and other threads mention that it is possible.[/quote]
&lt;p&gt;Yes, this is fine, however you will also need to make sure that you are not already using some of the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fspi.html&amp;amp;anchor=concept_hj5_444_sr"&gt;SPI&amp;#39;s shared resources&lt;/a&gt; someplace else in your code.&lt;/p&gt;
[quote user=""]whenever I add the second SPI instance. (I have not tried the third yet.)[/quote]
&lt;p&gt;Does it work as expected when you only have 1 SPI instance, and does it change depending on which SPI instance that single instance is?&lt;br /&gt;&lt;br /&gt;As a side note, I would like to recommend that you use the nrfx_spim or nrfx_spis drivers directly since it seems you are intending to make use of the easyDMA feature, instead of the legacy nrf_drv SPI driver.&lt;br /&gt;If you intend to use the SPIM as demonstrated in the SPI peripheral example from the SDK, then you will need to define NRFX_SPI0_ENABLED and&amp;nbsp;NRFX_SPI1_ENABLED to 1 as well.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together,&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>