<?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>Radio Receiver with Timeslot Problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46443/radio-receiver-with-timeslot-problem</link><description>Hello 
 I am trying to implement radio receiver using the time slot API and I am facing some problems to make it work. I am using nrf51822 with SD130 (sdk8) and the device is configured in central mode. I want to receive some data sent from another nrf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Apr 2019 13:09:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46443/radio-receiver-with-timeslot-problem" /><item><title>RE: Radio Receiver with Timeslot Problem</title><link>https://devzone.nordicsemi.com/thread/184334?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2019 13:09:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfee54e3-8f83-479c-815b-27b60d3d758a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;The configuration looks similar on both receiver and transmitter.&lt;/p&gt;
&lt;p&gt;Could it be that you haven&amp;#39;t started the HFCLK? By default, the HFCLK will be sourced by the internal RC oscillator, which is not accurate enough to be used with the radio.&lt;/p&gt;
&lt;p&gt;Could you try to add this function on both receiver and transmitter, prior to starting the radio, to see if that helps?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART    = 1;

    /* Wait for the external oscillator to start up */
    while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0)
    {
        // Do nothing.
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Receiver with Timeslot Problem</title><link>https://devzone.nordicsemi.com/thread/184177?ContentTypeID=1</link><pubDate>Sun, 28 Apr 2019 07:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f62ec93-6aac-432d-a623-a32dc7bab8d1</guid><dc:creator>mukesh</dc:creator><description>&lt;p&gt;Sorry for the late reply. Yes I believe that I have configured both sides with same settings. Please have a look at the below code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Receiver side&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;

#define PACKET_BASE_ADDRESS_LENGTH  (4UL)                   //!&amp;lt; Packet base address length field size in bytes
#define PACKET_STATIC_LENGTH        (10UL)                   //!&amp;lt; Packet static length in bytes
#define PACKET_PAYLOAD_MAXSIZE      (PACKET_STATIC_LENGTH)  //!&amp;lt; Packet payload maximum size in bytes


void radio_configure()
{
    // Radio config
    NRF_RADIO-&amp;gt;TXPOWER   = (RADIO_TXPOWER_TXPOWER_Pos4dBm&amp;lt;&amp;lt; RADIO_TXPOWER_TXPOWER_Pos);
    NRF_RADIO-&amp;gt;FREQUENCY = 7UL;  // Frequency bin 7, 2407MHz
    NRF_RADIO-&amp;gt;MODE      = (RADIO_MODE_MODE_Nrf_250Kbit &amp;lt;&amp;lt; RADIO_MODE_MODE_Pos);

    // Radio address config
    NRF_RADIO-&amp;gt;PREFIX0 = 
        ((uint32_t)swap_bits(0xC3) &amp;lt;&amp;lt; 24) // Prefix byte of address 3 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC2) &amp;lt;&amp;lt; 16) // Prefix byte of address 2 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC1) &amp;lt;&amp;lt; 8)  // Prefix byte of address 1 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC0) &amp;lt;&amp;lt; 0); // Prefix byte of address 0 converted to nRF24L series format
  
    NRF_RADIO-&amp;gt;PREFIX1 = 
        ((uint32_t)swap_bits(0xC7) &amp;lt;&amp;lt; 24) // Prefix byte of address 7 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC6) &amp;lt;&amp;lt; 16) // Prefix byte of address 6 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC4) &amp;lt;&amp;lt; 0); // Prefix byte of address 4 converted to nRF24L series format

    NRF_RADIO-&amp;gt;BASE0 = bytewise_bitswap(0x01234567UL);  // Base address for prefix 0 converted to nRF24L series format
    NRF_RADIO-&amp;gt;BASE1 = bytewise_bitswap(0x89ABCDEFUL);  // Base address for prefix 1-7 converted to nRF24L series format
  
    NRF_RADIO-&amp;gt;TXADDRESS   = 0x00UL;  // Set device address 0 to use when transmitting
    NRF_RADIO-&amp;gt;RXADDRESSES = 0x01UL;  // Enable device address 0 to use to select which addresses to receive

    // Packet configuration
    NRF_RADIO-&amp;gt;PCNF0 = (PACKET_S1_FIELD_SIZE     &amp;lt;&amp;lt; RADIO_PCNF0_S1LEN_Pos) |
                       (PACKET_S0_FIELD_SIZE     &amp;lt;&amp;lt; RADIO_PCNF0_S0LEN_Pos) |
                       (PACKET_LENGTH_FIELD_SIZE &amp;lt;&amp;lt; RADIO_PCNF0_LFLEN_Pos); //lint !e845 &amp;quot;The right argument to operator &amp;#39;|&amp;#39; is certain to be 0&amp;quot;

    // Packet configuration
    NRF_RADIO-&amp;gt;PCNF1 = (RADIO_PCNF1_WHITEEN_Disabled &amp;lt;&amp;lt; RADIO_PCNF1_WHITEEN_Pos) |
                       (RADIO_PCNF1_ENDIAN_Big       &amp;lt;&amp;lt; RADIO_PCNF1_ENDIAN_Pos)  |
                       (PACKET_BASE_ADDRESS_LENGTH   &amp;lt;&amp;lt; RADIO_PCNF1_BALEN_Pos)   |
                       (PACKET_STATIC_LENGTH         &amp;lt;&amp;lt; RADIO_PCNF1_STATLEN_Pos) |
                       (PACKET_PAYLOAD_MAXSIZE       &amp;lt;&amp;lt; RADIO_PCNF1_MAXLEN_Pos); //lint !e845 &amp;quot;The right argument to operator &amp;#39;|&amp;#39; is certain to be 0&amp;quot;

    // CRC Config
    NRF_RADIO-&amp;gt;CRCCNF = (RADIO_CRCCNF_LEN_Two &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos); // Number of checksum bits
    if ((NRF_RADIO-&amp;gt;CRCCNF &amp;amp; RADIO_CRCCNF_LEN_Msk) == (RADIO_CRCCNF_LEN_Two &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos))
    {
        NRF_RADIO-&amp;gt;CRCINIT = 0xFFFFUL;   // Initial value      
        NRF_RADIO-&amp;gt;CRCPOLY = 0x11021UL;  // CRC poly: x^16+x^12^x^5+1
    }
    else if ((NRF_RADIO-&amp;gt;CRCCNF &amp;amp; RADIO_CRCCNF_LEN_Msk) == (RADIO_CRCCNF_LEN_One &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos))
    {
        NRF_RADIO-&amp;gt;CRCINIT = 0xFFUL;   // Initial value
        NRF_RADIO-&amp;gt;CRCPOLY = 0x107UL;  // CRC poly: x^8+x^2^x^1+1
    }
		
		NRF_RADIO-&amp;gt;PACKETPTR = (uint32_t)&amp;amp;packet;
		NRF_RADIO-&amp;gt;POWER=(RADIO_POWER_POWER_Enabled&amp;lt;&amp;lt;RADIO_POWER_POWER_Pos);
}&lt;/pre&gt; Transmitter side&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define PACKET_BASE_ADDRESS_LENGTH  (4UL)                   //!&amp;lt; Packet base address length field size in bytes
#define PACKET_STATIC_LENGTH        (10UL)                   //!&amp;lt; Packet static length in bytes
#define PACKET_PAYLOAD_MAXSIZE      (PACKET_STATIC_LENGTH)  //!&amp;lt; Packet payload maximum size in bytes


void radio_configure()
{
    // Radio config
    NRF_RADIO-&amp;gt;TXPOWER   = (RADIO_TXPOWER_TXPOWER_Pos4dBm&amp;lt;&amp;lt; RADIO_TXPOWER_TXPOWER_Pos);
    NRF_RADIO-&amp;gt;FREQUENCY = 7UL;  // Frequency bin 7, 2407MHz
    NRF_RADIO-&amp;gt;MODE      = (RADIO_MODE_MODE_Nrf_250Kbit &amp;lt;&amp;lt; RADIO_MODE_MODE_Pos);

    // Radio address config
    NRF_RADIO-&amp;gt;PREFIX0 = 
        ((uint32_t)swap_bits(0xC3) &amp;lt;&amp;lt; 24) // Prefix byte of address 3 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC2) &amp;lt;&amp;lt; 16) // Prefix byte of address 2 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC1) &amp;lt;&amp;lt; 8)  // Prefix byte of address 1 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC0) &amp;lt;&amp;lt; 0); // Prefix byte of address 0 converted to nRF24L series format
  
    NRF_RADIO-&amp;gt;PREFIX1 = 
        ((uint32_t)swap_bits(0xC7) &amp;lt;&amp;lt; 24) // Prefix byte of address 7 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC6) &amp;lt;&amp;lt; 16) // Prefix byte of address 6 converted to nRF24L series format
      | ((uint32_t)swap_bits(0xC4) &amp;lt;&amp;lt; 0); // Prefix byte of address 4 converted to nRF24L series format

    NRF_RADIO-&amp;gt;BASE0 = bytewise_bitswap(0x01234567UL);  // Base address for prefix 0 converted to nRF24L series format
    NRF_RADIO-&amp;gt;BASE1 = bytewise_bitswap(0x89ABCDEFUL);  // Base address for prefix 1-7 converted to nRF24L series format
  
    NRF_RADIO-&amp;gt;TXADDRESS   = 0x00UL;  // Set device address 0 to use when transmitting
    NRF_RADIO-&amp;gt;RXADDRESSES = 0x01UL;  // Enable device address 0 to use to select which addresses to receive

    // Packet configuration
    NRF_RADIO-&amp;gt;PCNF0 = (PACKET_S1_FIELD_SIZE     &amp;lt;&amp;lt; RADIO_PCNF0_S1LEN_Pos) |
                       (PACKET_S0_FIELD_SIZE     &amp;lt;&amp;lt; RADIO_PCNF0_S0LEN_Pos) |
                       (PACKET_LENGTH_FIELD_SIZE &amp;lt;&amp;lt; RADIO_PCNF0_LFLEN_Pos); //lint !e845 &amp;quot;The right argument to operator &amp;#39;|&amp;#39; is certain to be 0&amp;quot;

    // Packet configuration
    NRF_RADIO-&amp;gt;PCNF1 = (RADIO_PCNF1_WHITEEN_Disabled &amp;lt;&amp;lt; RADIO_PCNF1_WHITEEN_Pos) |
                       (RADIO_PCNF1_ENDIAN_Big       &amp;lt;&amp;lt; RADIO_PCNF1_ENDIAN_Pos)  |
                       (PACKET_BASE_ADDRESS_LENGTH   &amp;lt;&amp;lt; RADIO_PCNF1_BALEN_Pos)   |
                       (PACKET_STATIC_LENGTH         &amp;lt;&amp;lt; RADIO_PCNF1_STATLEN_Pos) |
                       (PACKET_PAYLOAD_MAXSIZE       &amp;lt;&amp;lt; RADIO_PCNF1_MAXLEN_Pos); //lint !e845 &amp;quot;The right argument to operator &amp;#39;|&amp;#39; is certain to be 0&amp;quot;

    // CRC Config
    NRF_RADIO-&amp;gt;CRCCNF = (RADIO_CRCCNF_LEN_Two &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos); // Number of checksum bits
    if ((NRF_RADIO-&amp;gt;CRCCNF &amp;amp; RADIO_CRCCNF_LEN_Msk) == (RADIO_CRCCNF_LEN_Two &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos))
    {
        NRF_RADIO-&amp;gt;CRCINIT = 0xFFFFUL;   // Initial value      
        NRF_RADIO-&amp;gt;CRCPOLY = 0x11021UL;  // CRC poly: x^16+x^12^x^5+1
    }
    else if ((NRF_RADIO-&amp;gt;CRCCNF &amp;amp; RADIO_CRCCNF_LEN_Msk) == (RADIO_CRCCNF_LEN_One &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos))
    {
        NRF_RADIO-&amp;gt;CRCINIT = 0xFFUL;   // Initial value
        NRF_RADIO-&amp;gt;CRCPOLY = 0x107UL;  // CRC poly: x^8+x^2^x^1+1
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you so much for the support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Receiver with Timeslot Problem</title><link>https://devzone.nordicsemi.com/thread/183524?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 13:54:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b24ff269-58a1-47b7-b776-45296c711e23</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;Is the radio configuration 100 % equal on both transmitter and receiver? CRC settings, data rate, RF channel, and so forth?&lt;/p&gt;
&lt;p&gt;Could you show the radio configuration for both sides?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>