<?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>NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33944/nrfx_spi-instantiation-fails-using-nrfx-why</link><description>Hello, 
 
 I am facing a really annoying issue when updating my SPI settings from the old nrf_drv_ towards the newer one nrfx , in SDK15. I am following the recommendtations of this link , but I am getting stuck when trying to create the SPI instance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jan 2020 14:15:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33944/nrfx_spi-instantiation-fails-using-nrfx-why" /><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/227924?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2020 14:15:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c94abf95-c0eb-4a2a-a37c-92d09f3aa8cc</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;What are your symptoms?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/227743?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 15:32:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21a39ca8-9ce1-4d53-813f-fe8c21062379</guid><dc:creator>Capitillar</dc:creator><description>&lt;p&gt;Has anyone solved this issue? I&amp;#39;m trying to combine the GFX and SAADC examples in SDK v16 and this old config file problem with SPI is giving me lots of problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/224010?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 15:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8be9404-c118-43ac-8cba-38cf06b55ab7</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Are you saying that the&amp;nbsp;&lt;a title="SPI Master Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/spi_master_example.html?cp=6_1_4_6_39"&gt;SPI Master Example&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a title="SPI Slave Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/spi_slave_example.html?cp=6_1_4_6_41"&gt;SPI Slave Example&lt;/a&gt;&amp;nbsp;are not working out of the box?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/222919?ContentTypeID=1</link><pubDate>Sun, 01 Dec 2019 20:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d37c1318-56d3-43a4-b268-a4abd81fc3d2</guid><dc:creator>lelisele</dc:creator><description>&lt;p&gt;That is incredible !!!!!! I&amp;#39;m trying to implement one stupid SPI interface to transfer 32 bits and it is impossible to find working example. Even from SDK16&amp;nbsp; doesn&amp;#39;t work with the same errors. Since few hours I&amp;#39;m playing with nrf_drv, nrfx_spi, nrfx_spim etc. I&amp;#39;ve one version for 8 bits but ..... for huge file ....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/220409?ContentTypeID=1</link><pubDate>Sat, 16 Nov 2019 00:34:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f62fa50-967c-4873-8645-bd210d43d4aa</guid><dc:creator>Felix</dc:creator><description>&lt;p&gt;This issue is still here with SDK 16.0;&amp;nbsp; I have wasted a lot of time this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/190592?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 15:23:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f7e95c3-27da-42bd-a010-04ae494deded</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Oh yeah, that was a bad typo :/&lt;br /&gt;&lt;br /&gt;&amp;quot;&lt;span&gt;Will your modification be added to future SDK releases?&amp;quot;&amp;nbsp; &lt;br /&gt;-&amp;nbsp;&lt;/span&gt;I&amp;#39;ve notified the developers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;Does the nrf_drv_spi code actually support EasyDMA Lists for SPIM3, and the extended SPIM features of hardware SS control the way the NRFX drivers do?&amp;quot;&amp;nbsp;&lt;br /&gt;- the array list is HW controlled so I think the driver should work with it, there&amp;#39;s just no API for it. You&amp;#39;ll have to turn it on via the HAL.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;How do we work-around the fact that the type&amp;nbsp;&lt;strong&gt;nrf_drv_spi_config_t&lt;/strong&gt;&amp;nbsp;doesn&amp;#39;t contained the necessary extended configuration parameters (use_hw_ss, dcx_pin, etc) that the&amp;nbsp;&lt;strong&gt;nrfx_spim_config_t&lt;/strong&gt;&amp;nbsp;type does.&amp;quot; &lt;br /&gt;- I suggest you use the NRFX driver or rely on the HAL.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/189703?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 16:05:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10e427df-7c66-43d9-a7c3-5faf5418dc2e</guid><dc:creator>Nicholas Lee</dc:creator><description>&lt;p&gt;Interesting. &lt;br /&gt;I have questions&lt;br /&gt;&lt;br /&gt;I&amp;#39;m guessing that line 4 of that was supposed to say NRFX_SPI3_ENABLED rather than the typo NRFX_SPI2_ENABLED?&lt;br /&gt;&lt;br /&gt;Will your modification be added to future SDK releases?&lt;/p&gt;
&lt;p&gt;Does the nrf_drv_spi code actually support EasyDMA Lists for SPIM3, and the extended SPIM features of hardware SS control the way the NRFX drivers do?&lt;br /&gt;&lt;br /&gt;How do we work-around the fact that the type &lt;strong&gt;nrf_drv_spi_config_t&lt;/strong&gt; doesn&amp;#39;t contained the necessary extended configuration parameters (use_hw_ss, dcx_pin, etc) that the &lt;strong&gt;nrfx_spim_config_t&lt;/strong&gt; type does.&lt;br /&gt;&lt;br /&gt;How would EasyDMA Lists be enabled using the nrf_drv_spi library?&lt;br /&gt;Currently I am using the following code to enable it with the NRFX drivers:&lt;br /&gt;&amp;nbsp; // Enable the use of EasyDMA ArrayList&lt;br /&gt;&amp;nbsp; spim3.p_reg-&amp;gt;TXD.LIST = 1;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/189683?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 14:18:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27a978ad-3d3b-4ebb-bf1a-191354fcaef2</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You need to add the following code snippet to line 142 of nrf_drv_spi.h:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if NRFX_CHECK(NRFX_SPIM3_ENABLED)
    #define NRF_DRV_SPI_INSTANCE_3 \
        { 3, { .spim = NRFX_SPIM_INSTANCE(3) }, true }
#elif NRFX_CHECK(NRFX_SPI2_ENABLED)
    #define NRF_DRV_SPI_INSTANCE_3 \
        { 3, { .spi = NRFX_SPI_INSTANCE(3) }, false }
#endif&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I used the SPI example from SDK15.3 with the PCA10056 as the target. Enabled NRFX_SPIM3_ENABLED under nRF_Drivers/NRFX_SPIM_ENABLED/ in sdk_config.h.&amp;nbsp;&lt;br /&gt;Then I set&amp;nbsp;SPI_INSTANCE to 3 and compiled successfully.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/189322?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 12:35:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df0cfcd3-0802-4e1d-acd5-0f1c103683b9</guid><dc:creator>Nicholas Lee</dc:creator><description>&lt;p&gt;And yet here we are, 8 months later and the #ifdef issue is still in the apply_old_config.h and still causing customers problems.&lt;br /&gt;&lt;br /&gt;For example, the &amp;quot;#ifdef&amp;nbsp; SPI_ENABLED&amp;quot; causes the undefine of the NRFX_SPIM_ENABLE, which prevents the use of the NRFX module which is the only code that allows customers to use the SPIM3 hardware. The Legacy nrf libraries don&amp;#39;t support SPIM3.&lt;br /&gt;&lt;br /&gt;This happens regardless of whether SPI_ENABLED&amp;nbsp; is set to 0 or 1 in sdk_config.h&lt;/p&gt;
&lt;p&gt;Only by going into sdk_config.h and commenting out the line defining SPI_ENABLED can this erroneous behaviour be overridden and the NRFX drivers for SPIM3 control be enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150181?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 07:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cd9bfa3-23c8-4a79-9067-1c7ffeb52de7</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;We&amp;#39;re about to release a new series of SDKs called nRF Connect SDK, I believe we will only have the nRFX drivers on those SDKs.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150178?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 07:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7d3bdaf-93c4-4afe-acce-da4632cebaab</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Compare your sdk_config.h file with the one in the SPIM example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150107?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 15:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54bcb544-1d72-46fa-af7f-650019c4bcdc</guid><dc:creator>eric-appion</dc:creator><description>&lt;p&gt;The problem is that almost all of the SDK configuration tests are done using #if, but for no good reason, apply_old_config.h is testing some of the configuration using #ifdef, which evaluates as true even if the define is zero.&amp;nbsp; These #ifdef in apply_old_config.h should be changed to #if. That will not break anything, because #if will still evaluate a configuration as false if it is not defined.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150102?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 15:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f732d15b-e639-406b-8703-bd39c71f03e5</guid><dc:creator>cp52</dc:creator><description>&lt;p&gt;OK well I have all of the above enabled but it is not being picked up in the nrfx_spi.h&lt;/p&gt;
&lt;p&gt;line 68 doesnt detect that this has been set to 1.&lt;/p&gt;
&lt;p&gt;#if NRFX_CHECK(NRFX_SPI0_ENABLED)&lt;br /&gt; NRFX_SPI0_INST_IDX,&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From my sdk_config.h&lt;/p&gt;
&lt;p&gt;Legacy:&lt;/p&gt;
&lt;p&gt;#ifndef SPI_ENABLED&lt;br /&gt;#define SPI_ENABLED 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;e&amp;gt; SPI0_ENABLED - Enable SPI0 instance&lt;br /&gt;//==========================================================&lt;br /&gt;#ifndef SPI0_ENABLED&lt;br /&gt;#define SPI0_ENABLED 1&lt;br /&gt;#endif&lt;br /&gt;// &amp;lt;q&amp;gt; SPI0_USE_EASY_DMA - Use EasyDMA&lt;/p&gt;
&lt;p&gt;#ifndef SPI0_USE_EASY_DMA&lt;br /&gt;#define SPI0_USE_EASY_DMA 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;// &amp;lt;e&amp;gt; NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver&lt;br /&gt;//==========================================================&lt;br /&gt;#ifndef NRFX_SPI_ENABLED&lt;br /&gt;#define NRFX_SPI_ENABLED 1&lt;br /&gt;#endif&lt;br /&gt;// &amp;lt;q&amp;gt; NRFX_SPI0_ENABLED - Enable SPI0 instance&lt;/p&gt;
&lt;p&gt;#ifndef NRFX_SPI0_ENABLED&lt;br /&gt;#define NRFX_SPI0_ENABLED 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So it looks like it is now only picking up if I create a nrfx_confg file.........&amp;nbsp; &amp;nbsp;Is this correct?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150093?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 14:54:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba4c7cc6-f4e1-4104-af59-dfda5a00ce16</guid><dc:creator>cp52</dc:creator><description>&lt;p&gt;Do you have a plan to fix this?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150092?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 14:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:218b6042-b5db-455e-8861-5b616408144a</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You&amp;#39;ll have to use the same settings for the NRFX drivers and legacy drivers in the sdk_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/150091?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 14:29:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a8c49a7-5ef4-4f74-b2ef-c64936f07a9c</guid><dc:creator>cp52</dc:creator><description>&lt;p&gt;Any news of this in SDK 15.2?&lt;/p&gt;
&lt;p&gt;Looks like its still an issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/142878?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 17:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a55bfa6c-0a80-4c19-a6c4-151c069fcf7e</guid><dc:creator>Eric Smith</dc:creator><description>&lt;p&gt;I have the same problem, and just spent an hour tracking it down. It is caused by the legacy adapter code in apply_old_config.h, which is included from nrf_glue.h, which is included from nrfx.h, which is included from just about everything peripheral-related.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re not using the legacy interface, this should leave your NRFX_SPI0_ENABLED etc. unchanged, but unfortunately it does not. If you don&amp;#39;t also have SPI0_ENABLED, it redefines NRFX_SPI0_ENABLED to 0. In my opinion, this is a serious defect in the SDK; using the new NRFX drivers shouldn&amp;#39;t require having the legacy defines also set.&lt;/p&gt;
&lt;p&gt;The workaround is to define SPI&amp;lt;n&amp;gt;_ENABLED to have the same value as NRFX_SPI&amp;lt;n&amp;gt;_ENABLED, to prevent apply_old_config from changing it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/132248?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 11:18:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6fadf93-265f-492e-9293-aa2601a1ea84</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I suggest you use the SPI example in SDK 15 and compare the two projects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/131159?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 09:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c90cc8e3-65dd-4d91-8a47-0477d002c9d1</guid><dc:creator>ndarkness</dc:creator><description>&lt;p&gt;Hi haakonsh, &lt;/p&gt;
&lt;p&gt;It does not work, I get the same kind of error as described in my post.&lt;/p&gt;
&lt;p&gt;Then I don&amp;#39;t understand why the documentation of the SDK15 suggest moving to the new drivers,NRFX,&amp;nbsp; if they don&amp;#39;t seem to work. Does this mean as well that I should skip including any NRFX library in my application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX_SPI instantiation fails using NRFX, why?</title><link>https://devzone.nordicsemi.com/thread/131025?ContentTypeID=1</link><pubDate>Fri, 04 May 2018 12:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73e7ab4c-3ba7-41e9-9995-2ce02c369f10</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Does it work if you use&amp;nbsp;static const nrfx_spi_t spi = NRFX_SPI_INSTANCE(2); instead of&amp;nbsp;SPI_INSTANCE_2?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The nrfx SDK module is a wrapper/translator between our &amp;quot;legacy&amp;quot; SDK and a future nRF Connect SDK. I suggest you use the &amp;quot;legacy&amp;quot; drivers for the time being.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>