<?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>nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12864/nrf24l01-pipe2-to-pipe5-not-working</link><description>In an RFID application, we have nrf24l01+ and SMT32F4xx on the Reader and nrf24lu1+ on the tag. 
 The Reader is acting as multiceiver currently. 
 Pipe 0 and Pipe 1 are working fine. We have problem with Pipe 2 to Pipe 5. 
 RF channel is 2 , payload</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Mar 2016 11:03:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12864/nrf24l01-pipe2-to-pipe5-not-working" /><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48938?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 11:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19578484-67a3-4d14-98f1-822be267350a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;That&amp;#39;s why I wanted to see how you write to the register with  nrf24_writeRegister(). Just to make sure the first byte will be the MSB byte not the otherway around. Have you tried to test using our API/examples ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48940?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 10:11:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c70040a2-db9d-406f-9683-deb289f806ec</guid><dc:creator>Pradeep Chl</dc:creator><description>&lt;p&gt;We tried with RX_ADDR_P1 = { 0xE1, 0xE1, 0xE1, 0xE1, 0xE0} ; does it matter as first four bytes of RX_ADDR_P1 are taken by RX_ADDR_P2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48941?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 09:58:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f902c1e6-8ef9-4883-af6e-45bb0a1ea85b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Have you tried:  RX_ADDR_P1 = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1}; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48939?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 09:44:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:074619a6-0bcf-4910-853d-a0d7f9d0017d</guid><dc:creator>Pradeep Chl</dc:creator><description>&lt;p&gt;Thanks for the reply. I will edit the question next time.
Yes, we tried with TX_ADDR[5] = { 0xE1, 0xE1, 0xE1, 0xE1, 0xD2} and also with TX_ADDR[5] = {0xD2,0xE1,0xE1,0xE1,0xE1} on the Transmitter or Tag.&lt;/p&gt;
&lt;p&gt;The RX_ADDR_P2 is still not receiving data from the tag.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48936?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 08:39:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f8d9a9c-7302-4a77-b91b-badd01ea21d1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Pradeep:
Next time please edit your question or add comment instead of using Answer section.
I haven&amp;#39;t seen you configure the RX_ADDR_P0  in the code. It should be configured.
I suspect there could be a mismatch on the order of byte (byte endianness).&lt;/p&gt;
&lt;p&gt;You can try to test by using &lt;strong&gt;RX_ADDR_P1 = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1}; RX_ADDR_P2 = 0xD2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and then  try both:
&lt;strong&gt;TX_addr[5] = {0xE1,0xE1,0xE1,0xE1,0xD2};
and
TX_addr[5] = {0xD2,0xE1,0xE1,0xE1,0xE1};&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;respectively, to see if it&amp;#39;s the case.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how you write the register with nrf24_writeRegister() but I would suggest to use hal_nrf_write_multibyte_reg() function in hal_nrf.c .
Or better could you use hal_nrf_set_address() as in the example ? I suggest to test first with both side from the code from the example to make sure it works before moving to your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48937?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 05:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b79d7a1e-bdd2-49a1-b42b-8b95eb194184</guid><dc:creator>Pradeep Chl</dc:creator><description>&lt;p&gt;For the tag as transmitter, we have used nRFGO SDK&amp;#39;s example.
For Reader as receiver, please check below code.&lt;/p&gt;
&lt;p&gt;Reader Code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t rx1_address[5] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE0};
uint8_t rx2_address[1] = { 0xD2 };
uint8_t rx3_address[1] = { 0xC3 };
uint8_t rx4_address[1] = { 0xB4 };
uint8_t rx5_address[1] = { 0xA5 };
volatile uint8_t IRQ1 = 0;

    void main()
 {
// init hardware pins 
    nrf24_init();

// Set the device addresses 
        nrf24_rx1_address(rx1_address);  // RX_ADDR_P1. E1E1E1E1E0
	nrf24_rx2_address(rx2_address);  // RX_ADDR_P2  		D2
	nrf24_rx3_address(rx3_address);  // RX_ADDR_P3  		C3
	nrf24_rx4_address(rx4_address);  // RX_ADDR_P4  		B4
	nrf24_rx5_address(rx5_address);  // RX_ADDR_P5  		A5

	// Channel #2 , payload length: 10 
        nrf24_config(2,10);

     while(1)
    {
         if(IRQ1 == 1)
		{
			 IRQ1 = 0; 

			 if(nrf24_dataReady())
				  {
					nrf24_getData(data_array);
					  APP_PRINTF(&amp;quot; Antenna 1 =  &amp;quot;);  
					  APP_PRINTF(&amp;quot;%s&amp;quot;,data_array);
					APP_PRINTF(&amp;quot;\r\n&amp;quot;);
				  }

               }
      }
}      

void nrf24_config(uint8_t channel, uint8_t pay_length)
{
    /* Use static payload length ... */
    payload_len = pay_length;

    // Set RF channel
    nrf24_configRegister(RF_CH,channel);

    // Set length of incoming payload 
       nrf24_configRegister(RX_PW_P0, payload_len); // Auto-ACK pipe ... added
	nrf24_configRegister(RX_PW_P1, payload_len); // Data payload pipe
    nrf24_configRegister(RX_PW_P2, payload_len); // Pipe used 
    nrf24_configRegister(RX_PW_P3, payload_len); // Pipe used 
    nrf24_configRegister(RX_PW_P4, payload_len); // Pipe used 
    nrf24_configRegister(RX_PW_P5, payload_len); // Pipe used 

    // 250 Kbps, TX gain: 0dbm
	 nrf24_configRegister(RF_SETUP, 0x26);
	
    // CRC enable, 1 byte CRC length
    nrf24_configRegister(CONFIG,nrf24_CONFIG);

	nrf24_configRegister(EN_AA,(1&amp;lt;&amp;lt;ENAA_P0)|(1&amp;lt;&amp;lt;ENAA_P1)|(1&amp;lt;&amp;lt;ENAA_P2)|(1&amp;lt;&amp;lt;ENAA_P3)|(1&amp;lt;&amp;lt;ENAA_P4)|(1&amp;lt;&amp;lt;ENAA_P5));  // added

	nrf24_configRegister(EN_RXADDR,(1&amp;lt;&amp;lt;ERX_P0)|(1&amp;lt;&amp;lt;ERX_P1)|(1&amp;lt;&amp;lt;ERX_P2)|(1&amp;lt;&amp;lt;ERX_P3)|(1&amp;lt;&amp;lt;ERX_P4)|(1&amp;lt;&amp;lt;ERX_P5)); // added

	
    // Auto retransmit delay: 1000 us and Up to 15 retransmit trials
    nrf24_configRegister(SETUP_RETR,(0x04&amp;lt;&amp;lt;ARD)|(0x0F&amp;lt;&amp;lt;ARC));

    // Dynamic length configurations: No dynamic length
    nrf24_configRegister(DYNPD,(0&amp;lt;&amp;lt;DPL_P0)|(0&amp;lt;&amp;lt;DPL_P1)|(0&amp;lt;&amp;lt;DPL_P2)|(0&amp;lt;&amp;lt;DPL_P3)|(0&amp;lt;&amp;lt;DPL_P4)|(0&amp;lt;&amp;lt;DPL_P5));

    // Start listening
    nrf24_powerUpRx();
}
       

/* Set the RX address */
void nrf24_rx1_address(uint8_t * adr) 
{
    nrf24_ce_digitalWrite(LOW);
    nrf24_writeRegister(RX_ADDR_P1,adr,5);
    nrf24_ce_digitalWrite(HIGH);
}

/* Set the RX address */
void nrf24_rx2_address(uint8_t * adr) 
{
    nrf24_ce_digitalWrite(LOW);
    nrf24_writeRegister(RX_ADDR_P2,adr,1);
    nrf24_ce_digitalWrite(HIGH);
}

/* Set the RX address */
void nrf24_rx3_address(uint8_t * adr) 
{
    nrf24_ce_digitalWrite(LOW);
    nrf24_writeRegister(RX_ADDR_P3,adr,1);
    nrf24_ce_digitalWrite(HIGH);
}

/* Set the RX address */
void nrf24_rx4_address(uint8_t * adr) 
{
    nrf24_ce_digitalWrite(LOW);
    nrf24_writeRegister(RX_ADDR_P4,adr,1);
    nrf24_ce_digitalWrite(HIGH);
}

/* Set the RX address */
void nrf24_rx5_address(uint8_t * adr) 
{
    nrf24_ce_digitalWrite(LOW);
    nrf24_writeRegister(RX_ADDR_P5,adr,1);
    nrf24_ce_digitalWrite(HIGH);
}
/* Checks if data is available for reading */
/* Returns 1 if data is ready ... */
uint8_t nrf24_dataReady() 
{
    // See note in getData() function - just checking RX_DR isn&amp;#39;t good enough
    uint8_t status = nrf24_getStatus();

    // We can short circuit on RX_DR, but if it&amp;#39;s not set, we still need
    // to check the FIFO for any pending packets
    if ( status &amp;amp; (1 &amp;lt;&amp;lt; RX_DR) ) 
    {
        return 1;
    }

    return !nrf24_rxFifoEmpty();;
}

/* Reads payload bytes into data array */
void nrf24_getData(uint8_t* data) 
{
    /* Pull down chip select */
    nrf24_csn_digitalWrite(LOW);                               

    /* Send cmd to read rx payload */
    SPI1_send( R_RX_PAYLOAD );
    
    /* Read payload */
    nrf24_transferSync(data,data,payload_len);
    
    /* Pull up chip select */
    nrf24_csn_digitalWrite(HIGH);

    /* Reset status register */
    nrf24_configRegister(STATUS,(1&amp;lt;&amp;lt;RX_DR));   
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Tag code (Transmitter):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#ifdef MCU_NRF24LE1
#include &amp;quot;nrf24le1.h&amp;quot;
#include &amp;quot;hal_clk.h&amp;quot;
#endif

#ifdef MCU_NRF24LU1P
#include &amp;quot;nrf24lu1p.h&amp;quot;
#endif

#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;quot;cpu.h&amp;quot;
#include &amp;quot;hal_nrf.h&amp;quot;
#include &amp;quot;hal_uart.h&amp;quot;
#include &amp;quot;hal_delay.h&amp;quot;
#include &amp;quot;cklf.h&amp;quot;  
#include &amp;lt;string.h&amp;gt;

#ifndef MCU_NRF24LU1P
#include &amp;quot;hal_clk.h&amp;quot; //lint !e322 !e7 &amp;quot;include file not found&amp;quot;
#endif


// Global variables
static bool volatile radio_busy;
static bool volatile radio_transmit;

	uint8_t TX_addr[5] = {0xE1,0xE1,0xE1,0xE1,0xD2}; // for Tag 1
	
	uint8_t payload[10] = {&amp;#39;6&amp;#39;,&amp;#39;1&amp;#39;,&amp;#39;2&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;9&amp;#39;,&amp;#39;7&amp;#39;};    //payload for testing 1234567899  Tag 2
	//uint8_t payload[10] = {&amp;#39;1&amp;#39;,&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;,&amp;#39;4&amp;#39;,&amp;#39;4&amp;#39;,&amp;#39;4&amp;#39;,&amp;#39;4&amp;#39;,&amp;#39;4&amp;#39;,&amp;#39;5&amp;#39;,&amp;#39;6&amp;#39;};    //payload for testing 1234444456 Tag 1

		
uint16_t Buzzer_loop=0,Checkout=0;
uint8_t Fstate=0;
	
void main(void)
{	
	CLKCTL=0x80;     // system clock 16 Mhz

	
// Buzzer Configurations	
	
	P0DIR &amp;amp;= ~(1 &amp;lt;&amp;lt; 4);  // P0.4 Buzzer as output(TP-10)
	P0 &amp;amp;= ~(1 &amp;lt;&amp;lt; 4);     // P0.4 set LOW(Buzzer Off)
	
	
	
  #ifdef MCU_NRF24LE1
  while(hal_clk_get_16m_source() != HAL_CLK_XOSC16M)
  {
    // Wait until 16 MHz crystal oscillator is running
  }
  #endif

  #ifdef MCU_NRF24LU1P
  // Enable radio SPI
  RFCTL = 0x10U;
  #endif


  // Enable the radio clock
  RFCKEN = 1U;

  // Enable RF interrupt
  RF = 1U;

  // Enable global interrupt
  EA = 1U;

	hal_nrf_set_output_power(HAL_NRF_0DBM);    	// output power 0DBM

	hal_nrf_set_operation_mode(HAL_NRF_PTX);   		// Transmit mode
	
	hal_nrf_set_address_width(HAL_NRF_AW_5BYTES);  // Address width 5 bytes

	hal_nrf_set_address(HAL_NRF_TX,TX_addr);     	// set TX address E1
	hal_nrf_set_address(HAL_NRF_PIPE0,TX_addr);  	// set TX pipe0 E1 for Acknowledgement 

	hal_nrf_write_reg(SETUP_RETR,0x01);            	// 1 max-retransmits

	hal_nrf_set_rf_channel(2);                   	//channel 2
	
	hal_nrf_set_datarate(HAL_NRF_1MBPS);      		//data rate 1mbps
	//hal_nrf_set_datarate(HAL_NRF_250KBPS);          // data rate 250kbps
	
	// Power up radio
  hal_nrf_set_power_mode(HAL_NRF_PWR_UP);
	
  Fstate=1;
  radio_transmit = false;
		
	
	TICKDV = 0x03;
	WUIRQ = 1;  

  EA = 1U;
	
// cklf_rtc_init(0x00 , 0x3E80);  //RTC init 2 sec
 cklf_rtc_init(0x00 , 0x1F40);  //RTC init 1 sec
// cklf_rtc_init(0x00 , 0x9C40);  //RTC init 5 sec
 //P0 |= (1 &amp;lt;&amp;lt; 5);      // P0.4 set High
  for(;;)
  {
		
   
	hal_nrf_set_power_mode(HAL_NRF_PWR_UP);
		
    // Write payload to radio TX FIFO
    hal_nrf_write_tx_payload(payload, 10U);
	
		
    // Toggle radio CE signal to start transmission
    CE_PULSE();

    radio_busy = true;
				
    // Wait for radio operation to finish
    while (radio_busy)
					{
						
					}
				
	 hal_nrf_set_power_mode(HAL_NRF_PWR_DOWN);		
					
		if(radio_transmit)
		{
			Checkout=0;
      radio_transmit = false;
			 if(Fstate==1)        // Buzzer Loop 2 seconds
			   {
							for(Buzzer_loop=0;Buzzer_loop&amp;lt;10000;Buzzer_loop++)
									{
										delay_us(100);
										P0 |= (1 &amp;lt;&amp;lt; 4);      // P0.4 set High
										delay_us(100);
										P0 &amp;amp;= ~(1 &amp;lt;&amp;lt; 4);     // P0.4 set LOW
									}
					Fstate++;	 
				}
    }
		
		else
		{
        Checkout++;
			  //delay_ms(2);
				if(Checkout &amp;gt;= 10)
					{
						Checkout=0;
						Fstate=1;
					}			
		}
		
		WUF = 0;          //clear interupts
		cpu_pwr_down();   //power MCU	


  }
}

// Radio interrupt
NRF_ISR()
{
  uint8_t irq_flags;

  // Read and clear IRQ flags from radio
  irq_flags = hal_nrf_get_clear_irq_flags();

  switch(irq_flags)
  {
		 
			// Transmission success
			case (1 &amp;lt;&amp;lt; (uint8_t)HAL_NRF_TX_DS):
			radio_busy = false;
			radio_transmit = true;
      // Data has been sent
      break;
			// Transmission failed (maximum re-transmits)
			case (1 &amp;lt;&amp;lt; (uint8_t)HAL_NRF_MAX_RT):
      // When a MAX_RT interrupt occurs the TX payload will not be removed from the TX FIFO.
      // If the packet is to be discarded this must be done manually by flushing the TX FIFO.
      // Alternatively, CE_PULSE() can be called re-starting transmission of the payload.
      // (Will only be possible after the radio irq flags are cleared)
      // hal_uart_putstring(&amp;quot;Data write failed: &amp;quot;);
			hal_nrf_flush_tx();
      radio_busy = false;
      break;
			default:
      break;
  }
}

// Wake up interupt
WU_ISR()
{

}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF24L01+ Pipe2 to Pipe5 not working.</title><link>https://devzone.nordicsemi.com/thread/48935?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 13:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b793e94-082e-45fd-9c85-bd0dedec50a9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Pradeep,&lt;/p&gt;
&lt;p&gt;I would need to see your code for configuration on both side receiver and transmitter. Have you tried to test with our nRFGO SDK&amp;#39;s examples ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>