<?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>Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83642/only-spi-nodes-accepted-in-soc-spi-40023000</link><description>I&amp;#39;m running in to the issue mentioned in the tile; &amp;quot; Only spi nodes accepted in /soc/spi@40023000/&amp;quot;. I&amp;#39;m using nRF connect and built a driver for the TI ADS1291 analog front end but I&amp;#39;m facing this error and I&amp;#39;m unable to find any documentation. I&amp;#39;ve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jan 2022 12:13:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83642/only-spi-nodes-accepted-in-soc-spi-40023000" /><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348270?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 12:13:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d55c81d-c90f-44cd-a29c-a371fa840872</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Glad to see you figured it out!&lt;/p&gt;
&lt;p&gt;Good luck on your project, best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348253?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 11:17:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:578b6262-b43c-4007-b109-5ffa11528574</guid><dc:creator>glenn-ide</dc:creator><description>&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Sorry, I&amp;nbsp;didn&amp;#39;t look close enough at the messages. You&amp;#39;re right the second message is generated by a different bit of code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Upon closer inspection it seems my spi code was doing something funky. I&amp;#39;ve now fixed it and it does write data:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-size:inherit;"&gt;Device ADS1291 is not ready&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:inherit;"&gt;[00:00:00.000,366] [0m&amp;lt;dbg&amp;gt; ADS1291.ads1291_bus_access: REG Read for register 0x00 resulting in 0x20 sent[0m&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:inherit;"&gt;[00:00:00.000,366] [0m&amp;lt;dbg&amp;gt; ADS1291.ads1291_bus_access: Number of registers to read/write 2[0m&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:inherit;"&gt;[00:00:00.000,457] [1;31m&amp;lt;err&amp;gt; ADS1291: Failed to read id. Expected 0x2A got 0x00[0m&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-2022_2D00_01_2D00_18-120727.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;The error message which started this post still remains but at least I can now continue development.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks for making me look deeper in to this.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348230?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 10:16:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f59c16a0-dbd6-4172-8231-5657d35b2aa9</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;I see&lt;/p&gt;
[quote user="glenn-ide"]&lt;div&gt;&lt;span&gt;Device ADS1291 is not ready&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;00:00:00.000,427]&lt;/span&gt;&lt;span&gt; [1;31m&amp;lt;err&amp;gt; ADS1291: Failed to read id. Expected 0x2A got 0x0&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;I suspect dealing with these errors would solve your problem, maybe there should be a difference in the SPI config that you&amp;#39;ve forgotten?&lt;/p&gt;
&lt;p&gt;Any idea where &amp;quot;Expected 0x2A&amp;quot; comes from?&lt;/p&gt;
&lt;p&gt;Have you tried putting small sleeps at critical points of your initialization, such as between&amp;nbsp;DEVICE_DT_GET_ANY and&amp;nbsp;device_is_ready?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348108?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 15:39:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4841135d-e888-434f-a0f5-3b1330072ea4</guid><dc:creator>glenn-ide</dc:creator><description>&lt;p&gt;I see the following:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;Device ADS1291 is not ready&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;00:00:00.000,427]&lt;/span&gt;&lt;span&gt; [1;31m&amp;lt;err&amp;gt; ADS1291: Failed to read id. Expected 0x2A got 0x0[0m&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The first log line is generated by&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;const struct device *afe_dev = DEVICE_DT_GET_ANY(ti_ads1291);
if (!device_is_ready(afe_dev)) {
	printk(&amp;quot;Device %s is not ready\n&amp;quot;, afe_dev-&amp;gt;name);
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The second log line is generated by:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static int ads1291_init(const struct device *dev)
{
    struct ads1291_data *data = dev-&amp;gt;data;
    const struct ads1291_dev_config *cfg = dev-&amp;gt;config;
    int ret;

    data-&amp;gt;bus = device_get_binding(cfg-&amp;gt;spi_port);
    if (!data-&amp;gt;bus) {
        LOG_ERR(&amp;quot;SPI device not found: %s&amp;quot;, cfg-&amp;gt;spi_port);
        return -EINVAL;
    }&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This code uses the following SPI config in the config struct which I copied from the ADXL372 example:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const struct ads1291_dev_config ads1291_config = {

    .spi_port = DT_INST_BUS_LABEL(0),
    .spi_slave = DT_INST_REG_ADDR(0),
    .spi_max_frequency = DT_INST_PROP(0, spi_max_frequency),
#if DT_INST_SPI_DEV_HAS_CS_GPIOS(0)
    .gpio_cs_port = DT_INST_SPI_DEV_CS_GPIOS_LABEL(0),
    .cs_gpio = DT_INST_SPI_DEV_CS_GPIOS_PIN(0),
    .cs_flags = DT_INST_SPI_DEV_CS_GPIOS_FLAGS(0),
#endif&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I&amp;#39;ve had a second look with the logic analyser and it does seem to do something, but I also expect to see MOSI data. It does seem to recognize the &amp;#39;spi-max-frequency = 2 MHz&amp;#39; which I set in the device tree under the sensor.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-2022_2D00_01_2D00_17-162213.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;For example, this is how the ADXL372 example looks with the same pin configuration as my project:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-2022_2D00_01_2D00_17-163533.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348098?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 15:03:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a3008ad-950c-4737-bead-c5650e1a1281</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hm, I cannot see anything obvious missing.&lt;/p&gt;
&lt;p&gt;I assume you&amp;#39;ve already double and triple checked that the gpio pins you&amp;#39;ve defined in the devicetree correspond with how your sensor is connected?&lt;/p&gt;
&lt;p&gt;I find it strange that you don&amp;#39;t see anything when measuring the pins. Are any of your function calls returning error codes that could give you hints?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348028?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 12:26:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a66e1580-ce60-4bb3-8b49-f9f2c97301b4</guid><dc:creator>glenn-ide</dc:creator><description>&lt;p&gt;Of course:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI=y
CONFIG_SERIAL=y
CONFIG_MAIN_STACK_SIZE=2000
CONFIG_PPI_TRACE=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_PWM=y
CONFIG_COUNTER=y
CONFIG_NEWLIB_LIBC=y
CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_DIS_MODEL=&amp;quot;ABC&amp;quot;
CONFIG_BT_DIS_MANUF=&amp;quot;IDE Group&amp;quot;
CONFIG_BT_DIS_PNP=n
CONFIG_BT_BAS=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_DEVICE_NAME=&amp;quot;ABC&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_EMGS=y
CONFIG_ADS1291=y
CONFIG_ADS1291_ODR_2000HZ=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/348026?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 12:23:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44a66e4a-3f38-4c62-b8f7-30656ca28902</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hm, that is strange.&lt;/p&gt;
&lt;p&gt;Since your code is compiling but the behavior isn&amp;#39;t as expected, the first thing I would do is double check the contents of the prj.conf file, maybe some module is missing there.&lt;/p&gt;
&lt;p&gt;Can you show me the content of the file?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/347991?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 10:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2157135d-26a8-4e5a-8006-c0d6a67488a2</guid><dc:creator>glenn-ide</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m aware of the ticket. I&amp;#39;ve tried restarting VSCode and my laptop multiple times but no success. The main difference between their code and mine is they specifiy &amp;quot;on-bus: spi&amp;quot; in their yaml but this is not neccesary since it is included in spi-device.yaml (also tested this doesn&amp;#39;t fix my issue).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, the order of their CMakeList is a bit different which I&amp;#39;ve tried copying but no success.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You&amp;#39;re right; my code compiles fine but gives an error in VSCode. Also, I&amp;#39;ve tried measuring the physical signals but I don&amp;#39;t see anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/347973?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 10:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61ade59e-9851-4819-8dc3-8b17ef6a9dc1</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;This issue seems to be very similar to your problem:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81697/only-spi-nodes-accepted-in-soc-peripheral-50000000-spi-b000-soc-peripheral-50000000-spi-b000-ads129xr-0"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/81697/only-spi-nodes-accepted-in-soc-peripheral-50000000-spi-b000-soc-peripheral-50000000-spi-b000-ads129xr-0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;maybe looking over his config could help you?&lt;/p&gt;
&lt;p&gt;Also, I assume your code compiles properly, and the error message appears similarly as in this other issue?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/347769?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 13:10:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90be5e54-b083-40ac-9883-f4e6cabd255d</guid><dc:creator>glenn-ide</dc:creator><description>&lt;p&gt;Hi, thanks for looking in to this.&lt;br /&gt;&lt;br /&gt;For my custom project it looks like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;		spi2: arduino_spi: spi@40023000 {
			#address-cells = &amp;lt; 0x1 &amp;gt;;
			#size-cells = &amp;lt; 0x0 &amp;gt;;
			reg = &amp;lt; 0x40023000 0x1000 &amp;gt;;
			interrupts = &amp;lt; 0x23 0x1 &amp;gt;;
			status = &amp;quot;okay&amp;quot;;
			label = &amp;quot;SPI_2&amp;quot;;
			compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
			sck-pin = &amp;lt; 0x19 &amp;gt;;
			mosi-pin = &amp;lt; 0x17 &amp;gt;;
			miso-pin = &amp;lt; 0x18 &amp;gt;;
			cs-gpios = &amp;lt; &amp;amp;gpio0 0x4 0x1 &amp;gt;;
			ads1291@0 {
				compatible = &amp;quot;ti,ads1291&amp;quot;;
				reg = &amp;lt; 0x0 &amp;gt;;
				spi-max-frequency = &amp;lt; 0x1e8480 &amp;gt;;
				label = &amp;quot;ADS1291&amp;quot;;
				int1-gpios = &amp;lt; &amp;amp;gpio0 0x1f 0x1 &amp;gt;;
			};
		};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The example looks similar to yours but some of the gpios are different.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;		spi2: arduino_spi: spi@40023000 {
			#address-cells = &amp;lt; 0x1 &amp;gt;;
			#size-cells = &amp;lt; 0x0 &amp;gt;;
			reg = &amp;lt; 0x40023000 0x1000 &amp;gt;;
			interrupts = &amp;lt; 0x23 0x1 &amp;gt;;
			status = &amp;quot;okay&amp;quot;;
			label = &amp;quot;SPI_2&amp;quot;;
			compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
			sck-pin = &amp;lt; 0x19 &amp;gt;;
			mosi-pin = &amp;lt; 0x17 &amp;gt;;
			miso-pin = &amp;lt; 0x18 &amp;gt;;
			cs-gpios = &amp;lt; &amp;amp;gpio0 0x16 0x1 &amp;gt;;
			adxl372@0 {
				compatible = &amp;quot;adi,adxl372&amp;quot;;
				reg = &amp;lt; 0x0 &amp;gt;;
				spi-max-frequency = &amp;lt; 0x7a1200 &amp;gt;;
				label = &amp;quot;ADXL372&amp;quot;;
				int1-gpios = &amp;lt; &amp;amp;gpio0 0xb 0x0 &amp;gt;;
			};
		};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any significant differences between my custom one and the example..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Only spi nodes accepted in /soc/spi@40023000/</title><link>https://devzone.nordicsemi.com/thread/347768?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 13:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff48db3-4bf7-45bf-8c83-3118eb133310</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;Can you show me how the spi2 node looks in your devicetree (in the build/zephyr/zephyr.dts file) when you have compiled the ADXL372 and the ADS1291 projects?&lt;/p&gt;
&lt;p&gt;If there is a difference it might help you spot what you have missed.&lt;/p&gt;
&lt;p&gt;On my end it looks like this in the ADXL372 project:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;spi2: arduino_spi: spi@40023000 {
	#address-cells = &amp;lt; 0x1 &amp;gt;;
	#size-cells = &amp;lt; 0x0 &amp;gt;;
	reg = &amp;lt; 0x40023000 0x1000 &amp;gt;;
	interrupts = &amp;lt; 0x23 0x1 &amp;gt;;
	status = &amp;quot;okay&amp;quot;;
	label = &amp;quot;SPI_2&amp;quot;;
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	sck-pin = &amp;lt; 0x19 &amp;gt;;
	mosi-pin = &amp;lt; 0x17 &amp;gt;;
	miso-pin = &amp;lt; 0x18 &amp;gt;;
	cs-gpios = &amp;lt; &amp;amp;gpio0 0x16 0x1 &amp;gt;;
	adxl372@0 {
		compatible = &amp;quot;adi,adxl372&amp;quot;;
		reg = &amp;lt; 0x0 &amp;gt;;
		spi-max-frequency = &amp;lt; 0x7a1200 &amp;gt;;
		label = &amp;quot;ADXL372&amp;quot;;
		int1-gpios = &amp;lt; &amp;amp;gpio0 0xb 0x0 &amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>