<?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>How to communicate with ESB RF with nRF52840.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34370/how-to-communicate-with-esb-rf-with-nrf52840</link><description>-HI. 
 I had previously implemented ESB RF communications with the nRF24l01 + and nRF24LU1 +. 
 Now we want to implement ESB RF communication with nRF52840 DK(PTX) and nRF24LU1+(PRX). 
 I am studying with reference to &amp;quot;esb_ptx&amp;quot; example of SDK_15.0.0.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 May 2018 13:41:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34370/how-to-communicate-with-esb-rf-with-nrf52840" /><item><title>RE: How to communicate with ESB RF with nRF52840.</title><link>https://devzone.nordicsemi.com/thread/132298?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 13:41:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e804a096-2e02-4303-b9ec-dade43b9e6a7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am glad to hear you got the communication working &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;We don&amp;#39;t have official support for the nRF52840 yet, but it is expected in the next SDK release. The library should still work fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The selective_auto_ack feature allows you to use the &amp;quot;no ack&amp;quot; feature, so that you can disable ACK&amp;#39;s on some packets. Without this feature enabled you will receive ACK on all packets.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When selective_auto_ack is enabled, you can use the noack field in the tx_payload struct to have a packet sent without requesting an ACK. If selective_auto_ack is set to false then the noack field will have no effect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For a full overview of the differences between&amp;nbsp;NRF_ESB_DEFAULT_CONFIG and NRF_ESB_LEGACY_CONFIG, please have a look at their definition in nrf_esb.h&lt;br /&gt;Essentially the legacy configuration&amp;nbsp;mimics the default configuration of the nRF24L radios, while the default configuration&amp;nbsp;is the recommended configuration for new designs. With the legacy configuration you will only use 8-bit CRC, and you will not have access to the dynamic payload length, ACK payload or dynamic ACK features that you get with the default configuration.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to communicate with ESB RF with nRF52840.</title><link>https://devzone.nordicsemi.com/thread/132167?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 05:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdc39819-c3e2-4406-acec-eddc7aac7019</guid><dc:creator>powerup</dc:creator><description>&lt;p&gt;HI ovrevekk.&lt;/p&gt;
&lt;p&gt;I set it as follows.&lt;/p&gt;
&lt;p&gt;nRF24LU+&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;pipe1 enable auto ack
2Mbps
CH.85
CRC : 2Byte
payload width : 5
auto retransmit delay : 500us
auto retransmit count : 3
RF_PWR : 0dBm&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;nRF52840 (SDK15 / esb_ptx example)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static nrf_esb_payload_t        tx_payload = NRF_ESB_CREATE_PAYLOAD(5, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00);

#define NRF_ESB_DEFAULT_CONFIG {.protocol               = NRF_ESB_PROTOCOL_ESB_DPL,         \
                                .mode                   = NRF_ESB_MODE_PTX,                 \
                                .event_handler          = 0,                                \
                                .bitrate                = NRF_ESB_BITRATE_2MBPS,            \
                                .crc                    = NRF_ESB_CRC_16BIT,                \
                                .tx_output_power        = NRF_ESB_TX_POWER_0DBM,            \
                                .retransmit_delay       = 500,                              \
                                .retransmit_count       = 3,                                \
                                .tx_mode                = NRF_ESB_TXMODE_AUTO,              \
                                .radio_irq_priority     = 1,                                \
                                .event_irq_priority     = 2,                                \
                                .payload_length         = 5,                               \
                                .selective_auto_ack     = true                             \
}

uint32_t esb_init( void )
{
    uint32_t err_code;
    uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};
    uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};
    uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };

    nrf_esb_config_t nrf_esb_config         = NRF_ESB_DEFAULT_CONFIG;
    nrf_esb_config.protocol                 = NRF_ESB_PROTOCOL_ESB_DPL;
    nrf_esb_config.retransmit_delay         = 500;
    nrf_esb_config.bitrate                  = NRF_ESB_BITRATE_2MBPS;
    nrf_esb_config.event_handler            = nrf_esb_event_handler;
    nrf_esb_config.mode                     = NRF_ESB_MODE_PTX;
    nrf_esb_config.selective_auto_ack       = true;

    nrf_esb_set_rf_channel(85);
    
    err_code = nrf_esb_init(&amp;amp;nrf_esb_config);

    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_0(base_addr_0);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_1(base_addr_1);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_prefixes(addr_prefix, 8);
    VERIFY_SUCCESS(err_code);

    return err_code;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- Can you tell what&amp;#39;s wrong?&lt;/p&gt;
&lt;p&gt;- The esb_ptx example seems to be for nrf52832.&lt;br /&gt;&amp;nbsp; Is it also available on nrf52840?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;I succeeded in communication !!&lt;/p&gt;
&lt;p&gt;tx_payload = NRF_ESB_CREATE_PAYLOAD(0x00, 0x02,0x03,0x04,0x00,0x00);&lt;/p&gt;
&lt;p&gt;I was misunderstanding the macros that make up the payload.&lt;/p&gt;
&lt;p&gt;There are additional questions.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;&lt;em&gt;nrf_esb_config.selective_auto_ack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = true;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Is this code setting whether to receive ACK from the receiver?&lt;/p&gt;
&lt;p&gt;If set to false, can not you check whether the data transmission is good?&lt;/p&gt;
&lt;p&gt;In the nRF24L01, I could check the communication by reading the TX_DS register. What should I read in the nRF52840?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;&lt;em&gt;tx_payload.noack = false;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What does this code do?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;I succeeded in verifying that the data was sent well.&lt;/p&gt;
&lt;p&gt;NRF_ESB_DEFAULT_CONFIG =&amp;gt; NRF_ESB_LEGACY_CONFIG&lt;/p&gt;
&lt;p&gt;I made this change.&lt;/p&gt;
&lt;p&gt;What is the difference between the two?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to communicate with ESB RF with nRF52840.</title><link>https://devzone.nordicsemi.com/thread/132096?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 14:39:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58d382e7-3ddd-4f58-a609-60f51eecc032</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Kim&lt;/p&gt;
&lt;p&gt;There is no 250KBPS mode in the nRF52840 unfortunately, so you have to use either the 1Mbps or 2Mbps mode to be compatible.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, the nrf_esb library provided for the nRF52 series only support Enhanced Shockburst, not the older Shockburst mode. This means that you have to enable ACK&amp;#39;s on the nRF24LU1+ side in order to be compatible with the nRF52840.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Finally address configuration is different, as both the bit order and byte order is changed from the nRF24L series to the nRF5 series. I would suggest starting with a &lt;em&gt;symmetric&lt;/em&gt; address like 0xE7E7E7E7E7 initially, so that you can verify that everything else works correctly before you start playing with the address configuration.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Other than that the settings should be compatible, and you should be able to use one of the nRF5 SDK examples as a starting point on the nRF52840 side:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;\nRF5_SDK_15.0.0_a53641a\examples\proprietary_rf\esb_ptx&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;\nRF5_SDK_15.0.0_a53641a\examples\proprietary_rf\esb_prx&lt;/strong&gt;&lt;/em&gt;&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></channel></rss>