<?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>adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60810/adxl362-sample-not-compiling</link><description>Hi, 
 I am attempting to get the adxl362 sample working with the nrf9160 dk board. I am using the nordic SDK v1.2.0. I cannot get it to compile, compiling the code below fails with the error: 
 &amp;quot;DT_INST_0_ADI_ADXL362_LABEL undeclared&amp;quot;. 
 I even tried</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 13:20:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60810/adxl362-sample-not-compiling" /><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247359?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 13:20:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:691c6259-bf10-4e9a-95c1-1ab49b31b0bc</guid><dc:creator>PeterC</dc:creator><description>&lt;p&gt;Hi Jon,&lt;/p&gt;
&lt;p&gt;So I finally have the adxl362 working. I had downloaded the latest version of the SDK in a new directory for testing but even after loading the adxl362 sample project from the new directory SES was still compiling the project using the older drivers in the old directory...&lt;/p&gt;
&lt;p&gt;Even though my &amp;quot;old&amp;quot; version of the SDK was a clean install from February there has been some changes since then which prevented the setup below from working.&lt;/p&gt;
&lt;p&gt;So here are the files that work for the DK board using SPI3 (pins 10 through to 12 with pin 13 as the cs). I am not using the interrupt pin at the moment so needed to comment out the trigger code for the sample to output data.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrf9160_pca10090ns.overlay&lt;span&gt;&amp;nbsp; file :&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;amp;spi3 {&lt;br /&gt;compatible = &amp;quot;nordic,nrf-spim&amp;quot;;&lt;br /&gt;status = &amp;quot;okay&amp;quot;;&lt;br /&gt;sck-pin = &amp;lt;10&amp;gt;;&lt;br /&gt;mosi-pin = &amp;lt;11&amp;gt;;&lt;br /&gt;miso-pin = &amp;lt;12&amp;gt;;&lt;br /&gt;cs-gpios = &amp;lt;&amp;amp;gpio0 13 0&amp;gt;;&lt;/p&gt;
&lt;p&gt;adxl362@0 {&lt;br /&gt;compatible = &amp;quot;adi,adxl362&amp;quot;;&lt;br /&gt;label = &amp;quot;ADXL362&amp;quot;;&lt;br /&gt;spi-max-frequency = &amp;lt;8000000&amp;gt;;&lt;br /&gt;reg = &amp;lt;0&amp;gt;;&lt;br /&gt;int1-gpios = &amp;lt;&amp;amp;gpio0 9 0&amp;gt;;&lt;br /&gt;};&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;config file for DK using SPI 3&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SENSOR=y
CONFIG_ADXL362=y
CONFIG_ADXL362_TRIGGER_GLOBAL_THREAD=y
CONFIG_ADXL362_INTERRUPT_MODE=1
CONFIG_ADXL362_ABS_REF_MODE=1

# SPI
CONFIG_SPI=y
CONFIG_SPI_3_NRF_SPIM=y
CONFIG_SPI_3=y 
CONFIG_SPI_NRFX=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247236?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 08:23:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d98f895-1385-436e-9e9a-0c3c5c6bc397</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;I tried this now (only compiling) on NCS 1.2.0. I put the following into a file called &lt;strong&gt;nrf9160_pca10090ns.overlay &lt;/strong&gt;in the adxl362 sample folder. The .overlay file name is important it needs to match the board. This now compiles without error on my setup.&lt;/p&gt;
&lt;p&gt;&amp;amp;spi3 {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-spim&amp;quot;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; sck-pin = &amp;lt;3&amp;gt;;&lt;br /&gt; mosi-pin = &amp;lt;4&amp;gt;;&lt;br /&gt; miso-pin = &amp;lt;5&amp;gt;;&lt;br /&gt; cs-gpios = &amp;lt;&amp;amp;gpio0 8 0&amp;gt;;&lt;/p&gt;
&lt;p&gt;adxl362@0 {&lt;br /&gt; compatible = &amp;quot;adi,adxl362&amp;quot;;&lt;br /&gt; label = &amp;quot;ADXL362&amp;quot;;&lt;br /&gt; spi-max-frequency = &amp;lt;8000000&amp;gt;;&lt;br /&gt; reg = &amp;lt;0&amp;gt;;&lt;br /&gt; int1-gpios = &amp;lt;&amp;amp;gpio0 9 0&amp;gt;;&lt;br /&gt; };&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247178?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 23:24:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8434334c-1318-482c-be9c-d185473f9c86</guid><dc:creator>PeterC</dc:creator><description>&lt;p&gt;I tried the different formatting without success.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for you input though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247176?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 22:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6868bce2-8191-44cc-a46a-e575d53720db</guid><dc:creator>PeterC</dc:creator><description>&lt;p&gt;But I will try that different formatting,&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247175?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 22:20:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57d1e6c3-ed91-4d09-8671-ab61e858f741</guid><dc:creator>PeterC</dc:creator><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;I am trying to add a adxl362 to the DK board as I am doing all my development on that, I will be transferring the code to the thingy for field testing though.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247174?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 22:08:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a492dac2-d57f-4c73-a093-f9989a9b1a25</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;Hi, not sure if it will be of any help but I noticed that the .dts for the Thingy:91 (nrf9160_pca20035) which uses the ADXL362 use a bit different .dts formatitng than your overlay.&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/c04db43c62eb8c120f556139712fc0737674a73f/boards/arm/nrf9160_pca20035/nrf9160_pca20035_common.dts#L129"&gt;github.com/.../nrf9160_pca20035_common.dts&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247172?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 21:35:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68d77ef8-ac8c-42a1-88c9-c3f797427f16</guid><dc:creator>PeterC</dc:creator><description>&lt;p&gt;Thanks for your reply,&lt;/p&gt;
&lt;p&gt;That did clear that error, but now I have another error in adxl362.c&lt;/p&gt;
&lt;p&gt;&amp;quot;CONFIG_ADXL362_DEV_NAME undeclared&amp;quot;:&lt;/p&gt;
&lt;p&gt;DEVICE_AND_API_INIT(adxl362, CONFIG_ADXL362_DEV_NAME, adxl362_init,&lt;br /&gt; &amp;amp;adxl362_data, NULL, POST_KERNEL,&lt;br /&gt; CONFIG_SENSOR_INIT_PRIORITY, &amp;amp;adxl362_api_funcs);&lt;/p&gt;
&lt;p&gt;If I replace&amp;nbsp;&lt;span&gt;CONFIG_ADXL362_DEV_NAME&amp;nbsp; with&amp;nbsp;&amp;quot;SPI_3&amp;quot;&amp;nbsp; (a guess at this stage!) the error moves to &amp;quot;adxl362_config undeclared&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What am I missing to set this up properly?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adxl362 sample not compiling</title><link>https://devzone.nordicsemi.com/thread/247171?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 21:13:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:821fffe8-5445-4667-aaf7-da952487c9cd</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;Have you tried the following?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;device_get_binding&lt;/span&gt;&lt;span&gt;(&amp;quot;ADXL362&amp;quot;);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>