<?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>SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119397/spim4-irq-handler-in-sdk-v2-7-0</link><description>Hello Nordic Team, 
 I am currently implementing low-level SPI communication using SDK v2.7.0 and nRF 5340dk . Could you please let me know the name of the IRQ handler for SPIM4? 
 In version 52 Board , I used the SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Mar 2025 08:55:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119397/spim4-irq-handler-in-sdk-v2-7-0" /><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525664?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 08:55:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9197a3f6-7731-4323-be36-7efea9f1feb0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;That is about what I would have expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525654?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 08:03:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bed0a17-a3bc-4e4f-8f21-f5b0f6a4e72f</guid><dc:creator>kelk</dc:creator><description>&lt;p&gt;I have a delay of 6.568 &amp;micro;s before the transmission and 21.24 &amp;micro;s after.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525639?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 07:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dac8305-6bff-435a-9c76-c5437f2f8004</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Glad to hear that it worked. Regarding the CS delay,&amp;nbsp;even if you set it to 0 there&amp;nbsp;will still be some delay because of overhead in the driver. How long is the delay?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525573?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 16:00:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ba30781-74bc-4ff1-aa54-df38f380df08</guid><dc:creator>kelk</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It finally worked with the &lt;code&gt;IRQ_CONNECT&lt;/code&gt; macro &amp;mdash; thank you!&lt;/p&gt;
&lt;p&gt;I have a question about SPI with Zephyr. There&amp;rsquo;s a parameter to set the duration&amp;nbsp; between the edge of the slave select (SS) and the clock edge.&lt;/p&gt;
&lt;p&gt;I set it to &lt;code&gt;NULL&lt;/code&gt;, but there&amp;rsquo;s still a delay. Could you show me the correct way to properly set it to &lt;code&gt;NULL&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define SS_DURATION 0
const spi_operation_t operation=SPI_WORD_SET(8)|SPI_OP_MODE_MASTER|SPI_LOCK_ON|SPI_CS_ACTIVE_HIGH;
const struct spi_dt_spec spi_dev=SPI_DT_SPEC_GET(DT_NODELABEL(mcp2518fdspi),operation,SS_DURATION);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525197?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2025 06:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5c11a35-ca1b-44d7-9478-b4f823053fed</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;This assert is raised if no callback is registered:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/4fb7ccb30a1db35c1cf48f1eac87310125ba1072/drivers/src/nrfx_spim.c#L948"&gt;https://github.com/NordicSemiconductor/nrfx/blob/4fb7ccb30a1db35c1cf48f1eac87310125ba1072/drivers/src/nrfx_spim.c#L948&lt;/a&gt;.&amp;nbsp; I don&amp;#39;t know if you are using the nrfx_spim driver or writing your own.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525130?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 16:30:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13a254a6-3fd7-4a82-a98b-fc6538928b47</guid><dc:creator>kelk</dc:creator><description>&lt;p&gt;hello,&lt;/p&gt;
&lt;p&gt;i used this:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define SPIM_INST_IDX 4
 
    IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_SPIM_INST_GET(SPIM_INST_IDX)), IRQ_PRIO_LOWEST,
                NRFX_SPIM_INST_HANDLER_GET(SPIM_INST_IDX), 0, 0);
    
  &lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;and i received this Error:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;ASSERTION FAIL [p_cb-&amp;gt;handler] @ WEST_TOPDIR/modules/hal/nordic/nrfx/drivers/src/nrfx_spim.c:948
[00:00:00.425,567] &amp;lt;err&amp;gt; os: r0/a1:  0x00000004  r1/a2:  0x000003b4  r2/a3:  0x00000003
[00:00:00.425,598] &amp;lt;err&amp;gt; os: r3/a4:  0x00000004 r12/ip:  0x00000014 r14/lr:  0x0000612b
[00:00:00.425,598] &amp;lt;err&amp;gt; os:  xpsr:  0x2900001a
[00:00:00.425,598] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0000913e
[00:00:00.425,628] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:00.425,659] &amp;lt;err&amp;gt; os: Fault during interrupt handling

[00:00:00.425,659] &amp;lt;err&amp;gt; os: Current thread: 0x20000708 (unknown)
[00:00:00.493,743] &amp;lt;err&amp;gt; os: Halting system&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;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525125?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 15:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b33ca031-0edd-419f-80fd-f772b1f5487f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQn is now named SERIAL_IRQn:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1740671312343v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="kelk@"]Secondly, I attempted to use &lt;code&gt;SPIM4_IRQHandler&lt;/code&gt;, but encountered the following error:[/quote]
&lt;p&gt;Did you use the&amp;nbsp;IRQ_CONNECT() macro to connect the IRQ to the interrupt handler?&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ade49f081df6fab0db6288bad25be4f5eff7ef3a/samples/boards/nrf/nrfx/src/main.c#L50"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/ade49f081df6fab0db6288bad25be4f5eff7ef3a/samples/boards/nrf/nrfx/src/main.c#L50&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525122?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 15:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d020e4b-07da-4004-8afe-88ef24ba529d</guid><dc:creator>kelk</dc:creator><description>&lt;p data-start="63" data-end="81"&gt;&lt;strong data-start="63" data-end="79"&gt;Hello Vidar,&lt;/strong&gt;&lt;/p&gt;
&lt;p data-start="83" data-end="120"&gt;Thank you for your prompt response.&lt;/p&gt;
&lt;p&gt;Firstly, the &amp;quot;nrf5340_application.h&amp;quot; file I have differs from the one in the link you provided. For instance, it does not include the &lt;code data-start="256" data-end="293"&gt;SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQn and&amp;nbsp;SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQn . it just encludes the&amp;nbsp;&lt;span&gt;SPIM4_IRQn.&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p data-start="298" data-end="385"&gt;Secondly, I attempted to use &lt;code data-start="327" data-end="345"&gt;SPIM4_IRQHandler&lt;/code&gt;, but encountered the following error:&lt;/p&gt;
&lt;p data-start="298" data-end="385"&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:07.623,840] &amp;lt;err&amp;gt; os: Unhandled IRQn: 10
[00:00:07.623,870] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 1: Unhandled interrupt on CPU 0
[00:00:07.623,901] &amp;lt;err&amp;gt; os: Current thread: 0x20000708 (unknown)
[00:00:07.652,618] &amp;lt;err&amp;gt; os: Halting system&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM4 IRQ Handler in SDK v2.7.0</title><link>https://devzone.nordicsemi.com/thread/525087?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 14:02:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec098ff5-1aa0-453d-858c-bc33aea59d40</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The SPIM4 instance differs from the other SPIM instances in that it is not shared with any other peripherals. Therefore it has its own IRQ number assigned to it. The handler is named&amp;nbsp; &amp;#39;SPIM4_IRQHandler&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/blob/0f462f62cc0c347303e67f733fef369bb411c733/nrfx/mdk/nrf5340_application.h#L79"&gt;https://github.com/zephyrproject-rtos/hal_nordic/blob/0f462f62cc0c347303e67f733fef369bb411c733/nrfx/mdk/nrf5340_application.h#L79&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>