<?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 Radio example read always 0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33664/nrf52-radio-example-read-always-0</link><description>Hi, 
 Im not sure if im doing something wrong or what, but i&amp;#39;ve been hitting a wall when trying to use the radio example transmitter and receiver. 
 No matter what i send on the transmitter, the receiver always prints out 0. Here&amp;#39;s the code that im using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Apr 2018 08:20:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33664/nrf52-radio-example-read-always-0" /><item><title>RE: nrf52 Radio example read always 0</title><link>https://devzone.nordicsemi.com/thread/129690?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 08:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d18621a-2257-4937-af33-ec9665d2b26d</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;uint32_t nrf52::read()&lt;br /&gt;{&lt;br /&gt; NRF_RADIO-&amp;gt;PACKETPTR = (uint32_t)m_packet;&lt;/p&gt;
&lt;p&gt;The PACKETPTR is pointing to the address equal to the value of m_packet which is undefined. You need to take the address of m_packet with the &amp;#39;&amp;amp;&amp;#39; operator instead of its content.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 Radio example read always 0</title><link>https://devzone.nordicsemi.com/thread/129623?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 16:01:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:288cc66d-e0f4-4a73-b5cf-926697ec7e47</guid><dc:creator>chinzw</dc:creator><description>&lt;p&gt;I added a Serial.print() inside the CRC check condition.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 Radio example read always 0</title><link>https://devzone.nordicsemi.com/thread/129554?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 12:04:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8709eb99-911c-44c7-829a-2bf5294eecf1</guid><dc:creator>haakonsh</dc:creator><description>[quote user="chinzw"]First thing i checked was the CRC and that was fine.[/quote]
&lt;p&gt;How did you check the CRC, I need to know details.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 Radio example read always 0</title><link>https://devzone.nordicsemi.com/thread/129429?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 02:59:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7837d762-0088-4208-96a4-71e33d770f4a</guid><dc:creator>chinzw</dc:creator><description>&lt;p&gt;Well, i tried both things, but they didn&amp;#39;t make any difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 Radio example read always 0</title><link>https://devzone.nordicsemi.com/thread/129406?ContentTypeID=1</link><pubDate>Mon, 23 Apr 2018 16:23:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:118f534b-69c7-45f0-810b-1297e7f8faa5</guid><dc:creator>chinzw</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for replying to my question.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will try your second and third guesses. First thing i checked was the CRC and that was fine.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 Radio example read always 0</title><link>https://devzone.nordicsemi.com/thread/129356?ContentTypeID=1</link><pubDate>Mon, 23 Apr 2018 13:10:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40e2ff65-adfb-454e-a9ad-cade71ba6c86</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey chinzw,&lt;/p&gt;
&lt;p&gt;My first guess is that the CRC check fails. In that event you should receive 0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Second guess is that the call to&amp;nbsp;radio.write(123); is invalide because 123 is not declared and therefore its type will be int (int32_t), this is in violation of the maximum payload length that&amp;nbsp;you have&amp;nbsp;set to 1 byte. This should only truncate your payload though, but it&amp;#39;s a bug that you are likely to hit sooner or later.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Third guess is that your empty while() statements are optimized away by your compiler, you should put the CPU to sleep while waiting with the following commands:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;__WFE();
__SEV();
__WFE();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>