<?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>nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73263/nrf5340-spi-example-code</link><description>Hi, 
 could you provide me an example codes for SPI (serial peripheral communication), SPIM(serial peripheral communication master) and SPIS(serial peripheral communication slave) for nRF5340 SoC. 
 Thanks &amp;amp; Regards, 
 Srinivas.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Jul 2023 12:45:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73263/nrf5340-spi-example-code" /><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/436257?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 12:45:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f7b33ca-f77b-4f06-87e9-b05c79b7fe25</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;ok I do it, Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/436250?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 12:15:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1893917c-eebd-4e53-a312-10284f85a4aa</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Please post your issue in a new thread, instead of this closed ticket. We will then help you look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/436187?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 09:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15b00f30-a8c6-4ace-bbd6-0cd62f8ab141</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Other info:&lt;/p&gt;
&lt;p&gt;I noticed that&amp;nbsp;several inclusion files like as zephyr.h or nrf.h, for example, introduced fatal errrors.&lt;/p&gt;
&lt;p&gt;I can&amp;nbsp;include&amp;nbsp;&amp;lt;nrfx.h&amp;gt;,&amp;nbsp;&lt;span&gt;&lt;span&gt;&amp;lt;nrfx_spim.h&amp;gt; and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;lt;nrfx_gpiote.h&amp;gt; instead of.&lt;/p&gt;
&lt;p&gt;Seems that the 2.2.0 SDK does not permit that.&lt;/p&gt;
&lt;p&gt;------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Update 2023/07/13 - 12:06 AM:&lt;/p&gt;
&lt;p&gt;- I try to port one piece at time into my project in wich I have a DT che define the SPI4.&lt;/p&gt;
&lt;p&gt;- The inclusions are:&amp;nbsp;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;nrfx.h&amp;gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;nrfx_spim.h&amp;gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;nrfx_gpiote.h&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- I tested a declaration of a spi&amp;#39;s type&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrfx_spim_config_t&lt;/span&gt;&lt;span&gt; spim_config &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;NRFX_SPIM_DEFAULT_CONFIG&lt;/span&gt;&lt;span&gt;(APP_SPIM_SCK_PIN, APP_SPIM_MOSI_PIN, APP_SPIM_MISO_PIN, APP_SPIM_CS_PIN); . And it coimpile with success.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- If I insert the ISR:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;manual_isr_setup&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#ifdef&lt;/span&gt;&lt;span&gt; NRF9160_XXAA&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;IRQ_DIRECT_CONNECT&lt;/span&gt;&lt;span&gt;(UARTE3_SPIM3_SPIS3_TWIM3_TWIS3_IRQn, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nrfx_spim_3_irq_handler, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;irq_enable&lt;/span&gt;&lt;span&gt;(UARTE3_SPIM3_SPIS3_TWIM3_TWIS3_IRQn);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;#else&lt;/span&gt;&lt;span&gt; &amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;IRQ_DIRECT_CONNECT&lt;/span&gt;&lt;span&gt;(SPIM3_SPIS3_TWIM3_TWIS3_SPI3_TWI3_IRQn, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nrfx_spim_3_irq_handler, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;irq_enable&lt;/span&gt;&lt;span&gt;(SPIM3_SPIS3_TWIM3_TWIS3_SPI3_TWI3_IRQn);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#endif&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The building failed because the&amp;nbsp;SPIM3_SPIS3_TWIM3_TWIS3_SPI3_TWI3_IRQn is not declarated.&lt;/p&gt;
&lt;p&gt;------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Thanks Again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/436180?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 08:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b27221b-ee25-45b9-b0a4-f3e2c01326b4</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Hi! I&amp;#39;m trying to build the example (SPI Master) but I was not able to compile without errors.&lt;/p&gt;
&lt;p&gt;My environment is SDK 2.2.0, the board choosed is the Nordic 5340dk (I have an Ublox NORA EVK 106-B that is pretty similar &amp;amp; I have also the device tree). The output is:&lt;/p&gt;
&lt;p&gt;Building spi_master&lt;br /&gt;C:\Windows\system32\cmd.exe /d /s /c &amp;quot;west build --build-dir c:/Users/cirincione/nordic/spi_master/build c:/Users/cirincione/nordic/spi_master --pristine --board nrf5340dk_nrf5340_cpuapp -- -DNCS_TOOLCHAIN_VERSION:STRING=&amp;quot;NONE&amp;quot; -DCONF_FILE:STRING=&amp;quot;c:/Users/cirincione/nordic/spi_master/prj.conf&amp;quot; -DBOARD_ROOT:STRING=&amp;quot;c:/users/cirincione/nordic/peripheral_lbs;c:/users/cirincione/nordic/peripheral_lbsx;c:/users/cirincione/nordic/peripheral_lbs_int;c:/users/cirincione/nordic/testselcom&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;-- west build: generating a build system&lt;br /&gt;CMake Warning at C:/ncs/v2.2.0/zephyr/cmake/app/boilerplate.cmake:20 (message):&lt;br /&gt; Loading of Zephyr boilerplate.cmake directly is deprecated, please use&lt;br /&gt; &amp;#39;find_package(Zephyr)&amp;#39;&lt;br /&gt;Call Stack (most recent call first):&lt;br /&gt; CMakeLists.txt:9 (include)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Loading Zephyr default modules (Zephyr base).&lt;br /&gt;-- Application: C:/Users/cirincione/nordic/spi_master&lt;br /&gt;-- Found Python3: C:/ncs/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter &lt;br /&gt;-- Cache files will be written to: C:/ncs/v2.2.0/zephyr/.cache&lt;br /&gt;-- Zephyr version: 3.2.99 (C:/ncs/v2.2.0/zephyr)&lt;br /&gt;-- Found west (found suitable version &amp;quot;0.14.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;br /&gt;-- Board: nrf5340dk_nrf5340_cpuapp&lt;br /&gt;-- Found host-tools: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)&lt;br /&gt;-- Found toolchain: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)&lt;br /&gt;-- Found Dtc: C:/ncs/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;) &lt;br /&gt;-- Found BOARD.dts: C:/ncs/v2.2.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts&lt;br /&gt;-- Generated zephyr.dts: C:/Users/cirincione/nordic/spi_master/build/zephyr/zephyr.dts&lt;br /&gt;-- Generated devicetree_generated.h: C:/Users/cirincione/nordic/spi_master/build/zephyr/include/generated/devicetree_generated.h&lt;br /&gt;-- Including generated dts.cmake file: C:/Users/cirincione/nordic/spi_master/build/zephyr/dts.cmake&lt;br /&gt;Parsing C:/ncs/v2.2.0/zephyr/Kconfig&lt;br /&gt;Loaded configuration &amp;#39;C:/ncs/v2.2.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig&amp;#39;&lt;br /&gt;Merged configuration &amp;#39;c:/Users/cirincione/nordic/spi_master/prj.conf&amp;#39;&lt;/p&gt;
&lt;p&gt;error: NRFX_SPIM (defined at C:/ncs/v2.2.0/zephyr/modules/hal_nordic\nrfx/Kconfig:190,&lt;br /&gt;modules\hal_nordic\nrfx/Kconfig:190) is assigned in a configuration file, but is not directly user-&lt;br /&gt;configurable (has no prompt). It gets its value indirectly from other symbols. See&lt;br /&gt;&lt;a href="http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_SPIM"&gt;docs.zephyrproject.org/.../kconfig.html&lt;/a&gt; and/or look up NRFX_SPIM in the&lt;br /&gt;menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,&lt;br /&gt;and Kconfig - Tips and Best Practices sections of the manual might be helpful too.&lt;/p&gt;
&lt;p&gt;CMake Error at C:/ncs/v2.2.0/zephyr/cmake/modules/kconfig.cmake:328 (message):&lt;br /&gt; command failed with return code: 1&lt;br /&gt;Call Stack (most recent call first):&lt;br /&gt; C:/ncs/v2.2.0/nrf/cmake/modules/kconfig.cmake:29 (include)&lt;br /&gt; C:/ncs/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)&lt;br /&gt; C:/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)&lt;br /&gt; C:/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)&lt;br /&gt; C:/ncs/v2.2.0/zephyr/cmake/app/boilerplate.cmake:25 (find_package)&lt;br /&gt; CMakeLists.txt:9 (include)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;-- Configuring incomplete, errors occurred!&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;C:\ncs\toolchains\v2.2.0\opt\bin\cmake.EXE&amp;#39; &amp;#39;-DWEST_PYTHON=C:\ncs\toolchains\v2.2.0\opt\bin\python.exe&amp;#39; &amp;#39;-Bc:\Users\cirincione\nordic\spi_master\build&amp;#39; -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONF_FILE:STRING=c:/Users/cirincione/nordic/spi_master/prj.conf &amp;#39;-DBOARD_ROOT:STRING=c:/users/cirincione/nordic/peripheral_lbs;c:/users/cirincione/nordic/peripheral_lbsx;c:/users/cirincione/nordic/peripheral_lbs_int;c:/users/cirincione/nordic/testselcom&amp;#39; &amp;#39;-Sc:\Users\cirincione\nordic\spi_master&amp;#39;&lt;/p&gt;
&lt;p&gt;* The terminal process terminated with exit code: 1. &lt;br /&gt; * Terminal will be reused by tasks, press any key to close it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The same output if I try with the Ublox Board.&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t understand the modifications that I need to do in the project to make it buildable.&lt;/p&gt;
&lt;p&gt;The target is to build a working example for the Ublox EVK &amp;amp; SPI4 in order to test the SPIM API.&lt;/p&gt;
&lt;p&gt;Could anyone support me?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Many Thanks &amp;amp; Best Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/303890?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 05:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71e21468-70a7-4217-95c3-26c89312963d</guid><dc:creator>SRINI</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My problem is resolved. I am confused in pin connection. After change the pin connections it&amp;#39;s working fine.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Srinivas Rao&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/303857?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 16:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95897755-da78-4173-a873-b780f732d763</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="SRINI"]&lt;p&gt;we have two ports for nRF5340 which port 0 and port 1.&lt;/p&gt;
&lt;p&gt;In SPI master code , where port is defined in the code.&lt;/p&gt;[/quote]
&lt;p&gt;Do you mean GPIO port 0 and port 1?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Which SPI master code are you using now? The nrfx_spim example, or the one using the native Zephyr SPI API?&lt;/p&gt;
[quote user="SRINI"]&lt;p&gt;NRFX_PRS_ENABLED macro is disabled in nrfx_spim.c file.&lt;br /&gt;I am getting below error, if I enable this macro using nrfx_config_nrf5340_application.h file.&lt;/p&gt;
&lt;p&gt;undefined reference to `nrfx_prs_acquire&amp;#39;&lt;/p&gt;
&lt;p&gt;May I know why it is disabled in nrf connect SDK and I didn&amp;#39;t face this issue when Iam work with nRF5 SDK for nrf52832&lt;/p&gt;[/quote]
&lt;p&gt;You can enable PRS in NCS by adding the Kconfig &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/kconfig/CONFIG_NRFX_PRS.html"&gt;CONFIG_NRFX_PRS&lt;/a&gt;=y&amp;nbsp;to your prj.conf file (or an overlay file).&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><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302351?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 11:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20ac24a6-0b37-495f-a3e8-aed915572657</guid><dc:creator>SRINI</dc:creator><description>&lt;p&gt;NRFX_PRS_ENABLED macro is disabled in nrfx_spim.c file.&lt;br /&gt;I am getting below error, if I enable this macro using nrfx_config_nrf5340_application.h file.&lt;/p&gt;
&lt;p&gt;undefined reference to `nrfx_prs_acquire&amp;#39;&lt;/p&gt;
&lt;p&gt;May I know why it is disabled in nrf connect SDK and I didn&amp;#39;t face this issue when Iam work with nRF5 SDK for nrf52832&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302305?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 08:04:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e03aac8-bb0d-4ed3-87c0-f34d7bd4969d</guid><dc:creator>SRINI</dc:creator><description>&lt;p&gt;we have two ports for nRF5340 which port 0 and port 1.&lt;/p&gt;
&lt;p&gt;In SPI master code , where port is defined in the code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302145?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 13:36:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3139d625-7ea6-4388-9b5f-dec0f6718261</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70627/what-s-the-official-way-to-implement-a-simple-peripheral-spi-i2c-etc-with-ncs/290615#290615"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302129?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 12:35:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d067cded-5c08-4041-a688-7d824d317101</guid><dc:creator>SRINI</dc:creator><description>&lt;p&gt;Do you have any example codes with built-in SPI driver in Zephyr ? .&lt;/p&gt;
&lt;p&gt;please let me know how can we do SPI configuration and pin settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302128?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 12:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c23365e-16c9-40e3-a53f-8cd31fed37fa</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;No, the driver will only enable the interrupt, you need to connect the handler to the interrupt.&lt;/p&gt;
&lt;p&gt;Note that there is also a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/zephyr/reference/peripherals/spi.html"&gt;built-in SPI driver in Zephyr&lt;/a&gt; that you can use, if you do not want to use the nrfx_spim/spis drivers directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302104?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 10:28:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96694153-6b79-4530-8801-91c0c027c2b6</guid><dc:creator>SRINI</dc:creator><description>&lt;p&gt;As per your mentioned , I have added changes . now it&amp;#39;s compiled . i have a one doubt why we need to add separately manual isr setup function. is it implemented in the SPI driver?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302098?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 10:16:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb1e3ffe-7764-4fbb-a9b5-5bdfc4374a82</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You get that error because you did not add the changes mentioned in the second thread I linked.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302086?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 09:43:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c9b2d95-080e-4fb4-a897-d923d20bb89f</guid><dc:creator>SRINI</dc:creator><description>&lt;p&gt;I tried to compile code&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrfx_5F00_spi_5F00_master.zip"&gt;nrfx_spi_master.zip&lt;/a&gt; . but I got compilation errors as shown below&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;C:\Nordic&amp;gt;west build -d C:\sample\spi_master\build_nrf5340dk_nrf5340_cpuapp --board nrf5340dk_nrf5340_cpuapp C:\sample\spi_master&lt;br /&gt;-- west build: generating a build system&lt;br /&gt;-- Application: C:/sample/spi_master&lt;br /&gt;-- Using NCS Toolchain 1.5.0 for building. (C:/Nordic/v1.5.0/toolchain/cmake)&lt;br /&gt;-- Zephyr version: 2.4.99 (C:/Nordic/v1.5.0/zephyr)&lt;br /&gt;-- Found Python3: C:/Nordic/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter&lt;br /&gt;-- Found west (found suitable version &amp;quot;0.9.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;br /&gt;-- Board: nrf5340dk_nrf5340_cpuapp&lt;br /&gt;-- Cache files will be written to: C:/Nordic/v1.5.0/zephyr/.cache&lt;br /&gt;-- Found dtc: C:/Nordic/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)&lt;br /&gt;-- Found toolchain: gnuarmemb (C:/Nordic/v1.5.0/toolchain/opt)&lt;br /&gt;-- Found BOARD.dts: C:/Nordic/v1.5.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts&lt;br /&gt;-- Generated zephyr.dts: C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp/zephyr/zephyr.dts&lt;br /&gt;-- Generated devicetree_unfixed.h: C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/devicetree_unfixed.h&lt;br /&gt;-- Generated device_extern.h: C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/device_extern.h&lt;br /&gt;Parsing C:/Nordic/v1.5.0/zephyr/Kconfig&lt;br /&gt;Loaded configuration &amp;#39;C:/Nordic/v1.5.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig&amp;#39;&lt;br /&gt;Merged configuration &amp;#39;C:/sample/spi_master/prj.conf&amp;#39;&lt;br /&gt;Configuration saved to &amp;#39;C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp/zephyr/.config&amp;#39;&lt;br /&gt;Kconfig header saved to &amp;#39;C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/autoconf.h&amp;#39;&lt;br /&gt;-- The C compiler identification is GNU 9.2.1&lt;br /&gt;-- The CXX compiler identification is GNU 9.2.1&lt;br /&gt;-- The ASM compiler identification is GNU&lt;br /&gt;-- Found assembler: C:/Nordic/v1.5.0/toolchain/opt/bin/arm-none-eabi-gcc.exe&lt;br /&gt;-- Configuring done&lt;br /&gt;-- Generating done&lt;br /&gt;-- Build files have been written to: C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp&lt;br /&gt;-- west build: building application&lt;br /&gt;[7/148] Building C object CMakeFiles/app.dir/src/main.c.obj&lt;br /&gt;FAILED: CMakeFiles/app.dir/src/main.c.obj&lt;br /&gt;C:\Nordic\v1.5.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.4.99-ncs1 -DKERNEL -DNRF5340_XXAA_APPLICATION -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Nordic/v1.5.0/zephyr/include -Izephyr/include/generated -IC:/Nordic/v1.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/Nordic/v1.5.0/nrf/include -IC:/Nordic/v1.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx/mdk -IC:/Nordic/v1.5.0/zephyr/modules/hal_nordic/nrfx/. -isystem C:/Nordic/v1.5.0/zephyr/lib/libc/minimal/include -isystem c:/nordic/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/nordic/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -isystem C:/Nordic/v1.5.0/nrfxlib/crypto/nrf_cc312_platform/include -Os -imacros C:/sample/spi_master/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m33 -mthumb -mabi=aapcs -imacros C:/Nordic/v1.5.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/sample/spi_master=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Nordic/v1.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Nordic/v1.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c&lt;br /&gt;In file included from C:/Nordic/v1.5.0/zephyr/include/arch/arm/aarch32/irq.h:20,&lt;br /&gt; from C:/Nordic/v1.5.0/zephyr/include/arch/arm/aarch32/arch.h:27,&lt;br /&gt; from C:/Nordic/v1.5.0/zephyr/include/arch/cpu.h:19,&lt;br /&gt; from C:/Nordic/v1.5.0/zephyr/include/kernel_includes.h:33,&lt;br /&gt; from C:/Nordic/v1.5.0/zephyr/include/kernel.h:17,&lt;br /&gt; from C:/Nordic/v1.5.0/zephyr/include/zephyr.h:18,&lt;br /&gt; from ../src/main.c:2:&lt;br /&gt;../src/main.c: In function &amp;#39;manual_isr_setup&amp;#39;:&lt;br /&gt;../src/main.c:39:21: error: &amp;#39;SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn&amp;#39; undeclared (first use in this function); did you mean &amp;#39;SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQn&amp;#39;?&lt;br /&gt; 39 | IRQ_DIRECT_CONNECT(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 0,&lt;br /&gt; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;C:/Nordic/v1.5.0/zephyr/include/sw_isr_table.h:71:5: note: in definition of macro &amp;#39;Z_ISR_DECLARE&amp;#39;&lt;br /&gt; 71 | {irq, flags, (void *)&amp;amp;func, (const void *)param}&lt;br /&gt; | ^~~&lt;br /&gt;C:/Nordic/v1.5.0/zephyr/include/irq.h:112:2: note: in expansion of macro &amp;#39;ARCH_IRQ_DIRECT_CONNECT&amp;#39;&lt;br /&gt; 112 | ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)&lt;br /&gt; | ^~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;../src/main.c:39:2: note: in expansion of macro &amp;#39;IRQ_DIRECT_CONNECT&amp;#39;&lt;br /&gt; 39 | IRQ_DIRECT_CONNECT(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 0,&lt;br /&gt; | ^~~~~~~~~~~~~~~~~~&lt;br /&gt;../src/main.c:39:21: note: each undeclared identifier is reported only once for each function it appears in&lt;br /&gt; 39 | IRQ_DIRECT_CONNECT(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 0,&lt;br /&gt; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;C:/Nordic/v1.5.0/zephyr/include/sw_isr_table.h:71:5: note: in definition of macro &amp;#39;Z_ISR_DECLARE&amp;#39;&lt;br /&gt; 71 | {irq, flags, (void *)&amp;amp;func, (const void *)param}&lt;br /&gt; | ^~~&lt;br /&gt;C:/Nordic/v1.5.0/zephyr/include/irq.h:112:2: note: in expansion of macro &amp;#39;ARCH_IRQ_DIRECT_CONNECT&amp;#39;&lt;br /&gt; 112 | ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)&lt;br /&gt; | ^~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;../src/main.c:39:2: note: in expansion of macro &amp;#39;IRQ_DIRECT_CONNECT&amp;#39;&lt;br /&gt; 39 | IRQ_DIRECT_CONNECT(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn, 0,&lt;br /&gt; | ^~~~~~~~~~~~~~~~~~&lt;br /&gt;[16/148] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;C:\Nordic\v1.5.0\toolchain\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;C:\sample\spi_master\build_nrf5340dk_nrf5340_cpuapp&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI example code</title><link>https://devzone.nordicsemi.com/thread/302063?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 08:24:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95da8b01-318b-4ddf-95fc-27274453fafe</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find SPI master and slave examples in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70105/how-to-use-spi-interface-in-a-zephyr-sample-example/288587#288587"&gt;this post&lt;/a&gt;. I have tested the master example on nRF5340, and it needed a small change to build, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/69279/spim-transfer-crashing-on-nrf5340/288955#288955"&gt;this post&lt;/a&gt;. I assume a similar change would be needed for the slave example.&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>