<?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>SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108913/spi-driver-error-when-traffic-is-high</link><description>When there is a lot of traffic on the SPI-bus (connected to an SD-card), we see the following error: 
 `&amp;lt;err&amp;gt; spi_nrfx_spim: Update exceeds current buffer` 
 Why does it happen? How can we try to avoid it? 
 
 Thanks in advance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 May 2024 11:36:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108913/spi-driver-error-when-traffic-is-high" /><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/482258?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:36:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6d059b4-a867-4856-a314-30a049817b8c</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Fixed. &lt;br /&gt;For reference: &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/72368"&gt;github.com/.../72368&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/482216?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 09:05:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3324fe06-bba8-46c1-baa2-9a4b4f0a36df</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Is this fixed by the thing you found in the other ticket or is this still an issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/481806?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 13:14:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4a30c4d-da3d-4c5d-ad5c-f25df6f01ab0</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;I have only seen 8 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/481794?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 12:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:133559dd-bae3-411e-a97d-da50b4220c25</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Jared is away a couple of weeks, so I will continue to help with this ticket.&lt;/p&gt;
[quote user="Cla"]len=8 and ctx-&amp;gt;tx_len=1[/quote]
&lt;p&gt;Are these numbers the same every time or do they vary?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/481326?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2024 15:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e351b86-62b5-44d9-8e4b-4e36a4a48fad</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;len=8 and ctx-&amp;gt;tx_len=1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/472404?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 09:53:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3a920e1-0ad7-4411-a6c2-4523da54e18e</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;I will try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/472402?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 09:51:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deda2cc7-2294-43d8-b5bf-7eb0a2605b04</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t say that I&amp;#39;ve seen this error before. Can you set a breakpoint &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/c975910f84ffc53eee1f21aaebdcaff8d48c1f7e/drivers/spi/spi_context.h#L332"&gt;here&lt;/a&gt;&amp;nbsp;and share what ctx-tx_len and len is set to when the error happens?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/472295?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2024 16:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3fd2540-c60a-4557-a6b1-169877ed7a67</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Thanks for the quick reply. I unfortunately can not share the entire code. I can give some context.&lt;/p&gt;
&lt;p&gt;We are using the spi driver to talk to an sd card. We use the sdmmc-subsystem and access it over the disk-access-API.&lt;/p&gt;
&lt;p&gt;The disc-access-API is used for different things (the sd-card has a filesystem and a raw partition).&lt;/p&gt;
&lt;p&gt;We have cherry picked this fix: &lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/pull/67209"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/67209&lt;/a&gt; to allow for better sharing of the resource (without the fix, if two threads try to access the sd-card concurrently, one of them would fail).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you have any hints as to what that error (&lt;span&gt;spi_nrfx_spim: Update exceeds current buffer&lt;/span&gt;) might mean?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If possible, I could try to reduce the code later to something I could share, but it is likely difficult.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI driver error when traffic is high</title><link>https://devzone.nordicsemi.com/thread/472251?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2024 14:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa2bbc4-df5d-47d3-bae3-b4c1f1fd5ba6</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you share your code?&lt;/p&gt;
&lt;p&gt;The error is from &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/spi/spi_context.h#L325"&gt;here&lt;/a&gt;, which is called from &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/spi/spi_nrfx_spim.c#L403"&gt;here&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>