<?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>NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24495/nrf24le1-communication</link><description>Hi all!
I am approaching this with pretty much zero experience but what I&amp;#39;m trying to build should be a piece of cake for you so any help, example code, advice will be appreciated. 
 The idea is to build a simple notification system.
The RX is connected</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 May 2018 11:55:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24495/nrf24le1-communication" /><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/130519?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 11:55:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2fe4107-04d9-42c3-9c7e-b72508b3dd20</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;How do you define the tx_address and rx_address variables?&lt;/p&gt;
&lt;p&gt;Do you know if they are located in data, xdata or code memory?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/130188?ContentTypeID=1</link><pubDate>Sat, 28 Apr 2018 19:02:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b263a842-b57c-43b3-aea8-61ace3b372cd</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;Hello! It&amp;#39;s been a while but slow and steady I have almost produced the system I need.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But I have encountered a problem I can&amp;#39;t overcome. My simple system works just fine as long as I have on pair of nrf24le1&amp;#39;s as they use the default address. Problem is, I need several pairs working in close range, therefore I want to set address for each pair of nrf&amp;#39;s I need.&lt;/p&gt;
&lt;p&gt;When I use the lines:&amp;nbsp;&lt;span&gt;hal_nrf_set_address(HAL_NRF_TX, tx_address) and&amp;nbsp;hal_nrf_set_address(HAL_NRF_PIPE0, rx_address); in my code, Keil compiler shows: &amp;quot;warning C196: mspace probably invalid&amp;quot; when compiling&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What am I doing wrong? Any suggestions?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96438?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 10:45:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85479251-f049-4fff-a15f-add78e8a22e8</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;// Global variables
uint8_t payload[3];&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void main()
{
	// Open GPIO latches in case they were previously locked.
  
OPMCON = 0x00;
	
#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 = 0x10;
  #endif

	P0CON = 0x70; // Disable digital input buffer, pin used for 32kHz.
	P0CON = 0x71; // Disable digital input buffer, pin used for 32kHz.
  //P0CON = 0x76;    // P06 must not be disconnected as it is required to wake up the nRF24LE1 

  // Set P0.6 as input for wake up, others as output
  
P0DIR = 0x40;

  // Enable the radio clock
  RFCKEN = 1; 

	hal_rtc_start(false);
	hal_clklf_set_source(HAL_CLKLF_XOSC32K); 
	hal_rtc_set_compare_mode(HAL_RTC_COMPARE_MODE_0);
	hal_rtc_set_compare_value(0x7FFF);
	hal_rtc_start(true);

	// Wait for the 32kHz to startup (change phase)
	while((CLKLFCTRL&amp;amp;0x80)==0x80);
	while((CLKLFCTRL&amp;amp;0x80)!=0x80);
	
  // Enable RF interrupt
  RF = 1;
  
// Enable global interrupt
  EA = 1;
	
IEN1 = 0x08;

  // Configure radio as primary receiver (PRX)
  hal_nrf_set_operation_mode(HAL_NRF_PRX);

  // Set payload width to 3 bytes
  hal_nrf_set_rx_payload_width((int)HAL_NRF_PIPE0, 3);

  // Power up radio
  hal_nrf_set_power_mode(HAL_NRF_PWR_UP);

  // Enable receiver
  CE_HIGH();

  for(;;)
	
{
		// Wake up on pin P0.6
		
WUOPC0 = 0x40;
		// Inverse wakeup on pin polarity on selected GPIO&amp;#39;s (P06 on 24-pin LE1. P06, P12 and P14 on 32-pin LE1. P22 and P26 on 48-pin LE1).
    
OPMCON |= 0x04;
		
// Lock GPIO latches. 
    
OPMCON |= 0x02;
		
// Register retention mode
		
PWRDWN = 0x04;
		
// Standby mode (wait for interrupt)
		
PWRDWN = 0x07;
		
// Clear PWRDWN
		
PWRDWN = 0x00;
		
// Continue to run code
		
P03 = !P03; 
	};
}

void wakeup_tick() interrupt INTERRUPT_TICK
{
P02 = !P02;
}

// Radio interrupt
NRF_ISR()
{
  uint8_t irq_flags;

  // Read and clear IRQ flags from radio
  irq_flags = hal_nrf_get_clear_irq_flags();

  // If data received
  if((irq_flags &amp;amp; (1&amp;lt;&amp;lt;(uint8_t)HAL_NRF_RX_DR)) &amp;gt; 0)
  {
    
// Read payload
    while(!hal_nrf_rx_fifo_empty())
    {
      hal_nrf_read_rx_payload(payload);
    }

    
// Write received payload[0] to port 0
    P0 = payload[0];
  }
}

/** @} */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96437?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2017 10:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d7664c1-4ffa-4dc4-ba23-78e6fcd6c2ee</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;Hello! :)
So I&amp;#39;ve been experimenting with the Nordic&amp;#39;s given example codes and codes I could find on the internet. From 0 knowledge in this I have went to at least some knowledge in all this.
I have been trying to merge the ESB(PRX) example code and the &amp;quot;Register retention, timers on&amp;quot; and WUOP funstion examples, but it does not seem to working.
When I switch on the PRX, LED&amp;#39;s just light up and there is no reaction when I put pins to GND on PRX and PTX modules.
The setup is PRX connected to 3.3V, GND and P04, P05 to LED&amp;#39;s. On the PTX side, 3.3V, GND and P04, P05 to buttons. I will attach the code I&amp;#39;ve been trying to get working. I would greatly appreciate if you could take a look and see what might be the problem. Thank you for any tips and suggestions!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96436?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2017 12:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:221e2310-4a8c-499c-b557-1ca8ef3d8e0b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;br /&gt;
These are independent mechanisms and can be enabled separately. There are separate interrupt handlers for the two wakeup sources that will fire, depending on what woke you up.&lt;br /&gt;
In other words you shouldn&amp;#39;t have to change any of the existing code to add the wakeup on pin functionality.&lt;br /&gt;
Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96443?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2017 18:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aff75bca-d665-4955-8bd7-288b7488f54e</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;In connection with the TX module setup, the RX module would be programmed in RTC mode and ESB_prx. When going through the question section I saw a post where you uploaded an example where you modified the ESB TX example to use RTC sleep. I see the difference between the orig. ESB TX example. The problem is that I don&amp;#39;t really understand how the WUOPC0/1 works with the RTC sleep. In the example codes for RTC I see that there is &amp;quot;wakeup_tick&amp;quot;. Does that part of the code needs to be changed to WUOPC0/1 or the &amp;quot;wakeup_tick&amp;quot; remains and WUOPC0/1 is added?
Thank you for you patience with me.
Many thanks, M&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96442?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2017 18:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e393a1c-79ae-4515-ad22-6032993754f9</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;Thank you for the suggestion! :) I assume that a 3uA power consumption would be okay, even if the RX module would be switched on for approx. 16 h a day.
I hope it&amp;#39;s okay that I write another question for you here.
Power consumption on the TX module is not very relevant as it would be connected to an appliance which would switch the module on maybe just a few times a week. According to that I assume I can use the ESB_ptx example to program it, make f.e. pin 0.6 as active low and by switch on it should trigger the RX module to wake it up if the pin 0.6 is set for WUOPC0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96440?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2017 14:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c59e54ee-bb1d-4a8a-b6d9-4c1b21a3b261</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;I am glad to hear it made more sense now :)&lt;br /&gt;
Depending on the wakeup interval you might want to consider &amp;#39;register retention&amp;#39; mode also. The sleep current is a bit higher (~3uA), but you don&amp;#39;t have to reset the MCU for each wakeup. This means that you spend less time re-configuring all the interfaces and modules, which speeds up wake up and might simplify code development (in register retention the code will continue running where it left off, rather than starting from the top).&lt;br /&gt;
Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96439?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2017 16:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecca6106-5fcc-4045-8ea2-db3efed5026c</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;After your response I now understand this better. At first I thought that I could program the RX to wake up on pin, set some pins as active low on the TX side but that&amp;#39;s not how it works as the RX won&amp;#39;t look for the packets in deep sleep mode.
I assume I could just leave the RX chip in active mode and let it look for packets from the TX all the time but that would cause a serious power consumption.
After looking at the Power cons. in Product spec. I understand that the &amp;quot;memory retention timers on&amp;quot; mode would fit best and provide a low power consumption even if I&amp;#39;d program the RX chip to wake up every 3 seconds.
I&amp;#39;ll try to examine that mode and hope I&amp;#39;ll get somewhere.
Thank you again for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96441?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2017 16:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94300871-958f-49d3-bba9-fabe8424d973</guid><dc:creator>ozo.m</dc:creator><description>&lt;p&gt;Thank you for the thorough response!
Fortunately I was able to program them again and they are working just fine. I had some wiring issues on the breadboard that caused the chip to warm up but that&amp;#39;s fixed.
Your given example works good, I managed to enter deep sleep and wake up on pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF24LE1  Communication</title><link>https://devzone.nordicsemi.com/thread/96435?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2017 11:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fa0f101-fcc8-448e-a99d-9bdf0a1ea771</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What do you mean about nearly burning the chips? That you were unable to program them again?&lt;/p&gt;
&lt;p&gt;I wrote a small example many years ago, showing how to implement wakeup on pin from deep sleep: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Wakeup-on-pin.zip"&gt;Wakeup on pin.zip&lt;/a&gt;&lt;br /&gt;
Maybe you could take a look at that and see if you handle power management in the same way?&lt;/p&gt;
&lt;p&gt;Also, please be aware that you can&amp;#39;t use the radio in deep sleep mode. If you want to wake up the chip through the radio you have to simulate it by waking up periodically and turning on the RX for a short amount of time to look for packets, and then you can go to sleep in between RX periods. If you want to sleep on a timer then the lowest mode you can use is &amp;#39;memory retention timers on&amp;#39;.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>