<?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>Configuring SPI -- is the legacy layer required?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36847/configuring-spi----is-the-legacy-layer-required</link><description>Hello, 
 
 I am migrating a BLE project from SDK 13.1 to SDK 15, and am running into an issue with SPI functionality. I have followed the migration guide for 14.2 to 15, changed the variable/function/macro names as appropriate, but it still does not function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Aug 2018 08:23:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36847/configuring-spi----is-the-legacy-layer-required" /><item><title>RE: Configuring SPI -- is the legacy layer required?</title><link>https://devzone.nordicsemi.com/thread/145622?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 08:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd359ca0-2ea1-48cc-b323-0fee218b596d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I have reported your suggestions to our SDK team.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring SPI -- is the legacy layer required?</title><link>https://devzone.nordicsemi.com/thread/145586?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 23:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e6eee92-174b-43e9-94ef-c8be8808ccf5</guid><dc:creator>Eric Smith</dc:creator><description>&lt;p&gt;Before reading your reply, I just tracked it down to the fact that apply_old_config.h uses #ifdef to check for the legacy configuration. That makes it think legacy is enabled if the define is to 0. It should use #if the way almost all other Nordic SDK feature tests work; that way if it is either undefined OR zero, the right thing will happen. In my opinion, this is still a defect in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring SPI -- is the legacy layer required?</title><link>https://devzone.nordicsemi.com/thread/142936?ContentTypeID=1</link><pubDate>Mon, 06 Aug 2018 06:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc11c41d-c0e2-44ba-84ac-0d99d98b8e49</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Just remove the legacy SPI driver config from sdk_config.h and you will be fine. apply_old_config.h will overwrite the config if the SPI_ENABLED config is defined, so you should make sure it is not defined at all. This can only be achieved by removing the config from sdk_config.h.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You do not need the legacy config when using the new nrfx drivers, so removing this is completely safe.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring SPI -- is the legacy layer required?</title><link>https://devzone.nordicsemi.com/thread/142880?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 17:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b558d221-95c1-44eb-9b8d-20fb3c8abc41</guid><dc:creator>Eric Smith</dc:creator><description>&lt;p&gt;It may be the _intention_ that the legacy driver is not required, but the configuration for it _IS_ required, due to (in my opinion) a bug in SDK 15.0 apply_old_config.h.&amp;nbsp; Here&amp;#39;s what I wrote in response to another ticket (206140) for the same issue:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&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: Configuring SPI -- is the legacy layer required?</title><link>https://devzone.nordicsemi.com/thread/141734?ContentTypeID=1</link><pubDate>Fri, 27 Jul 2018 14:44:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82ccf527-3d6e-4ef6-9078-39d7cd67a47e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You do not need the legacy layer when switching to the new NRFX drivers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should remove the old config for legacy driver from sdk_config.h file, to avoid the configuration to be overwritten by apply_old_config file.&lt;/p&gt;
&lt;p&gt;Attached an example that show how this should be done:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-b750fa7308aa4019b73e5d53573dd7f8/spi_5F00_nrfx.zip"&gt;devzone.nordicsemi.com/.../spi_5F00_nrfx.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>