<?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>register setting problem on NRF52833!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59544/register-setting-problem-on-nrf52833</link><description>based on nRF SDK 16 radio (peripheral) example, in radio_config file, i set registers of TXPOWER, FREQUENCY, MODE, PCNF0, PCNF1 (and ADDR and CRC related registers) and also some DFE related registers including: DFEMODE, CTEINLINECONF, DFECTRL1, DFEPACKET</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Mar 2020 06:19:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59544/register-setting-problem-on-nrf52833" /><item><title>RE: register setting problem on NRF52833!</title><link>https://devzone.nordicsemi.com/thread/242283?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2020 06:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fc19746-184f-4ab6-8620-ceedb81d0cd7</guid><dc:creator>Andreas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As mentioned the Softdevice should not be enabled. In any case a little strange that only some registers are set, have you stepped through the code and verified whether the registers are just not set, or if they are not set but re-written later in the application?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: register setting problem on NRF52833!</title><link>https://devzone.nordicsemi.com/thread/241898?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 14:41:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b23c42c-85af-46ea-a601-648b6e881a08</guid><dc:creator>Armin_B</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;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 2, 2402MHz
    NRF_RADIO-&amp;gt;MODE      = (RADIO_MODE_MODE_Ble_1Mbit &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
    }


        // ------------- DFE Config (Direction Finding Mode) --------------- //
    //@ tarnsmitter
    NRF_RADIO-&amp;gt;DFEMODE = (RADIO_DFEMODE_DFEOPMODE_AoA &amp;lt;&amp;lt; RADIO_DFEMODE_DFEOPMODE_Pos); // set DFEMODE as AOA
    
    /**
     * @brief configuring the radio in DFE mode with this settings:
     * CTEINLINECTRLEN = 1 &amp;gt;&amp;gt;&amp;gt;&amp;gt; inline configuration enabled
     * CTEINFOINS1 = NotInS1 &amp;gt;&amp;gt;&amp;gt;&amp;gt; CTEinfo settings for ADV PDU case 
    */

    NRF_RADIO-&amp;gt;CTEINLINECONF = (RADIO_CTEINLINECONF_CTEINLINECTRLEN_Enabled  &amp;lt;&amp;lt; RADIO_CTEINLINECONF_CTEINLINECTRLEN_Pos)|
                               (RADIO_CTEINLINECONF_CTEINFOINS1_NotInS1      &amp;lt;&amp;lt; RADIO_CTEINLINECONF_CTEINFOINS1_Pos)|
                               (RADIO_CTEINLINECONF_CTEINLINERXMODE2US_125ns &amp;lt;&amp;lt; RADIO_CTEINLINECONF_CTEINLINERXMODE2US_Pos); // set sample spacing equal to 125ns


    NRF_RADIO-&amp;gt;DFECTRL1 = ((uint32_t)CTE_LENGTH_IN_8US             &amp;lt;&amp;lt;  RADIO_DFECTRL1_NUMBEROF8US_Pos)| // set CTE time length for TX
                          (RADIO_DFECTRL1_TSWITCHSPACING_4us       &amp;lt;&amp;lt;  RADIO_DFECTRL1_TSWITCHSPACING_Pos)|
                          (RADIO_DFECTRL1_TSAMPLESPACINGREF_125ns  &amp;lt;&amp;lt;  RADIO_DFECTRL1_TSAMPLESPACINGREF_Pos); //set switch time between atennas equal to 4us 
     

    NRF_RADIO-&amp;gt;DFEPACKET.MAXCNT = (IQ_SAMP_BUFFER_SIZE &amp;lt;&amp;lt; RADIO_DFEPACKET_MAXCNT_MAXCNT_Pos);

}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: register setting problem on NRF52833!</title><link>https://devzone.nordicsemi.com/thread/241885?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 14:20:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a01e6d2-b4ca-46e8-b174-c0400497095a</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8228._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: register setting problem on NRF52833!</title><link>https://devzone.nordicsemi.com/thread/241871?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25716950-95fe-4835-9f58-3a85eb77226c</guid><dc:creator>Armin_B</dc:creator><description>&lt;p&gt;this is the function that set RADIO registers:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;void radio_configure()&lt;br /&gt;{&lt;br /&gt; // Radio config&lt;br /&gt; NRF_RADIO-&amp;gt;TXPOWER = (RADIO_TXPOWER_TXPOWER_Pos4dBm &amp;lt;&amp;lt; RADIO_TXPOWER_TXPOWER_Pos);&lt;br /&gt; NRF_RADIO-&amp;gt;FREQUENCY = 7UL; // Frequency bin 2, 2402MHz&lt;br /&gt; NRF_RADIO-&amp;gt;MODE = (RADIO_MODE_MODE_Ble_1Mbit &amp;lt;&amp;lt; RADIO_MODE_MODE_Pos);&lt;/p&gt;
&lt;p&gt;// Radio address config&lt;br /&gt; NRF_RADIO-&amp;gt;PREFIX0 =&lt;br /&gt; ((uint32_t)swap_bits(0xC3) &amp;lt;&amp;lt; 24) // Prefix byte of address 3 converted to nRF24L series format&lt;br /&gt; | ((uint32_t)swap_bits(0xC2) &amp;lt;&amp;lt; 16) // Prefix byte of address 2 converted to nRF24L series format&lt;br /&gt; | ((uint32_t)swap_bits(0xC1) &amp;lt;&amp;lt; 8) // Prefix byte of address 1 converted to nRF24L series format&lt;br /&gt; | ((uint32_t)swap_bits(0xC0) &amp;lt;&amp;lt; 0); // Prefix byte of address 0 converted to nRF24L series format&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;PREFIX1 =&lt;br /&gt; ((uint32_t)swap_bits(0xC7) &amp;lt;&amp;lt; 24) // Prefix byte of address 7 converted to nRF24L series format&lt;br /&gt; | ((uint32_t)swap_bits(0xC6) &amp;lt;&amp;lt; 16) // Prefix byte of address 6 converted to nRF24L series format&lt;br /&gt; | ((uint32_t)swap_bits(0xC4) &amp;lt;&amp;lt; 0); // Prefix byte of address 4 converted to nRF24L series format&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;BASE0 = bytewise_bitswap(0x01234567UL); // Base address for prefix 0 converted to nRF24L series format&lt;br /&gt; NRF_RADIO-&amp;gt;BASE1 = bytewise_bitswap(0x89ABCDEFUL); // Base address for prefix 1-7 converted to nRF24L series format&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;TXADDRESS = 0x00UL; // Set device address 0 to use when transmitting&lt;br /&gt; NRF_RADIO-&amp;gt;RXADDRESSES = 0x01UL; // Enable device address 0 to use to select which addresses to receive&lt;/p&gt;
&lt;p&gt;// Packet configuration&lt;br /&gt; NRF_RADIO-&amp;gt;PCNF0 = (PACKET_S1_FIELD_SIZE &amp;lt;&amp;lt; RADIO_PCNF0_S1LEN_Pos) |&lt;br /&gt; (PACKET_S0_FIELD_SIZE &amp;lt;&amp;lt; RADIO_PCNF0_S0LEN_Pos) |&lt;br /&gt; (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;&lt;/p&gt;
&lt;p&gt;// Packet configuration&lt;br /&gt; NRF_RADIO-&amp;gt;PCNF1 = (RADIO_PCNF1_WHITEEN_Disabled &amp;lt;&amp;lt; RADIO_PCNF1_WHITEEN_Pos) |&lt;br /&gt; (RADIO_PCNF1_ENDIAN_Big &amp;lt;&amp;lt; RADIO_PCNF1_ENDIAN_Pos) |&lt;br /&gt; (PACKET_BASE_ADDRESS_LENGTH &amp;lt;&amp;lt; RADIO_PCNF1_BALEN_Pos) |&lt;br /&gt; (PACKET_STATIC_LENGTH &amp;lt;&amp;lt; RADIO_PCNF1_STATLEN_Pos) |&lt;br /&gt; (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;&lt;/p&gt;
&lt;p&gt;// CRC Config&lt;br /&gt; NRF_RADIO-&amp;gt;CRCCNF = (RADIO_CRCCNF_LEN_Two &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos); // Number of checksum bits&lt;br /&gt; if ((NRF_RADIO-&amp;gt;CRCCNF &amp;amp; RADIO_CRCCNF_LEN_Msk) == (RADIO_CRCCNF_LEN_Two &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos))&lt;br /&gt; {&lt;br /&gt; NRF_RADIO-&amp;gt;CRCINIT = 0xFFFFUL; // Initial value&lt;br /&gt; NRF_RADIO-&amp;gt;CRCPOLY = 0x11021UL; // CRC poly: x^16 + x^12^x^5 + 1&lt;br /&gt; }&lt;br /&gt; 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))&lt;br /&gt; {&lt;br /&gt; NRF_RADIO-&amp;gt;CRCINIT = 0xFFUL; // Initial value&lt;br /&gt; NRF_RADIO-&amp;gt;CRCPOLY = 0x107UL; // CRC poly: x^8 + x^2^x^1 + 1&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; // ------------- DFE Config (Direction Finding Mode) --------------- //&lt;br /&gt; //@ tarnsmitter&lt;br /&gt; NRF_RADIO-&amp;gt;DFEMODE = (RADIO_DFEMODE_DFEOPMODE_AoA &amp;lt;&amp;lt; RADIO_DFEMODE_DFEOPMODE_Pos); // set DFEMODE as AOA&lt;br /&gt; &lt;br /&gt; /**&lt;br /&gt; * @brief configuring the radio in DFE mode with this settings:&lt;br /&gt; * CTEINLINECTRLEN = 1 &amp;gt;&amp;gt;&amp;gt;&amp;gt; inline configuration enabled&lt;br /&gt; * CTEINFOINS1 = NotInS1 &amp;gt;&amp;gt;&amp;gt;&amp;gt; CTEinfo settings for ADV PDU case &lt;br /&gt; */&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;CTEINLINECONF = (RADIO_CTEINLINECONF_CTEINLINECTRLEN_Enabled &amp;lt;&amp;lt; RADIO_CTEINLINECONF_CTEINLINECTRLEN_Pos)|&lt;br /&gt; (RADIO_CTEINLINECONF_CTEINFOINS1_NotInS1 &amp;lt;&amp;lt; RADIO_CTEINLINECONF_CTEINFOINS1_Pos)|&lt;br /&gt; (RADIO_CTEINLINECONF_CTEINLINERXMODE2US_125ns &amp;lt;&amp;lt; RADIO_CTEINLINECONF_CTEINLINERXMODE2US_Pos); // set sample spacing equal to 125ns&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; NRF_RADIO-&amp;gt;DFECTRL1 = ((uint32_t)CTE_LENGTH_IN_8US &amp;lt;&amp;lt; RADIO_DFECTRL1_NUMBEROF8US_Pos)| // set CTE time length for TX&lt;br /&gt; (RADIO_DFECTRL1_TSWITCHSPACING_4us &amp;lt;&amp;lt; RADIO_DFECTRL1_TSWITCHSPACING_Pos)|&lt;br /&gt; (RADIO_DFECTRL1_TSAMPLESPACINGREF_125ns &amp;lt;&amp;lt; RADIO_DFECTRL1_TSAMPLESPACINGREF_Pos); //set switch time between atennas equal to 4us&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;DFEPACKET.MAXCNT = (IQ_SAMP_BUFFER_SIZE &amp;lt;&amp;lt; RADIO_DFEPACKET_MAXCNT_MAXCNT_Pos);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: register setting problem on NRF52833!</title><link>https://devzone.nordicsemi.com/thread/241836?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:07:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c786fc3-d6dc-4843-b8bc-365e9e4351f5</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Are you using a SoftDevice?&lt;/p&gt;
&lt;p&gt;Note that the SoftDevice locks access to certain registers, so you cannot access them directly - you &lt;em&gt;have to&lt;/em&gt; go via the appropriate API ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>