<?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>NRF51822 Receiving on the wrong address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4383/nrf51822-receiving-on-the-wrong-address</link><description>Hi, 
 I have a case where the receive end event is triggered even though the receive base address and prefix shouldn&amp;#39;t match. Some background:
Initially the receiver is set to listen to a transmitter, let&amp;#39;s call it A, on address A. After a while the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Nov 2014 14:11:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4383/nrf51822-receiving-on-the-wrong-address" /><item><title>RE: NRF51822 Receiving on the wrong address</title><link>https://devzone.nordicsemi.com/thread/15565?ContentTypeID=1</link><pubDate>Tue, 18 Nov 2014 14:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a31e8b5a-46af-4fcc-8b48-e02972d11e94</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;By closing the channel I mean that you have to put the radio into DISABLED state before the configurations will be valid. You can verify this by checking the radios STATE register.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51822 Receiving on the wrong address</title><link>https://devzone.nordicsemi.com/thread/15564?ContentTypeID=1</link><pubDate>Mon, 17 Nov 2014 08:34:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0730e96-51c7-49ba-bd7a-997e50074abc</guid><dc:creator>Andreas Wileur</dc:creator><description>&lt;p&gt;Thank you for your reply. I&amp;#39;ll try to clarify.&lt;/p&gt;
&lt;p&gt;Here is my radio initialization code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Shortcut from READY to START and END to DISABLE, saves a lot of MCU timing and work
NRF_RADIO-&amp;gt;SHORTS     = RADIO_SHORTS_END_DISABLE_Msk | RADIO_SHORTS_READY_START_Msk;
NRF_RADIO-&amp;gt;MODE = 		RADIO_MODE_MODE_Nrf_1Mbit;  // 1MBit/s data rate

// CRC settings
NRF_RADIO-&amp;gt;CRCINIT = 	0xffff;	// Initial CRC value
NRF_RADIO-&amp;gt;CRCPOLY = 	0x11021UL;  // 
NRF_RADIO-&amp;gt;PCNF1 =		(RADIO_PCNF1_ENDIAN_Big &amp;lt;&amp;lt; RADIO_PCNF1_ENDIAN_Pos) |
                        (2UL&amp;lt;&amp;lt;RADIO_PCNF1_BALEN_Pos) |
                        //((u32)32&amp;lt;&amp;lt;RADIO_PCNF1_STATLEN_Pos) |
                        32;	// 2 base address bytes, 32 bytes static length and  32byte data max
// S1 size = 0 bits, S0 size = 0 bytes
NRF_RADIO-&amp;gt;PCNF0 = 		(0UL &amp;lt;&amp;lt; RADIO_PCNF0_S1LEN_Pos) |
                        (0UL &amp;lt;&amp;lt; RADIO_PCNF0_S0LEN_Pos) |
                        (0UL &amp;lt;&amp;lt; RADIO_PCNF0_LFLEN_Pos);

NRF_RADIO-&amp;gt;TXADDRESS = 	0;      // Logical address 0 for transmission
NRF_RADIO-&amp;gt;RXADDRESSES = RADIO_RXADDRESSES_ADDR0_Enabled &amp;lt;&amp;lt; RADIO_RXADDRESSES_ADDR0_Pos;	// Logical address 0 enabled for reception
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I set the address like this, where addr[x] is three bytes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_RADIO-&amp;gt;BASE0 =		bytewiseBitSwap(((u32)((u8)addr[1]))&amp;lt;&amp;lt;24 | ((u32)((u8)addr[0]))&amp;lt;&amp;lt;16);
NRF_RADIO-&amp;gt;PREFIX0 =	swapBits((u8)addr[2]);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I got the swapBits from someones example on this forum and it works fine. As far as I understand this only configures the base address for pipe 0 and prefix for pipe 0.
Before calling this function I disabled the radio by executing NRF_RADIO-&amp;gt;TASKS_DISABLE = 1;&lt;/p&gt;
&lt;p&gt;What do you mean by closing the pipe?&lt;/p&gt;
&lt;p&gt;The system is frequency hopping so the problem occurs only when the channels happen to match, but that is bad enough.&lt;/p&gt;
&lt;p&gt;Best regards,
Andreas Wileur&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51822 Receiving on the wrong address</title><link>https://devzone.nordicsemi.com/thread/15563?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2014 09:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:741ae994-4577-4d17-be63-523e568b6094</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;This sounds like you either have configure the same address on several pipes, perhaps use another address length than you think and then the first three or four bytes match anyways? I would check to see if you actually close the pipe. Could it be that you are trying to close it when you get an interrupt? Does this happen all the time or is it just now and then?&lt;/p&gt;
&lt;p&gt;How do you check the receiving pipe? And is the payload received as expected? Do you bring the radio out of active mode before you re-configure it?&lt;/p&gt;
&lt;p&gt;Any chance you can post the code (or parts of it) that you are using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>