<?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>undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10713/undefined-spis-macros-despite-being-defined</link><description>Hello 
 I have recently downloaded SDK v10 for nRF51822 development using Keil uVision 5.14 IDE. 
 I am wishing to combine SPI slave function with custom BLE services/characteristics using S110 V8. As such, I’ve experimented with the SPI slave example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Dec 2015 23:36:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10713/undefined-spis-macros-despite-being-defined" /><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/40003?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 23:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5138b41b-a2e2-4bf1-9aeb-8bc35df09db5</guid><dc:creator>monpetit</dc:creator><description>&lt;p&gt;That&amp;#39;s great! You solved the problem.
And... God, It&amp;#39;s slave mode! I missed it. ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/40002?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 19:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:432e8e6c-31de-4955-ac3a-03aaaae25ac4</guid><dc:creator>mikaelbdl</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;It seems taking a break and attacking this issue in the morning with a cup of coffee was a good idea.&lt;/p&gt;
&lt;p&gt;monpetit was almost correct except that the #define that needed enabling was SPISx_ENABLED (for slave mode), not SPIx_ENABLED. I somehow overlooked this several times yesterday as they looks so similar.&lt;/p&gt;
&lt;p&gt;Nordic SPI Slave example defines by default:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPIS1_ENABLED 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However Nordic template project does not, so must be set if porting..&lt;/p&gt;
&lt;p&gt;Thank you for your help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/39997?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 18:34:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f6c2bb7-73d7-4caf-a9e0-df800ba2e58b</guid><dc:creator>mikaelbdl</dc:creator><description>&lt;p&gt;Yes the header is included in both main.c and spi_slave_example.c where the functionality is employed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/40001?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 07:05:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f0995e0-8286-49c8-a49f-cf0e6c00769b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;does the c file which is failing to compile actually include the header file in which you define these things, either directly, or indirectly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/39998?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 04:36:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2b5458a-4dee-41a2-b7ff-786ce3920791</guid><dc:creator>monpetit</dc:creator><description>&lt;p&gt;How interesting... I haven&amp;#39;t met a problem like this. If you solve it please share with me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/40000?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 03:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1f9a77d-d807-4cd7-9f08-23f108090453</guid><dc:creator>mikaelbdl</dc:creator><description>&lt;p&gt;FYI I have tried this with a fresh new template project from SDK 10 to try and isolate anything I may have done with my template modified for AN36. Essentially I repeated exactly what I did in my initial post (add nrf_drv_spis, including files etc.). Once again the same build errors show, so I can be sure that so far it is not to do with my meddling as far as getting the template to do what I want for AN36.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/39999?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 03:14:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d41b3e0-76c6-42a7-aa46-038729e24e74</guid><dc:creator>mikaelbdl</dc:creator><description>&lt;p&gt;It should be using SPI1 so I set &amp;quot;#define SPI1_ENABLED 1&amp;quot; in the same file but the exact same errors show.&lt;/p&gt;
&lt;p&gt;Interestingly, the example provided with SDK 10 does not have any of them enabled, but it appears to build and work fine...&lt;/p&gt;
&lt;p&gt;*edit: Pins are configured the same way as in the SDK8.1.1 example which is in the spi_slave_example_init() which is according to the board header, in my case custom board (almost same as pca10028.h) so this must explain why it works without touching nrf_drv_config.h:
spis_config.miso_pin        = SPIS_MISO_PIN;
spis_config.mosi_pin        = SPIS_MOSI_PIN;
spis_config.sck_pin         = SPIS_SCK_PIN;
spis_config.csn_pin         = SPIS_CSN_PIN;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: undefined SPIS macros...despite being defined?</title><link>https://devzone.nordicsemi.com/thread/39996?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 02:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b22470c-96b6-4f1b-8a8b-8ae0f63dcaf0</guid><dc:creator>monpetit</dc:creator><description>&lt;p&gt;When you use nrf_drv_xxx components you should modify header file &amp;quot;nrf_drv_config.h&amp;quot;. Open it and find definition SPI0_ENABLED and modify it to 1.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPI0_ENABLED 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you can assign SPI pins to your taste.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPI0_CONFIG_SCK_PIN         2
#define SPI0_CONFIG_MOSI_PIN        3
#define SPI0_CONFIG_MISO_PIN        4
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>