<?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>Add SPI in nrf connect sdk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104389/add-spi-in-nrf-connect-sdk</link><description>Hi, 
 I am trying to add SPI slave to my nrf53 audio application. However it seems like an overkill for me. I am kind of new to nrf connect sdk - I used nrf5 sdk a lot though. I am using nrf connect SDK v2.3.0. 
 I went step back and did nRF Connect SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Oct 2023 12:15:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104389/add-spi-in-nrf-connect-sdk" /><item><title>RE: Add SPI in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/452258?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 12:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:635bdb59-e011-48f2-8483-ec4154ef55ad</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello again Michael,&lt;/p&gt;
[quote user="biolu"] I wonder if I am maybe using incorrect pins on nrf5340 dk[/quote]
&lt;p&gt;So I assume you are still trying to get this working on the audio sample? Are you building this on the 5340DK or the audio DK? Does these configurations work for something more basic, like the hello world sample?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add SPI in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/451319?ContentTypeID=1</link><pubDate>Thu, 19 Oct 2023 13:14:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70b52eaa-a352-433a-b122-c5ec3c7acc33</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was actually able to make it run by moving overlay file to new &amp;quot;boards&amp;quot; directory. It was simply not detected before.&lt;/p&gt;
&lt;p&gt;However right now I am getting &amp;quot;device not ready&amp;quot; error. I wonder if I am maybe using incorrect pins on nrf5340 dk? Here is my configuration:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;	spi_slave_default: spi_slave_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIS_SCK, 1, 12)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_MOSI, 1, 14)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_MISO, 1, 13)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_CSN, 1, 0)&amp;gt;;
		};
	};

	spi_slave_sleep: spi_slave_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIS_SCK, 1, 12)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_MOSI, 1, 14)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_MISO, 1, 13)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_CSN, 1, 0)&amp;gt;;
			low-power-enable;
		};
	};
	
my_spi_slave: &amp;amp;spi3 {
	compatible = &amp;quot;nordic,nrf-spis&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi_slave_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi_slave_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	def-char = &amp;lt;0x00&amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio1 0 GPIO_ACTIVE_LOW&amp;gt;;
};
&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also wonder, if I properly defined chip select ??&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add SPI in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/450497?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2023 09:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef4c3a8f-2ad3-4c3c-a75e-2884f9f2524e</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello again, and sorry about the wait. It is&amp;nbsp;a bit busy&amp;nbsp;these days.&lt;/p&gt;
&lt;p&gt;It might be easier to start off getting SPI&amp;nbsp;included into something basic first like the hello world sample, just to check if one thing is working at the time. Now it might be that the overlay isn&amp;#39;t added correctly, configurations are missing, or that the audio app uses resources that you want to use for the SPI, etc. Though it seems that the errors messages are blaming the dts configurations.&lt;/p&gt;
&lt;p&gt;How are you adding the overlay file? What I find easiest is to simply press &amp;quot;Config Files&amp;quot; and &amp;quot;Device Tree&amp;quot; in VSC, in order to get the option to create an overlay file. This will automatically then be placed correctly, get the right name, be included in your project, etc.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1697449032379v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add SPI in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/449401?ContentTypeID=1</link><pubDate>Mon, 09 Oct 2023 16:03:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b697c14e-e574-4cbf-b145-ed9e81eefa65</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for providing this example. I tried to integrate it into nrf5340_audio sample application, but I am getting error:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;py -3 buildprog.py -c both -b release -d gateway -m internal -M -p
+------------+----------+---------+--------------+---------------------+---------------------+
|    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
| 1050172530 |  False   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
| 1050101868 |  False   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
| 1050188991 |  False   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
|    1000    |  False   | headset | Not selected |     Not selected    |     Not selected    |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Net core uses precompiled hex
Run: west build C:\le-audio-speaker\v2.3.0\nrf\applications\nrf5340_audio -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\le-audio-speaker\v2.3.0\nrf\applications\nrf5340_audio\build\dev_gateway\build_release
[3/321] Building C object CMakeFiles/app.dir/src/modules/audio_spi.c.obj
FAILED: CMakeFiles/app.dir/src/modules/audio_spi.c.obj
C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DARM_ALL_FAST_TABLES -DARM_DSP_CONFIG_TABLES -DARM_FAST_ALLOW_TABLES -DARM_FFT_ALLOW_TABLES -DARM_TABLE_RECIP_Q15 -DARM_TABLE_RECIP_Q31 -DARM_TABLE_SIN_F32 -DARM_TABLE_SIN_Q15 -DARM_TABLE_SIN_Q31 -DGATEWAY=2 -DHEADSET=1 -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -DZEPHYR_CONFIG_OVERRIDE=zephyr_fatfs_config.h -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/audio -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/bluetooth -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/drivers -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/events -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/utils -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/utils/macros -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/app -IC:/le-audio-speaker/v2.3.0/nrf/boards/arm/nrf5340_audio_dk_nrf5340 -IC:/le-audio-speaker/v2.3.0/zephyr/include -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/include/generated -IC:/le-audio-speaker/v2.3.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/le-audio-speaker/v2.3.0/zephyr/lib/libc/newlib/include -IC:/le-audio-speaker/v2.3.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/le-audio-speaker/v2.3.0/zephyr/subsys/bluetooth -IC:/le-audio-speaker/v2.3.0/zephyr/subsys/mgmt/mcumgr/util/include -IC:/le-audio-speaker/v2.3.0/zephyr/subsys/mgmt/mcumgr/transport/include -IC:/le-audio-speaker/v2.3.0/bootloader/mcuboot/boot/bootutil/include -IC:/le-audio-speaker/v2.3.0/bootloader/mcuboot/boot/zephyr/include -IC:/le-audio-speaker/v2.3.0/zephyr/subsys/usb/device -IC:/le-audio-speaker/v2.3.0/nrf/include -IC:/le-audio-speaker/v2.3.0/nrf/lib/contin_array/. -IC:/le-audio-speaker/v2.3.0/nrf/lib/pcm_mix/. -IC:/le-audio-speaker/v2.3.0/nrf/tests/include -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/common -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/common/bridge -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/common/platform_bsp -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/cs47l63 -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/cs47l63/bsp -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/cs47l63/config -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/cs47l63/fw_pt -IC:/le-audio-speaker/v2.3.0/modules/hal/cirrus-logic/cs47l63/generated -IC:/le-audio-speaker/v2.3.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/le-audio-speaker/v2.3.0/modules/hal/cmsis/CMSIS/DSP/Include -IC:/le-audio-speaker/v2.3.0/modules/hal/nordic/nrfx -IC:/le-audio-speaker/v2.3.0/modules/hal/nordic/nrfx/drivers/include -IC:/le-audio-speaker/v2.3.0/modules/hal/nordic/nrfx/mdk -IC:/le-audio-speaker/v2.3.0/zephyr/modules/hal_nordic/nrfx/. -IC:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/modules/libmetal/libmetal/lib/include -IC:/le-audio-speaker/v2.3.0/modules/lib/open-amp/open-amp/lib/include -IC:/le-audio-speaker/v2.3.0/modules/debug/segger/SEGGER -IC:/le-audio-speaker/v2.3.0/modules/debug/segger/Config -IC:/le-audio-speaker/v2.3.0/zephyr/modules/segger/. -IC:/le-audio-speaker/v2.3.0/modules/crypto/tinycrypt/lib/include -IC:/le-audio-speaker/v2.3.0/modules/lib/zcbor/include -IC:/le-audio-speaker/v2.3.0/nrfxlib/lc3/codec/inc -IC:/le-audio-speaker/v2.3.0/nrfxlib/lc3/platform/os/inc -IC:/le-audio-speaker/v2.3.0/nrfxlib/lc3/platform/os/baremetal/inc -IC:/le-audio-speaker/v2.3.0/nrfxlib/lc3/include -IC:/le-audio-speaker/v2.3.0/nrfxlib/softdevice_controller/include -IC:/le-audio-speaker/v2.3.0/zephyr/modules/fatfs -IC:/le-audio-speaker/v2.3.0/modules/fs/fatfs/include -isystem C:/le-audio-speaker/v2.3.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/build/dev_gateway/build_release/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=c:\gnuarmemb/arm-none-eabi -imacros C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/le-audio-speaker/v2.3.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/le-audio-speaker/v2.3.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/modules/audio_spi.c.obj -MF CMakeFiles\app.dir\src\modules\audio_spi.c.obj.d -o CMakeFiles/app.dir/src/modules/audio_spi.c.obj -c C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c
In file included from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/gcc.h:89,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain.h:50,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/kernel_includes.h:19,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/kernel.h:17,
                 from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.h:10,
                 from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:7:
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:41: error: &amp;#39;__device_dts_ord_DT_N_NODELABEL_reg_my_spi_master_BUS_P_cs_gpios_IDX_DT_N_NODELABEL_reg_my_spi_master_REG_IDX_0_VAL_ADDRESS_PH_ORD&amp;#39; undeclared here (not in a function)
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro &amp;#39;_DO_CONCAT&amp;#39;
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro &amp;#39;_CONCAT&amp;#39;
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro &amp;#39;DEVICE_NAME_GET&amp;#39;
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro &amp;#39;DEVICE_DT_NAME_GET&amp;#39;
  226 | #define DEVICE_DT_GET(node_id) (&amp;amp;DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/drivers/gpio.h:316:11: note: in expansion of macro &amp;#39;DEVICE_DT_GET&amp;#39;
  316 |   .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
      |           ^~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/drivers/spi.h:199:2: note: in expansion of macro &amp;#39;GPIO_DT_SPEC_GET_BY_IDX&amp;#39;
  199 |  GPIO_DT_SPEC_GET_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR(spi_dev))
      |  ^~~~~~~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:23:10: note: in expansion of macro &amp;#39;SPI_CS_GPIOS_DT_SPEC_GET&amp;#39;
   23 |  .gpio = SPI_CS_GPIOS_DT_SPEC_GET(DT_NODELABEL(reg_my_spi_master)),
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/arch/cpu.h:19,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/kernel_includes.h:33,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/kernel.h:17,
                 from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.h:10,
                 from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:7:
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/devicetree.h:190:36: error: &amp;#39;DT_N_NODELABEL_reg_my_spi_master_BUS_P_cs_gpios_IDX_DT_N_NODELABEL_reg_my_spi_master_REG_IDX_0_VAL_ADDRESS_VAL_pin&amp;#39; undeclared here (not in a function)
  190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
      |                                    ^~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/devicetree.h:3912:2: note: in definition of macro &amp;#39;DT_CAT7&amp;#39;
 3912 |  a1 ## a2 ## a3 ## a4 ## a5 ## a6 ## a7
      |  ^~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/devicetree/gpio.h:164:2: note: in expansion of macro &amp;#39;DT_PHA_BY_IDX&amp;#39;
  164 |  DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
      |  ^~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/drivers/gpio.h:317:10: note: in expansion of macro &amp;#39;DT_GPIO_PIN_BY_IDX&amp;#39;
  317 |   .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx),         \
      |          ^~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/drivers/spi.h:199:2: note: in expansion of macro &amp;#39;GPIO_DT_SPEC_GET_BY_IDX&amp;#39;
  199 |  GPIO_DT_SPEC_GET_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR(spi_dev))
      |  ^~~~~~~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/devicetree.h:2990:25: note: in expansion of macro &amp;#39;DT_CAT&amp;#39;
 2990 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS)
      |                         ^~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/drivers/spi.h:199:26: note: in expansion of macro &amp;#39;DT_BUS&amp;#39;
  199 |  GPIO_DT_SPEC_GET_BY_IDX(DT_BUS(spi_dev), cs_gpios, DT_REG_ADDR(spi_dev))
      |                          ^~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:23:10: note: in expansion of macro &amp;#39;SPI_CS_GPIOS_DT_SPEC_GET&amp;#39;
   23 |  .gpio = SPI_CS_GPIOS_DT_SPEC_GET(DT_NODELABEL(reg_my_spi_master)),
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/devicetree.h:190:29: note: in expansion of macro &amp;#39;DT_CAT&amp;#39;
  190 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
      |                             ^~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:23:35: note: in expansion of macro &amp;#39;DT_NODELABEL&amp;#39;
   23 |  .gpio = SPI_CS_GPIOS_DT_SPEC_GET(DT_NODELABEL(reg_my_spi_master)),
      |                                   ^~~~~~~~~~~~
In file included from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/gcc.h:89,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain.h:50,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/kernel_includes.h:19,
                 from C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/kernel.h:17,
                 from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.h:10,
                 from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:7:
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c: In function &amp;#39;spi_init&amp;#39;:
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:41: error: &amp;#39;__device_dts_ord_DT_N_NODELABEL_my_spi_master_ORD&amp;#39; undeclared (first use in this function)
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro &amp;#39;_DO_CONCAT&amp;#39;
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro &amp;#39;_CONCAT&amp;#39;
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro &amp;#39;DEVICE_NAME_GET&amp;#39;
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro &amp;#39;DEVICE_DT_NAME_GET&amp;#39;
  226 | #define DEVICE_DT_GET(node_id) (&amp;amp;DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:29:12: note: in expansion of macro &amp;#39;DEVICE_DT_GET&amp;#39;
   29 |  spi_dev = DEVICE_DT_GET(MY_SPI_MASTER);
      |            ^~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:41: note: each undeclared identifier is reported only once for each function it appears in
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro &amp;#39;_DO_CONCAT&amp;#39;
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro &amp;#39;_CONCAT&amp;#39;
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro &amp;#39;DEVICE_NAME_GET&amp;#39;
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro &amp;#39;DEVICE_DT_NAME_GET&amp;#39;
  226 | #define DEVICE_DT_GET(node_id) (&amp;amp;DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:29:12: note: in expansion of macro &amp;#39;DEVICE_DT_GET&amp;#39;
   29 |  spi_dev = DEVICE_DT_GET(MY_SPI_MASTER);
      |            ^~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c: In function &amp;#39;spi_slave_init&amp;#39;:
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:41: error: &amp;#39;__device_dts_ord_DT_N_NODELABEL_my_spi_slave_ORD&amp;#39; undeclared (first use in this function)
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro &amp;#39;_DO_CONCAT&amp;#39;
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro &amp;#39;_CONCAT&amp;#39;
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro &amp;#39;DEVICE_NAME_GET&amp;#39;
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro &amp;#39;DEVICE_DT_NAME_GET&amp;#39;
  226 | #define DEVICE_DT_GET(node_id) (&amp;amp;DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:51:18: note: in expansion of macro &amp;#39;DEVICE_DT_GET&amp;#39;
   51 |  spi_slave_dev = DEVICE_DT_GET(MY_SPI_SLAVE);
      |                  ^~~~~~~~~~~~~
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c: In function &amp;#39;spi_slave_write_test_msg&amp;#39;:
C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:90:2: warning: &amp;#39;spi_transceive_async&amp;#39; is deprecated [-Wdeprecated-declarations]
   90 |  int error = spi_transceive_async(spi_slave_dev, &amp;amp;spi_slave_cfg, &amp;amp;s_tx, &amp;amp;s_rx, &amp;amp;spi_slave_done_sig);
      |  ^~~
In file included from C:/le-audio-speaker/v2.3.0/nrf/applications/nrf5340_audio/src/modules/audio_spi.c:12:
C:/le-audio-speaker/v2.3.0/zephyr/include/zephyr/drivers/spi.h:778:32: note: declared here
  778 | __deprecated static inline int spi_transceive_async(const struct device *dev,
      |                                ^~~~~~~~~~~~~~~~~~~~
[12/321] Building C object zephyr/subsys/mgmt/mcumgr/transport/CMakeFiles/subsys__mgmt__mcumgr__transport.dir/src/smp_bt.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: &amp;#39;C:\Program Files\CMake\bin\cmake.EXE&amp;#39; --build &amp;#39;C:\le-audio-speaker\v2.3.0\nrf\applications\nrf5340_audio\build\dev_gateway\build_release&amp;#39;
Traceback (most recent call last):
  File &amp;quot;C:\le-audio-speaker\v2.3.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py&amp;quot;, line 406, in &amp;lt;module&amp;gt;
    __main()
  File &amp;quot;C:\le-audio-speaker\v2.3.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py&amp;quot;, line 389, in __main
    __build_module(build_cfg, options)
  File &amp;quot;C:\le-audio-speaker\v2.3.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py&amp;quot;, line 149, in __build_module
    raise Exception(&amp;quot;cmake error: &amp;quot; + str(ret_val))
Exception: cmake error: 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I wonder if it might be because of overlay files, that I put them in the incorrect location? I put them in the application main directory `applications\nrf5340_audio`.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Michal Biolik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add SPI in nrf connect sdk</title><link>https://devzone.nordicsemi.com/thread/449008?ContentTypeID=1</link><pubDate>Thu, 05 Oct 2023 12:44:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:734e32df-6176-4ba6-8ce2-9223b0ed40fd</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First of all, welcome to nRF Connect SDK. Jumping over to NCS is a large step but you made &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;the right choice&lt;/a&gt;&amp;nbsp;in choosing it, as well as starting off with the fundamentals course.&lt;/p&gt;
[quote user=""] Is it mandatory to create a devicetree overlay in this case?[/quote]
&lt;p&gt;I believe so, you&amp;#39;d also need a config to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_SPI"&gt;enable SPI&lt;/a&gt; drivers.&amp;nbsp;&lt;/p&gt;
[quote user=""]Would be possible to provide a step by step tutorial how to add a SPI slave functionality to a blinky sample application?[/quote]
&lt;p&gt;I actually think one is in the works, though I am not sure when it will be released.&amp;nbsp;&lt;a href="https://github.com/too1/ncs-spi-master-slave-example/tree/master"&gt;I have an SPI sample for NCS 2.3 here&lt;/a&gt; though. Let me know if you have any questions.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>