<?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>Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23084/odd-behavior-in-tx-radio-and-rx-radio-pairs</link><description>I am doing some custom work, and have discovered an odd bug, that I can not seem to figure out. 
 On the tx radio, I am transmitting a BLE ADV packet with the first 3 bytes 0x4225BB. On the receiving radio, I am receiving 0x422503. The receive radio</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Jun 2017 07:06:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23084/odd-behavior-in-tx-radio-and-rx-radio-pairs" /><item><title>RE: Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/thread/90830?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 07:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07ce892b-2af0-4d2b-9cd3-4e04678c2902</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Right.. And some bits are masked out because of the PCNF0 settings. I am glad to hear you found the issue :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/thread/90829?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2017 18:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fe29d2c-ea38-4ae0-b424-a567b4977b21</guid><dc:creator>radioschmadio</dc:creator><description>&lt;p&gt;Nevermind, I am an idiot, thats S0, length, and S1.  DUH.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/thread/90825?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2017 14:53:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7f6975d-9dfb-4171-bf17-acc2149a6b1f</guid><dc:creator>radioschmadio</dc:creator><description>&lt;p&gt;So if I send 0x8164D6  the receiver gets 0x812402, no errors flagged.&lt;/p&gt;
&lt;p&gt;0xFFFFD6 receives as 0xFF3F02&lt;/p&gt;
&lt;p&gt;0xFFFFFFFF receives as 0xFF3F03FF&lt;/p&gt;
&lt;p&gt;0x12347856 receives as 0x12340056&lt;/p&gt;
&lt;p&gt;0x4225BB receives as 0x422503&lt;/p&gt;
&lt;p&gt;0x4217FFFF receives as 0x421703FF&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/thread/90828?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2017 14:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3068fd4b-4b9a-4c74-9682-36c470ea7fb9</guid><dc:creator>radioschmadio</dc:creator><description>&lt;p&gt;Does the prefix / base have something to do with it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/thread/90827?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2017 14:15:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b354942-75e0-4437-8449-90f7023d2e75</guid><dc:creator>radioschmadio</dc:creator><description>&lt;p&gt;void hal_radio_config(void)
{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NVIC_DisableIRQ(RADIO_IRQn);

// cycle radio power
NRF_RADIO-&amp;gt;POWER = RADIO_POWER_POWER_Disabled &amp;lt;&amp;lt; RADIO_POWER_POWER_Pos;
NRF_RADIO-&amp;gt;POWER = RADIO_POWER_POWER_Enabled &amp;lt;&amp;lt; RADIO_POWER_POWER_Pos;

NRF_RADIO-&amp;gt;TXPOWER=0x00; //set lowest tx power
NRF_RADIO-&amp;gt;SHORTS = 0x000000000;

//length on air of S0, S1, and LFLEN
NRF_RADIO-&amp;gt;PCNF0 =   (((1UL) &amp;lt;&amp;lt; RADIO_PCNF0_S0LEN_Pos) &amp;amp; RADIO_PCNF0_S0LEN_Msk)
                   | (((2UL) &amp;lt;&amp;lt; RADIO_PCNF0_S1LEN_Pos) &amp;amp; RADIO_PCNF0_S1LEN_Msk)
                   | (((6UL) &amp;lt;&amp;lt; RADIO_PCNF0_LFLEN_Pos) &amp;amp; RADIO_PCNF0_LFLEN_Msk);

//little endian, base address length (3 + 1 = 4), static length = 0, max length, enable payload	
NRF_RADIO-&amp;gt;PCNF1 =   (((RADIO_PCNF1_ENDIAN_Little)        &amp;lt;&amp;lt; RADIO_PCNF1_ENDIAN_Pos) &amp;amp; RADIO_PCNF1_ENDIAN_Msk)
                   | (((3UL)                              &amp;lt;&amp;lt; RADIO_PCNF1_BALEN_Pos)  &amp;amp; RADIO_PCNF1_BALEN_Msk)
                   | (((0UL)                              &amp;lt;&amp;lt; RADIO_PCNF1_STATLEN_Pos)&amp;amp; RADIO_PCNF1_STATLEN_Msk)
                   | ((((uint32_t)DD_MAX_PAYLOAD_LENGTH)  &amp;lt;&amp;lt; RADIO_PCNF1_MAXLEN_Pos) &amp;amp; RADIO_PCNF1_MAXLEN_Msk)
                   | ((RADIO_PCNF1_WHITEEN_Enabled &amp;lt;&amp;lt; RADIO_PCNF1_WHITEEN_Pos) &amp;amp; RADIO_PCNF1_WHITEEN_Msk);

/* The CRC polynomial is fixed, and is set here. */
/* The CRC initial value may change, and is set by */
/* higher level modules as needed. */
NRF_RADIO-&amp;gt;CRCPOLY = (uint32_t)CRC_POLYNOMIAL_INIT_SETTINGS;
NRF_RADIO-&amp;gt;CRCCNF = (((RADIO_CRCCNF_SKIPADDR_Skip) &amp;lt;&amp;lt; RADIO_CRCCNF_SKIPADDR_Pos) &amp;amp; RADIO_CRCCNF_SKIPADDR_Msk)
                  | (((RADIO_CRCCNF_LEN_Three)      &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos)       &amp;amp; RADIO_CRCCNF_LEN_Msk);

	//enable reception on logical address, what does this mean?
NRF_RADIO-&amp;gt;RXADDRESSES  = ( (RADIO_RXADDRESSES_ADDR0_Enabled) &amp;lt;&amp;lt; RADIO_RXADDRESSES_ADDR0_Pos);

	//set BLE mode
NRF_RADIO-&amp;gt;MODE    = ((RADIO_MODE_MODE_Ble_1Mbit) &amp;lt;&amp;lt; RADIO_MODE_MODE_Pos) &amp;amp; RADIO_MODE_MODE_Msk;

	//interframe space in us between end tx and begin tx
NRF_RADIO-&amp;gt;TIFS = 150;

	//something with access address?
NRF_RADIO-&amp;gt;PREFIX0 = access_address[3];
NRF_RADIO-&amp;gt;BASE0   = ( (((uint32_t)access_address[2]) &amp;lt;&amp;lt; 24) 
                     | (((uint32_t)access_address[1]) &amp;lt;&amp;lt; 16)
                     | (((uint32_t)access_address[0]) &amp;lt;&amp;lt; 8) );
											 
/* set dev match address */									 
NRF_RADIO-&amp;gt;DAB[0] = 0x4ae67dbe;  // 32 least significant
NRF_RADIO-&amp;gt;DAP[0] = 0x1172; //16 most significant
NRF_RADIO-&amp;gt;DACNF = (0x1) | (0x100); //enable addrress0

//Initial value for CRC calculation.
NRF_RADIO-&amp;gt;CRCINIT = ((uint32_t)seed[0]) | ((uint32_t)seed[1])&amp;lt;&amp;lt;8 | ((uint32_t)seed[2])&amp;lt;&amp;lt;16;
	
NRF_RADIO-&amp;gt;DATAWHITEIV=37;
	
NRF_RADIO-&amp;gt;FREQUENCY = CHANNEL_IDX_TO_FREQ_OFFS(37); // ERIC
	
NVIC_EnableIRQ(RADIO_IRQn);
	
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Snippet that actually sends&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	NRF_RADIO-&amp;gt;EVENTS_DISABLED = 0;
NRF_RADIO-&amp;gt;TASKS_DISABLE = 1;
while(!NRF_RADIO-&amp;gt;EVENTS_DISABLED);     //wait for radio to be disabled

NRF_RADIO-&amp;gt;EVENTS_READY=0;					 //clear flag
NRF_RADIO-&amp;gt;TASKS_TXEN=1;						 //enable radio in TX mode
while(!NRF_RADIO-&amp;gt;EVENTS_READY);     //wait for radio to be in tx mode

NRF_RADIO-&amp;gt;PACKETPTR = (uint32_t)&amp;amp;thisdata;

NRF_RADIO-&amp;gt;EVENTS_END = 0;					 //clear flag
NRF_RADIO-&amp;gt;TASKS_START = 1;  		     //its ready start task
while(!NRF_RADIO-&amp;gt;EVENTS_END); 	     //wait for radio to send

//clear event
NRF_RADIO-&amp;gt;EVENTS_DISABLED = 0;
NRF_RADIO-&amp;gt;EVENTS_END = 0;
NRF_RADIO-&amp;gt;EVENTS_READY=0;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd behavior in tx radio and rx radio pairs</title><link>https://devzone.nordicsemi.com/thread/90826?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2017 09:12:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ed5d650-7163-4b08-bc20-1d93342d5022</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you tried to use a phone to receive the adv packet, to see if the issue is the same (or if the packet can even be received) ?&lt;/p&gt;
&lt;p&gt;If you have an Android phone the nRF Connect app from Nordic allows you to see the raw data from an advertiser.&lt;/p&gt;
&lt;p&gt;Are you able to share the code you used to transmit the adv packet?&lt;br /&gt;
Then I can take a look and see if there is something there that could explain the issue.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>