<?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>Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16817/received-data-is-not-stored-in-memory</link><description>I have an issue where after transmitting a radio package, is setting up the radio as receiver, get indication for reception (have indications for ADRESS and PAYLOAD events, get the END event intterupt, but the data in payload is not the same as the radio</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Oct 2016 14:17:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16817/received-data-is-not-stored-in-memory" /><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64350?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 14:17:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc7fb538-5c9c-41ea-ba04-e18fcde2c28f</guid><dc:creator>butch</dc:creator><description>&lt;p&gt;Almost out of ideas.  It sounds like you are writing a proprietary protocol.  Compare your code to Nordic examples such as ESB, the RadioHead NRF51 implementation, and to my open source nrfRawProtocol on Github.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64349?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 14:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12a0bd3c-535b-46c8-85b3-3273be57eb39</guid><dc:creator>wszellen</dc:creator><description>&lt;p&gt;Thanks for looking into this Butch, but I have set the PACKETPTR to the address of my buffer, then I have written the value of PACKETPTR as debug output and it is located in RAM, then I have writted the value that PACKETPTR is pointing at as debug output and no data is located there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64346?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 14:06:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73f44edf-91f4-4641-9bdb-c32346b8a8df</guid><dc:creator>butch</dc:creator><description>&lt;p&gt;I admit it is highly unlikely.  The compiler can see that you never wrote to the receive buffer.  It doesn&amp;#39;t know that the radio device does.  The compiler can think it is a constant, and put it in flash.  But the Nordic docs say it MUST be in RAM and if not you MIGHT get a hard fault (I could be misquoting, see the original.)  If it were in FLASH, the radio&amp;#39;s write would have no effect and if it did not generate a hard fault...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64348?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 13:19:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9159213f-9615-4bb3-8487-5f656bf29e48</guid><dc:creator>wszellen</dc:creator><description>&lt;p&gt;Thanks for the idea Butch,
PACKETPTR is written before each transmit and receive, have one global buffer for transmission of data and one global buffer for reception of data.&lt;/p&gt;
&lt;p&gt;I can not see how the compiler can optimize throwing away a global buffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64351?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 13:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41cc1a3c-303d-4609-b6fa-b91e81560fab</guid><dc:creator>butch</dc:creator><description>&lt;p&gt;More ideas: You write PACKETPTR before each xmit or rcv? (you can&amp;#39;t just set it once per session of the app, as documented in Nordic, and from my own experience.)  Whitening enabled same on both rcvr and emitter?  Buffer is not on the stack or heap where it could go out of scope and be reused?  Buffer is C volatile so optimizations do not think it is never written and thus a constant in flash memory? (Try less optimization)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64347?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 08:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a22a4c87-260f-42ac-a472-2f3aeef9ca77</guid><dc:creator>wszellen</dc:creator><description>&lt;p&gt;I found in an other thread that the EasyDMA is not completed until the DISABLED event was sent, but I have verified that the DISABLED event is completed (I check the STATE and it is 0)
The S0, LENGTH and S1 lengths is all 0, since they are not used at all.
If I clear the memory of the package, then it will still be 0 after the package is received, and that does not match the transmitted package.
I am looking of what part of the code I can expose without exposing any confidential parts for the software.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64345?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2016 14:35:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e76a1e0-5f08-49c7-b7dd-570974b08c50</guid><dc:creator>butch</dc:creator><description>&lt;p&gt;Just thinking out loud... is the received data changed (not all zeros) but not equal to what was transmitted?  Did you configure S0, LENGTH, S1 the same on the transmitter and receiver?  (They will be read from and written to the buffer even if you are not considering them part of the &amp;#39;payload.&amp;#39;)  On the nrf51 and nrf52 Reference Manuals both say  &amp;#39;The DISABLED event indicates that the EasyDMA has finished accessing the RAM&amp;#39;, that is, maybe you should use a different event (DISABLED rather than END) . Again, I don&amp;#39;t really know, I am just throwing out ideas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Received data is not stored in memory</title><link>https://devzone.nordicsemi.com/thread/64344?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2016 14:20:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16de7363-3cf9-4300-86d4-928f17a69476</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you considered using the nrf_esb library in the SDK?
Then you get all the packet handling, ACK and retransmit functionality for free.&lt;/p&gt;
&lt;p&gt;Are you able to share your code for configuring and using the radio?&lt;/p&gt;
&lt;p&gt;At the top of my head I can&amp;#39;t think of any reason why the data pointed to by PACKETPTR wouldn&amp;#39;t be updated when you get a valid END event in RX mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>