<?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>When BLE is Shared with 2.4g wireless via timeslot, the initial failure of esb occurs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53004/when-ble-is-shared-with-2-4g-wireless-via-timeslot-the-initial-failure-of-esb-occurs</link><description>Platform：NRF51822, SDK12.1 S130 
 Phenomenon：By flipping the led light in the NRF_RADIO_CALLBACK_SIGNAL_TYPE_START event, it is known that the timeslot request is normal. The ESB initializer is executed in the NRF_RADIO_CALLBACK_SIGNAL_TYPE_START event</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Oct 2019 11:42:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53004/when-ble-is-shared-with-2-4g-wireless-via-timeslot-the-initial-failure-of-esb-occurs" /><item><title>RE: When BLE is Shared with 2.4g wireless via timeslot, the initial failure of esb occurs</title><link>https://devzone.nordicsemi.com/thread/213898?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 11:42:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82814189-0107-430d-9726-c1dcb266aff1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Yuxu,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you base your code on any our our example ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did the code work for you before ? Which modification caused the application stopped working ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you tell what exactly happen when &amp;quot;the program dies&amp;quot; ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When BLE is Shared with 2.4g wireless via timeslot, the initial failure of esb occurs</title><link>https://devzone.nordicsemi.com/thread/213816?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 08:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2236ff2-57f2-43cd-afe8-d93502fa479b</guid><dc:creator>yuxu</dc:creator><description>&lt;p&gt;#include &amp;lt;stdbool.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;quot;sdk_common.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_esb.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_error.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_esb_error_codes.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_delay.h&amp;quot;&lt;br /&gt;#include &amp;quot;app_util.h&amp;quot;&lt;/p&gt;
&lt;p&gt;static nrf_esb_payload_t tx_payload = NRF_ESB_CREATE_PAYLOAD(0,0x01,0x02,3,4,5,6);&lt;/p&gt;
&lt;p&gt;static nrf_esb_payload_t rx_payload;&lt;br /&gt;static uint8_t tx_flag;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;static void nrf_esb_event_handler(nrf_esb_evt_t const * p_event)&lt;br /&gt;{&lt;br /&gt; switch (p_event-&amp;gt;evt_id)&lt;br /&gt; {&lt;br /&gt; case NRF_ESB_EVENT_TX_SUCCESS:&lt;br /&gt;// printf(&amp;quot;TX SUCCESS EVENT\r\n&amp;quot;);&lt;br /&gt; break;&lt;br /&gt; &lt;br /&gt; case NRF_ESB_EVENT_TX_FAILED:&lt;br /&gt;// printf(&amp;quot;TX FAILED EVENT\r\n&amp;quot;);&lt;br /&gt; (void) nrf_esb_flush_tx();&lt;br /&gt; (void) nrf_esb_start_tx();&lt;br /&gt; break;&lt;br /&gt; &lt;br /&gt; case NRF_ESB_EVENT_RX_RECEIVED:&lt;br /&gt;// printf(&amp;quot;RX RECEIVED EVENT\r\n&amp;quot;);&lt;br /&gt; while (nrf_esb_read_rx_payload(&amp;amp;rx_payload) == NRF_SUCCESS)&lt;br /&gt; {&lt;br /&gt; if (rx_payload.length &amp;gt; 0)&lt;br /&gt; {&lt;br /&gt; // printf(&amp;quot;RX RECEIVED PAYLOAD\r\n&amp;quot;);&lt;br /&gt; for( uint8_t i = 0; i &amp;lt; rx_payload.length; i++ )&lt;br /&gt; {&lt;br /&gt;// printf(&amp;quot;%02x &amp;quot;,rx_payload.data[i]);&lt;br /&gt; }&lt;br /&gt; // printf(&amp;quot;\r\n&amp;quot;);&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt; break;&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;uint32_t esb_init( void )&lt;br /&gt;{&lt;br /&gt; uint32_t err_code;&lt;br /&gt; uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};&lt;br /&gt; uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};&lt;br /&gt; uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; nrf_esb_config_t nrf_esb_config = NRF_ESB_DEFAULT_CONFIG;&lt;br /&gt;&lt;br /&gt; memcpy(&amp;amp;nrf_esb_config, &amp;amp;nrf_esb_config, sizeof(nrf_esb_config_t));&lt;br /&gt; nrf_esb_config.retransmit_count = 6;&lt;br /&gt; nrf_esb_config.selective_auto_ack = false;&lt;br /&gt; nrf_esb_config.protocol = NRF_ESB_PROTOCOL_ESB_DPL;&lt;br /&gt; nrf_esb_config.bitrate = NRF_ESB_BITRATE_2MBPS;&lt;br /&gt; nrf_esb_config.event_handler = nrf_esb_event_handler;&lt;br /&gt; nrf_esb_config.mode = NRF_ESB_MODE_PTX;&lt;br /&gt; &lt;br /&gt; nrf_esb_config.radio_irq_priority = 0;&lt;/p&gt;
&lt;p&gt;err_code = nrf_esb_init(&amp;amp;nrf_esb_config);&lt;br /&gt; VERIFY_SUCCESS(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_esb_set_base_address_0(base_addr_0);&lt;br /&gt; VERIFY_SUCCESS(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_esb_set_base_address_1(base_addr_1);&lt;br /&gt; VERIFY_SUCCESS(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_esb_set_prefixes(addr_prefix, 8);&lt;br /&gt; VERIFY_SUCCESS(err_code);&lt;/p&gt;
&lt;p&gt;tx_payload.length = 3;&lt;br /&gt; tx_payload.pipe = 0;&lt;br /&gt; tx_payload.data[0] = 0x00;&lt;/p&gt;
&lt;p&gt;return NRF_SUCCESS; &lt;br /&gt; &lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;void esb_test_tx( void )&amp;nbsp;&lt;br /&gt;{&lt;br /&gt; tx_payload.noack = false;&lt;br /&gt; if (nrf_esb_write_payload(&amp;amp;tx_payload) == NRF_SUCCESS)&lt;br /&gt; {&lt;br /&gt;// printf(&amp;quot;PTX send data\r\n&amp;quot;);&lt;br /&gt; }&lt;br /&gt; tx_flag = 0;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;void set_tx_flag(void)&lt;br /&gt;{&lt;br /&gt; tx_flag = 1;&lt;br /&gt;}&lt;br /&gt;uint8_t is_need_tx(void)&lt;br /&gt;{&lt;br /&gt; return tx_flag;&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>