<?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>Bringing  up 125Kbps Coded PHY on NRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46049/bringing-up-125kbps-coded-phy-on-nrf52840</link><description>Ive been working on this for some time and can not get two boards successfully communicating using the 125Kbps on the NRF52840. I am simply having one chip transmit advertising packets, and the other receive them. It is working for 1Mbps and 2Mbps, but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Apr 2019 13:38:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46049/bringing-up-125kbps-coded-phy-on-nrf52840" /><item><title>RE: Bringing  up 125Kbps Coded PHY on NRF52840</title><link>https://devzone.nordicsemi.com/thread/181635?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 13:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eea3578e-55d7-4292-9b41-4fa00e718203</guid><dc:creator>user3344</dc:creator><description>&lt;p&gt;That was the problem.&amp;nbsp; In case anyone else finds this thread, here is a working solution for the nrf52840&lt;pre class="ui-code" data-mode="text"&gt;#define DTM_PAYLOAD_MAX_SIZE 255
void radio_configure_coded_phy()
{
	uint32_t          m_address           = 0x71764129;
	uint8_t           m_crcConfSkipAddr   = 1;
    uint8_t           m_crcLength         = RADIO_CRCCNF_LEN_Three;       /**&amp;lt; CRC Length (in bytes). */
	uint8_t           m_packetHeaderLFlen = 8;                            /**&amp;lt; Length of length field in packet Header (in bits). */
	uint8_t           m_packetHeaderS0len = 1;                            /**&amp;lt; Length of S0 field in packet Header (in bytes). */
	uint8_t           m_packetHeaderS1len = 0;  
	uint8_t           m_packetHeaderPlen  = RADIO_PCNF0_PLEN_8bit;        /**&amp;lt; Length of the preamble. */
	uint8_t           m_static_length     = 0;                            /**&amp;lt; Number of bytes sent in addition to the var.length payload. */
	uint32_t          m_balen             = 3;                            /**&amp;lt; Base address length in bytes. */
	uint32_t          m_endian            = RADIO_PCNF1_ENDIAN_Little;    /**&amp;lt; On air endianess of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields. */
	uint32_t          m_whitening         = RADIO_PCNF1_WHITEEN_Disabled; /**&amp;lt; Whitening disabled. */
	uint32_t          m_crc_poly          = 0x0000065B;                   /**&amp;lt; CRC polynomial. */
	uint32_t          m_crc_init          = 0x00555555;   
	
	//reset radio
	NRF_RADIO-&amp;gt;SHORTS          = 0;
	NRF_RADIO-&amp;gt;EVENTS_DISABLED = 0;
	NRF_RADIO-&amp;gt;TASKS_DISABLE   = 1;

	while (NRF_RADIO-&amp;gt;EVENTS_DISABLED == 0)
	{
			// Do nothing
	}

	NRF_RADIO-&amp;gt;EVENTS_DISABLED = 0;
	NRF_RADIO-&amp;gt;TASKS_RXEN      = 0;
	NRF_RADIO-&amp;gt;TASKS_TXEN      = 0;
	
	//prepare
	NRF_RADIO-&amp;gt;CRCPOLY      = m_crc_poly;
    NRF_RADIO-&amp;gt;CRCINIT      = m_crc_init;
    NRF_RADIO-&amp;gt;FREQUENCY    = 2;
    NRF_RADIO-&amp;gt;EVENTS_READY = 0;
    NRF_RADIO-&amp;gt;SHORTS       = 0;


	NRF_RADIO-&amp;gt;TXPOWER = (RADIO_TXPOWER_TXPOWER_Pos8dBm &amp;lt;&amp;lt; RADIO_TXPOWER_TXPOWER_Pos);
    NRF_RADIO-&amp;gt;MODE    = (RADIO_MODE_MODE_Ble_LR125Kbit &amp;lt;&amp;lt; RADIO_MODE_MODE_Pos); //eric

	// Set the access address, address0/prefix0 used for both Rx and Tx address
	NRF_RADIO-&amp;gt;PREFIX0    &amp;amp;= ~RADIO_PREFIX0_AP0_Msk;
	NRF_RADIO-&amp;gt;PREFIX0    |= (m_address &amp;gt;&amp;gt; 24) &amp;amp; RADIO_PREFIX0_AP0_Msk;
	NRF_RADIO-&amp;gt;BASE0       = m_address &amp;lt;&amp;lt; 8;
	NRF_RADIO-&amp;gt;RXADDRESSES = RADIO_RXADDRESSES_ADDR0_Enabled &amp;lt;&amp;lt; RADIO_RXADDRESSES_ADDR0_Pos;
	NRF_RADIO-&amp;gt;TXADDRESS   = (0x00 &amp;lt;&amp;lt; RADIO_TXADDRESS_TXADDRESS_Pos) &amp;amp; RADIO_TXADDRESS_TXADDRESS_Msk;

	// Configure CRC calculation
	NRF_RADIO-&amp;gt;CRCCNF = (m_crcConfSkipAddr &amp;lt;&amp;lt; RADIO_CRCCNF_SKIP_ADDR_Pos) |
											(m_crcLength &amp;lt;&amp;lt; RADIO_CRCCNF_LEN_Pos);

	// Coded PHY (Long range)
	NRF_RADIO-&amp;gt;PCNF0 = (m_packetHeaderS1len &amp;lt;&amp;lt; RADIO_PCNF0_S1LEN_Pos) |
								 (m_packetHeaderS0len &amp;lt;&amp;lt; RADIO_PCNF0_S0LEN_Pos) |
								 (m_packetHeaderLFlen &amp;lt;&amp;lt; RADIO_PCNF0_LFLEN_Pos) |
								 (3 &amp;lt;&amp;lt; RADIO_PCNF0_TERMLEN_Pos) |
								 (2 &amp;lt;&amp;lt; RADIO_PCNF0_CILEN_Pos) |
								 (RADIO_PCNF0_PLEN_LongRange &amp;lt;&amp;lt; RADIO_PCNF0_PLEN_Pos);


	NRF_RADIO-&amp;gt;PCNF1 = (m_whitening          &amp;lt;&amp;lt; RADIO_PCNF1_WHITEEN_Pos) |
										 (m_endian             &amp;lt;&amp;lt; RADIO_PCNF1_ENDIAN_Pos)  |
										 (m_balen              &amp;lt;&amp;lt; RADIO_PCNF1_BALEN_Pos)   |
										 (m_static_length      &amp;lt;&amp;lt; RADIO_PCNF1_STATLEN_Pos) |
										 (DTM_PAYLOAD_MAX_SIZE &amp;lt;&amp;lt; RADIO_PCNF1_MAXLEN_Pos);

	
		//first packet in buffer
		NRF_RADIO-&amp;gt;PACKETPTR = (uint32_t)&amp;amp;RADIO_RX_BUFFER[advpktbufferptr];

		NRF_RADIO-&amp;gt;SHORTS = (RADIO_SHORTS_READY_START_Enabled &amp;lt;&amp;lt; RADIO_SHORTS_READY_START_Pos)|
												(RADIO_SHORTS_ADDRESS_RSSISTART_Enabled &amp;lt;&amp;lt; RADIO_SHORTS_ADDRESS_RSSISTART_Pos);
	
	  //radio should be configured at this point.  Power it up. 
		NRF_RADIO-&amp;gt;EVENTS_READY = 0U; //clear the read flad
    // Enable radio and wait for ready
    NRF_RADIO-&amp;gt;TASKS_RXEN = 1U;
    while (NRF_RADIO-&amp;gt;EVENTS_READY == 0U)
    {
        // wait
    }
    NRF_RADIO-&amp;gt;EVENTS_END = 0U; //radio ready, clear flag
    NRF_RADIO-&amp;gt;INTENSET=0x00000008; //on event end
	
		//ready! run this next line from main
		NVIC_EnableIRQ(RADIO_IRQn);

    NRF_RADIO-&amp;gt;TASKS_START = 1U; // Start listening and wait for address received event
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bringing  up 125Kbps Coded PHY on NRF52840</title><link>https://devzone.nordicsemi.com/thread/181422?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 22:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40393d66-12af-4b61-8137-cfac4ea5c7c3</guid><dc:creator>catsunami</dc:creator><description>&lt;p&gt;Take a look at the dtm example in the SDK (15.3.0), it sets up a connection using 125K or 500K. However, the thing I think you&amp;#39;re missing is the PCNF0_PLEN_LongRange setting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>