<?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>ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110174/esb-high-frequency-transmission</link><description>Hi： 
 I have the following hardware structure： 
 FPGA &amp;lt; -- SPI -- &amp;gt; NRF5340 (TX) -- ! ( ESB ) ! -- NRF5340 (RX) &amp;lt; -- USB -- &amp;gt; PC 
 Due to the nature of my application, I need to send a lot of data through the ESB with high frequency. (250 bytes of data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Jun 2024 13:08:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110174/esb-high-frequency-transmission" /><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/488343?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 13:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa64d081-ffc1-48b0-93e5-cf79b29c98de</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Good to hear you found the problem. I will close the ticket then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/488216?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 06:38:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3d8edaa-59f6-4455-8c7a-ebb0300d241a</guid><dc:creator>carefree</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry to reply you so late. I solved the problem from the backup program, but your advice is very useful, thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/479123?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 07:17:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ac3431f-79a1-486d-99ab-d8cfb8e407d5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to implement a simple test where you just send dummy data from a timer, to double check if the problem is related to the handover of data between the SPI interface and the ESB library?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) Looking through your code I found&amp;nbsp;a potential issue in the SPI_Thread(..) thread function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (likely(!k_fifo_is_empty(&amp;amp;SPI_DATA_FIFO)))
{
    rx_data = k_fifo_get(&amp;amp;SPI_DATA_FIFO, K_FOREVER);
    if (rx_data)
    {
        memcpy(tx_payload.data, rx_data-&amp;gt;data, rx_data-&amp;gt;data_size);
        tx_payload.length = rx_data-&amp;gt;data_size;

        esb_write_payload(&amp;amp;tx_payload);
        
        gpio_pin_toggle_dt(&amp;amp;(test_gpios[1]));
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I read this code correctly it will call &lt;em&gt;k_fifo_is_empty(..)&lt;/em&gt; repeatedly as long as the FIFO is empty, without yielding the thread, which will block other threads in the system. You should be able to simply remove this if check, and just call &lt;em&gt;k_fifo_get(&amp;amp;SPI_DATA_FIFO, K_FOREVER)&lt;/em&gt;. In that case the thread will yield as long as there is no data in the FIFO, and only be resumed once the data is there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2)&amp;nbsp;Did you consider running the SPI coms from the appcore, so you didn&amp;#39;t need to bit bang the SPI master?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;3) Why is CRC disabled?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4) What kind of hardware are you using? Is this standard devkits or custom hardware?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/478746?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 11:29:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e6a02e9-7948-495d-bcb3-fd31f8637dbd</guid><dc:creator>carefree</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/debug.zip"&gt;devzone.nordicsemi.com/.../debug.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/478735?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 11:14:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcb511fd-4dd3-4a90-b668-f92d6b02fedc</guid><dc:creator>carefree</dc:creator><description>&lt;p&gt;I adjusted the number of retransmissions to 0, but it didn&amp;#39;t work very well.&lt;/p&gt;
&lt;p&gt;Yeah, like no signal, and most of the time it doesn&amp;#39;t reliably transmit for more than five seconds.&lt;/p&gt;
&lt;p&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/pastedimage1713179686024v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/478723?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 10:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5aa9f55-d7c8-42f4-99d2-29c710b98ab1</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sending 250 bytes every 2ms&amp;nbsp;should&amp;nbsp;be achievable if you use 2Mbps bitrate, but it won&amp;#39;t leave you a lot of overhead for retransmissions etc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems you are trying to send a lot of packets back to back, and then you are manually sending an ACK after a certain number of packets?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to simply send 250 byte payloads every 2ms with retransmit disabled to see if the performance is better? Then you should have time for an ACK after each packet, but you won&amp;#39;t have time for any retransmits.&amp;nbsp;&lt;/p&gt;
[quote user=""]--&amp;gt;&amp;nbsp;The results show that the ESB receives no more than 30s.&amp;nbsp;And I need to reset PTX to have a high probability to work again.[/quote]
&lt;p&gt;You mean reception stops completely after 30 seconds?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/478519?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 10:14:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f4a3e07-4b23-4f70-9f78-31aa9695f9bf</guid><dc:creator>carefree</dc:creator><description>&lt;p&gt;:(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB High frequency transmission</title><link>https://devzone.nordicsemi.com/thread/478504?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 09:27:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29683464-7035-4806-a9d9-1c1dd72976d8</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Our ESB experts are not in office today, but will be back next week.&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></channel></rss>