<?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 Dynamic Address Change for Pairing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37131/esb-dynamic-address-change-for-pairing</link><description>HI! 
 
 I&amp;#39;m using two nRF52840 boards to communicate using ESB. The ESB API doesn&amp;#39;t have a pairing protocol so I figured I&amp;#39;d write one without encryption or any bells and whistles. 
 Since ESB has 8 pipes, with pipe 0 having its own base address, I&amp;#39;m</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Aug 2018 11:28:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37131/esb-dynamic-address-change-for-pairing" /><item><title>RE: ESB Dynamic Address Change for Pairing</title><link>https://devzone.nordicsemi.com/thread/142788?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 11:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa2b0dc6-4d6b-4e63-8184-5f28ac81d89d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The example goes to system_off, which will generate a RESET on wakeup. You&amp;#39;ll need to save your paired address to flash, and add a small routine to load pairing data at boot up in order for this to work after a reset/poweroff/systemoff.&lt;/p&gt;
&lt;p&gt;If you replace the system off with a __WFE() or __WFI() instruction instead, you will go to system on idle mode instead, which wakes up without doing a reset.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&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: ESB Dynamic Address Change for Pairing</title><link>https://devzone.nordicsemi.com/thread/142704?ContentTypeID=1</link><pubDate>Thu, 02 Aug 2018 22:20:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2b74001-9e6b-4de1-90d3-a49d2fdd47df</guid><dc:creator>cprehn</dc:creator><description>&lt;p&gt;So what happens is the PTX device is going into low power state, and when it comes out of it, the new values put into the array are set to default.&lt;/p&gt;
&lt;p&gt;If I understand correctly, the example code stores a loop count value through sleep.&amp;nbsp; Would that be possible with an array?&amp;nbsp; How would that be done? The example code has the following: &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void recover_state()
{
    uint32_t            loop_count = 0;
    if ((NRF_POWER-&amp;gt;GPREGRET &amp;gt;&amp;gt; 4) == RESET_MEMORY_TEST_BYTE)
    {
        // Take the loop_count value.
        base_addr_1          = (uint8_t)(NRF_POWER-&amp;gt;GPREGRET &amp;amp; 0xFUL);
        NRF_POWER-&amp;gt;GPREGRET = 0;
    }

    loop_count++;
    NRF_POWER-&amp;gt;GPREGRET = ( (RESET_MEMORY_TEST_BYTE &amp;lt;&amp;lt; 4) | loop_count);

    tx_payload.data[1] = loop_count &amp;lt;&amp;lt; 4;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>