<?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>esb nRF24LU and nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3965/esb-nrf24lu-and-nrf51822</link><description>I am trying to get enhanced shockburst working with the nRF24LU and the nRF5188. I am using the nRF5188 as the transmitter and the nRF24LU as the receiver. I am using the nRF51 sdk version 6. The example that I am using for the nRF51822 is the esb_ptx_ack_payload</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Oct 2014 14:13:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3965/esb-nrf24lu-and-nrf51822" /><item><title>RE: esb nRF24LU and nRF51822</title><link>https://devzone.nordicsemi.com/thread/14273?ContentTypeID=1</link><pubDate>Fri, 24 Oct 2014 14:13:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d054994-e767-40bf-8cfb-8135d835b4d6</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;This is not an answer. Edit your question to include the information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: esb nRF24LU and nRF51822</title><link>https://devzone.nordicsemi.com/thread/14272?ContentTypeID=1</link><pubDate>Fri, 03 Oct 2014 23:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c77820f-6ad4-42c4-a56d-ae602fa6e441</guid><dc:creator>Sean</dc:creator><description>&lt;p&gt;Hakon&lt;/p&gt;
&lt;p&gt;Thanks for the help, I did miss the fact that my program exits. I must have accidentally deleted the for(;;) loop that was at the end of main(). So I added the for(;;) after CE_HIGH() and I still can&amp;#39;t get the 2 micro-controllers to communicate with each other.&lt;/p&gt;
&lt;p&gt;I added the code for the nRF51822 in case you want to look at it. Maybe I missed something else. Also, it might be good for others to see what&amp;#39;s going on in case they ever want to do the same thing.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; #include &amp;quot;nrf_esb.h&amp;quot;
 #include &amp;quot;nrf_gpio.h&amp;quot;

/*****************************************************************************/
/** @name Configuration */
/*****************************************************************************/

// Define pipe
#define PIPE_NUMBER 0 ///&amp;lt; We use pipe 0 in this example

// Define payload length
#define TX_PAYLOAD_LENGTH 1 ///&amp;lt; We use 1 byte payload length when transmitting

// Data and acknowledgement payloads
static uint8_t my_tx_payload[TX_PAYLOAD_LENGTH];                ///&amp;lt; Payload to send to PRX. 
static uint8_t my_rx_payload[NRF_ESB_CONST_MAX_PAYLOAD_LENGTH]; ///&amp;lt; Placeholder for received ACK payloads from PRX.

/** @} */


 /*****************************************************************************/
 /** 
  * @brief Main function. 
  * 
  * @return ANSI required int return type.
  */
 /*****************************************************************************/
 int main()
 {
uint32_t i;
// Setup port directions
nrf_gpio_cfg_input(19,GPIO_PIN_CNF_PULL_Pullup);
nrf_gpio_cfg_output(16);

// Initialize ESB
(void)nrf_esb_init(NRF_ESB_MODE_PTX);

(void)nrf_esb_enable();  

// Add packet into TX queue
my_tx_payload[0] = (~nrf_gpio_pin_read(19)) | 0x80;
(void)nrf_esb_add_packet_to_tx_fifo(PIPE_NUMBER, my_tx_payload, TX_PAYLOAD_LENGTH, NRF_ESB_PACKET_USE_ACK);

   while(1)
   {
    // Optionally set the CPU to sleep while waiting for a callback.
		// __WFI();
	for(i=0; i&amp;lt;1000000; i++){}
		
	nrf_gpio_pin_toggle(16);	
     }
  }


  /*****************************************************************************/
  /** @name ESB callback function definitions  */
  /*****************************************************************************/


  // If an ACK was received, we send another packet. 
 void nrf_esb_tx_success(uint32_t tx_pipe, int32_t rssi){
// Read buttons and load data payload into TX queue
my_tx_payload[0] = (~nrf_gpio_pin_read(19)) | 0x80;  
(void)nrf_esb_add_packet_to_tx_fifo(PIPE_NUMBER, my_tx_payload, TX_PAYLOAD_LENGTH, NRF_ESB_PACKET_USE_ACK);
 }


  // If the transmission failed, send a new packet.
  void nrf_esb_tx_failed(uint32_t tx_pipe){
(void)nrf_esb_add_packet_to_tx_fifo(PIPE_NUMBER, my_tx_payload, TX_PAYLOAD_LENGTH, NRF_ESB_PACKET_USE_ACK);
 }

 void nrf_esb_rx_data_ready(uint32_t rx_pipe, int32_t rssi){
uint32_t my_rx_payload_length;
// Pop packet and write first byte of the payload to the GPIO port.
(void)nrf_esb_fetch_packet_from_rx_fifo(PIPE_NUMBER, my_rx_payload, &amp;amp;my_rx_payload_length);  
if (my_rx_payload_length &amp;gt; 0)
{
	 nrf_gpio_pin_set(16); // Button press is active low.
}
else
{
	nrf_gpio_pin_clear(16);
}
 }

 // Callbacks not needed in this example.
 void nrf_esb_disabled(void)
 {}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: esb nRF24LU and nRF51822</title><link>https://devzone.nordicsemi.com/thread/14271?ContentTypeID=1</link><pubDate>Fri, 03 Oct 2014 13:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02baacaa-4797-4e40-8589-136483313df6</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Your main program exits. An embedded program should never exit. Add a while(1){} after &amp;quot;CE_HIGH();&amp;quot; and see if that fixes the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>