<?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>nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15010/nrf52-esb-protocoll-mac-layer-access-and-access-to-low-level-software</link><description>Hello, 
 I am working with the Enhanced ShockBurst protocoll on a nRF52832. 
 
 
 For synchronization reasons between several nodes I need time stamps in my data packet from just before the message is sent. Have I access to this software layer? </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Aug 2016 13:27:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15010/nrf52-esb-protocoll-mac-layer-access-and-access-to-low-level-software" /><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57281?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2016 13:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:820ad248-8f71-48da-a004-26be4dd414b4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Florian,&lt;/p&gt;
&lt;p&gt;If you have a look at the end of on_radio_disabled_rx() , you can find where we push received data in to m_rx_fifo by calling rx_fifo_push_rfbuf(). I guess you can read the m_rx_fifo after that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57280?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 14:14:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acfffd62-6146-4387-bd2f-ef4774d0dbed</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;Good to know:)
Why I have no access to the data I received when I am in the function on_radio_disabled_rx(). The documentation is telling me I have access to the data in the RAM after the disabled_event occured. But there is no data in the m_rx_fifo. Firstly after I invoke the disable task (NRF_RADIO-&amp;gt;TASKS_DISABLE) and wait for the  EVENT_DISABLE I have access to the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57277?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 13:37:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67214f71-d90f-4906-8e0c-ae4c1bbf5345</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, you would need to clear the event flag or it will trigger the handler again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57282?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 12:07:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8949d6e-7333-4da0-9ae9-717d127967c1</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;An Event occurs (interrupt of this event is set) -&amp;gt; RADIO_IRQHandler() is called. Do I have to clear the interrupt flag? Or is the interrupt flag cleared automatically if the RADIO_IRQHandler() is called? Otherwise i would suppose, the RADIO_IRQHandler() is called all the time.&lt;/p&gt;
&lt;p&gt;For which reason the event flags are deleted in the RADIO_IRQHandler()?&lt;/p&gt;
&lt;p&gt;if (NRF_RADIO-&amp;gt;EVENTS_READY &amp;amp;&amp;amp; (NRF_RADIO-&amp;gt;INTENSET &amp;amp; RADIO_INTENSET_READY_Msk))
{
NRF_RADIO-&amp;gt;EVENTS_READY = 0;
DEBUG_PIN_SET(DEBUGPIN1);
}&lt;/p&gt;
&lt;p&gt;I would suppose, if the Event flag isn&amp;#39;t cleared the interrupt for this event occures in an infinite loop?!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57279?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 11:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce502e45-9e26-42b5-8275-09a7df41d267</guid><dc:creator>Hung Bui</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;What do you mean by delete Event flags ? Event triggered regardless of your setting.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Correct . Interrupt handler is only executed if you enable interrupt for that event.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57278?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 11:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86b77615-53b8-4e77-94a4-0df2befb07c6</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;One further question for my understanding:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If I want to work without shortcuts, when I have to delete Event flags? I will do it always in the RADIO_IRQHandler()?&lt;/li&gt;
&lt;li&gt;The RADIO_IRQHandler() is always called if an event occur for which I set an interrupt? Otherwise an event occur but the RADIO_IRQHandler() is not called?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57276?ContentTypeID=1</link><pubDate>Wed, 03 Aug 2016 10:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60a1c1bd-4d89-46d6-b1af-c2faed9fb0bd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I afraid there is no further documentation except for what we have on infocenter. We just recently open the source for ESB and it&amp;#39;s provided &amp;quot;as-is&amp;quot;. We may have better documentation in the future. For now you may need to study the source code.&lt;/p&gt;
&lt;p&gt;Those functions &amp;quot;on_radio_disabled_rx&amp;quot; &amp;quot;on_radio_disabled_rx_ack&amp;quot; are wraped by  on_radio_disabled and on_radio_disabled() will be called in the RADIO_IRQHandler().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57286?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2016 11:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55bee96d-3a4e-4def-ae02-bc9d28b72ba1</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;and for correct understanding. The code in the &amp;quot;on_radio_disabled_rx&amp;quot; and &amp;quot;on_radio_disabled_rx_ack&amp;quot; is executed from the shortcuts? Where are these functions assigned to the shortcuts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57285?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2016 11:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d41ad02-5aff-4b77-891c-a11a547a2c04</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;That sounds great. Is there a documentation of the following functions?
static void on_radio_disabled_tx_noack(void);
static void on_radio_disabled_tx(void);
static void on_radio_disabled_tx_wait_for_ack(void);
static void on_radio_disabled_rx(void);
static void on_radio_disabled_rx_ack(void);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57284?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2016 09:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1735afb-f6bb-4901-9e2d-e3462ba61a99</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I think it&amp;#39;s possible. You just need to increase the m_wait_for_ack_timeout_us so the PTX will keep the RX window open longer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how much longer, some calculation needed on how many CPU cycles needed, each CPU cycle takes 15ns (at 64MHz). The peripheral clock speed is 16MHz, so it a little bit slower when you try to read/write to the peripheral.&lt;/p&gt;
&lt;p&gt;Anyway, i guess it&amp;#39;s easiest to actually test and see if the current timeout is actually big enough or need some increment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57283?ContentTypeID=1</link><pubDate>Mon, 01 Aug 2016 15:57:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa220400-1d09-4d71-b8af-6ec62ceff872</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;&amp;quot;ACK packet is sent immediately after the RX reception. It&amp;#39;s handled all by the radio it self. It could be too late if you need to use CPU to read the RX payload, and then modify the Ack payload.&amp;quot;
Ah ok I understand. But there is a way to disable this feature, right? In docs is written the shortcuts can be disabled and I can manage all in my application. But of course there is a further processing delay. Can you tell me which delay i can expect? After the END Event is occured I would trigger the DISABLE-TASK of the radio manually, switch to TX-Mode and send the ACK. Is this possible? Of course I have to increase the retransmit time at the PTX.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57275?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2016 09:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3d0e017-9d99-4a62-9d8f-f207c6e3a40d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@florian: The packet sending is handled by SHORT, even if you put a breakpoint, it will be executed when the radio receive.
The following SHORTs are enabled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;READY -&amp;gt; START&lt;/li&gt;
&lt;li&gt;END -&amp;gt; DISABLE&lt;/li&gt;
&lt;li&gt;DISABLED -&amp;gt; TXEN (This only enabled when RX is starting)&lt;/li&gt;
&lt;li&gt;ADDRESS -&amp;gt; RSSI (not important)&lt;/li&gt;
&lt;li&gt;DISABLED -&amp;gt; RSSI (not important)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can see, when the packet received, END event will come and it trigger DISABLE (RX) after RX disabled it will trigger TX EN, after TX READY it will trigger START and the ACK packet is sent. Full autonomous.&lt;/p&gt;
&lt;p&gt;I think there is a challenge here that if you want to read the RX packet then decide what to send in the ACK payload packet of the same packet, there is a timing issue.
ACK packet is sent immediately after the RX reception. It&amp;#39;s handled all by the radio it self. It could be too late if you need to use CPU to read the RX payload, and then modify the Ack payload.&lt;/p&gt;
&lt;p&gt;If you wan to have a delay so that the CPU can read the RX packet and modify the tx ack payload you may need to modify the protocol to have longer RX period on the PTX to wait for the ACK.&lt;/p&gt;
&lt;p&gt;Or you can think of increase the packet size so you have some time between the ADDRESS event (when we start to receive the payload) and the PAYLOAD event (when we finish receiving the payload) to read the received packet (the first byte for example) and modify the ack payload accordingly.&lt;/p&gt;
&lt;p&gt;An easier option is to modify the ack payload for the next packet base on the value received on the current packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57274?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2016 17:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:558dee98-e08b-4e7b-b9b5-ab219ffc587f</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;maybe we have still a missunderstanding. What is the first function, which is called if a new packet is arrived at the PRX? Is it the RADIO_IRQHandler()? If yes, I set a breakpoint in this function that the program is halted at this point. That means no ACK should be send to the PTX, correct? But I receive an ACK at the PTX. So there must be a function which is responsible for the auto ACK to which I have no access to?
My intention is to decide which data is send in the ACK after the message is received at the PRX.
Maybe now it gets a little bit clearer?!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57269?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 09:32:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d06ecca-c0d5-4300-bb35-7ad735d70b6f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@florian: Sorry I was confused with the TX mode. The handling of ACK packet in PRX mode is executed by the SHORT setup when finishing a transmission/receiving. You can find at on_radio_disabled_rx() function, we assign the address and the pointer to the ack payload at line 775 in the nrf_esb.c.
And then in on_radio_disabled_rx_ack() we enable the short to enable TX when radio is disabled and send the data with the short READY-START.&lt;/p&gt;
&lt;p&gt;You should modify the m_tx_payload_buffer if you want to send different ack payloads.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57273?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 15:12:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d488dde0-3b99-41d6-a701-3d7e709917bc</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;I have the following system: 1x nRF52DK as PTX and 1x nRF52DK as PRX&lt;/p&gt;
&lt;p&gt;I wrote a little program with your examples, if I push the button a message is sent to the PRX and I expect the ACK back to the PTX.&lt;/p&gt;
&lt;p&gt;I open a J-Link Terminal for the PTX to see whether I will get the ACK.&lt;/p&gt;
&lt;p&gt;I set a breakpoint in this function (start_tx_transaction()) in the PRX. If there the ACK is triggered, then the PRX should go into this function in order to send out the ACK. But the PRX does not go into this function and I immediatly get the ACK back, I can see in the J-Link Terminal. It seems there is another software part which is responsible for sending the ACK?!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57272?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 08:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c04404c-8868-413e-b6c6-82095243ed2f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@florian: It&amp;#39;s handled in start_tx_transaction() function in nrf_esb.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57271?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 14:30:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7884aba-8638-4a2c-99ad-66ac320c9529</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;But in those files I have no access to the code where the automatic ACKs will be sent. Or does I miss something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57270?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 14:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b38c026e-4798-43ae-9e41-74cb3a8c4c71</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Maybe you need to look here: \components\properitary_rf\esb&lt;/p&gt;
&lt;p&gt;Or in any ESB example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57268?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2016 09:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:191b2feb-d7b4-459e-aa08-fdcc7904ea66</guid><dc:creator>florian2840</dc:creator><description>&lt;p&gt;Where can I found the sources of the ESB protocol in the SDK v11. I have searched for it, but find nothing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ESB protocoll mac layer access and access to low level software</title><link>https://devzone.nordicsemi.com/thread/57267?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2016 11:51:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7af25111-d5a1-4251-8214-9e7e744ea29c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Florian: The ESB library source is open now. Please check the SDK v11. You have access to radio hardware level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>