<?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>Best way to dynamically switch channels with an ESB</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118725/best-way-to-dynamically-switch-channels-with-an-esb</link><description>I am trying to communicate with multiple devices simultaneously using NCS2.8.0 and ESB. For this reason, I need to switch communication channels quickly. 
 I understand that in a normal ESB network, channel switching is meaningless. I have chosen a tricky</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Feb 2025 13:27:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118725/best-way-to-dynamically-switch-channels-with-an-esb" /><item><title>RE: Best way to dynamically switch channels with an ESB</title><link>https://devzone.nordicsemi.com/thread/523279?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 13:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc3b76e0-8316-470a-8b93-3f97fd542751</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Those functions are disabling different parts of ESB as ESB start have started many different things, ESB stop needs to stop all those things start in the start. The documentation of these functions can be found here which will explain you the difference between these functions&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nrf-apis-latest/page/group_esb_gac0c41d17ab4ab2f2b6abafe10d9fd3e8.html#gac0c41d17ab4ab2f2b6abafe10d9fd3e8"&gt;esb_suspend&lt;/a&gt;()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nrf-apis-latest/page/group_esb_ga4222224724143f35d1e40e4667bed77c.html#ga4222224724143f35d1e40e4667bed77c"&gt;esb_stop_rx&lt;/a&gt;()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nrf-apis-latest/page/group_esb_gaf452342a02aa8dad7ced301f0005e26b.html#gaf452342a02aa8dad7ced301f0005e26b"&gt;esb_disable&lt;/a&gt;()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to dynamically switch channels with an ESB</title><link>https://devzone.nordicsemi.com/thread/523225?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 10:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3955140-a5ac-4393-8bae-5cd9887e3e7c</guid><dc:creator>DX_HK</dc:creator><description>&lt;p&gt;Thank you for your comment.&lt;br /&gt;As you say, the actual elapsed time was shorter, significantly shorter than 180us.&lt;br /&gt;Perhaps the measurement method was inappropriate and other processing times were included.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;However, while trying to switch channels, a new question arose.&lt;/p&gt;
&lt;p&gt;First of all, it seems that there are multiple functions that disable ESB.&lt;/p&gt;
&lt;p&gt;esb_suspend()&lt;br /&gt;esb_stop_rx()&lt;br /&gt;esb_disable()&lt;/p&gt;
&lt;p&gt;esb_disable() seems inappropriate, but please tell me the difference between these functions and their uses.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to dynamically switch channels with an ESB</title><link>https://devzone.nordicsemi.com/thread/521922?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 12:46:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa209878-7887-43b4-8927-d1d491c109a8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Hiroyuki-san&lt;/p&gt;
[quote user=""]But it doesn&amp;#39;t seem optimal. Is there a better solution?[/quote]
&lt;p&gt;Let us look at the code of&amp;nbsp;&lt;span&gt;esb_stop_rx()&lt;/span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;int esb_stop_rx(void)
{
	if ((esb_state != ESB_STATE_PRX) &amp;amp;&amp;amp; (esb_state != ESB_STATE_PRX_SEND_ACK)) {
		return -EINVAL;
	}

	esb_ppi_for_txrx_clear(true, false, fast_switching);
	esb_fem_reset();

	nrf_radio_shorts_disable(NRF_RADIO, 0xFFFFFFFF);
	nrf_radio_int_disable(NRF_RADIO, 0xFFFFFFFF);

	on_radio_disabled = NULL;

	nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_DISABLED);
	nrf_radio_task_trigger(NRF_RADIO, NRF_RADIO_TASK_DISABLE);

	while (!nrf_radio_event_check(NRF_RADIO, NRF_RADIO_EVENT_DISABLED)) {
		/* wait for register to settle */
	}

	nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_DISABLED);

	esb_state = ESB_STATE_IDLE;

	return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In this the most time consuming things I see are the&amp;nbsp;NRF_RADIO_TASK_DISABLE and&amp;nbsp;esb_fem_reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am a bit confused why the FEM calls here are not fenced with a config to see if you have a FEM in your product or not. Are you having FEM in your product? If not, try to optimize the esb initialization and deinitalization to remove fem stuff.&lt;/p&gt;
&lt;p&gt;The other time consuming thing is&amp;nbsp;&lt;span&gt;NRF_RADIO_TASK_DISABLE&amp;nbsp;and from the spec&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellpadding="4" cellspacing="0" frame="border" rules="all" summary=""&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="1" headers="d24928677e108991 d24928677e109011" rowspan="1" valign="top" width="12.82051282051282%"&gt;t&lt;sub&gt;TXDISABLE&lt;/sub&gt;&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108993 d24928677e109014" rowspan="1" valign="top" width="38.46153846153847%"&gt;
&lt;p&gt;Time between DISABLE task and DISABLED event when the radio was in TX and mode is set to 1Msps&lt;/p&gt;
&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108995 d24928677e109017" rowspan="1" valign="top" width="6.41025641025641%"&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108995 d24928677e109027" rowspan="1" valign="top" width="6.41025641025641%"&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108995 d24928677e109037" rowspan="1" valign="top" width="6.41025641025641%"&gt;&lt;span&gt;..&lt;/span&gt;&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108998 d24928677e109048" rowspan="1" valign="top" width="6.41025641025641%"&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108998 d24928677e109051" rowspan="1" valign="top" width="6.41025641025641%"&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;6&lt;/p&gt;
&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e108998 d24928677e109054" rowspan="1" valign="top" width="6.41025641025641%"&gt;&lt;span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td colspan="1" headers="d24928677e109001 d24928677e109057" rowspan="1" valign="top" width="3.8461538461538463%"&gt;us&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;So it seems like the 180us only on esb_stop_rx does not add up unless the FEM processing is taking significant of this time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>