<?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>never ending in random generator</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18768/never-ending-in-random-generator</link><description>I did some modification from radio test example.
But I don&amp;#39;t know why the function &amp;quot;rand8&amp;quot; never ending.
In the function, rand8, 
 NRF_RNG-&amp;gt;EVENTS_VALRDY = 0;
while (NRF_RNG-&amp;gt;EVENTS_VALRDY == 0)
{
 // Do nothing.
}
return NRF_RNG-&amp;gt;VALUE;
 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Jan 2017 02:37:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18768/never-ending-in-random-generator" /><item><title>RE: never ending in random generator</title><link>https://devzone.nordicsemi.com/thread/72486?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 02:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6de63804-c2c6-4f9d-877d-26c4cc0679d8</guid><dc:creator>sosse</dc:creator><description>&lt;p&gt;Thank you. I accidentally delete the init function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: never ending in random generator</title><link>https://devzone.nordicsemi.com/thread/72484?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 12:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d983cf1-c902-454a-bba4-484ad8aa1756</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;What modification did you do? As Wojtek mentioned, you need &lt;code&gt;NRF_RNG-&amp;gt;TASK_START = 1;&lt;/code&gt;, this is done in the init() function, so if you removed/modified this, the function rnd8() won&amp;#39;t return any values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: never ending in random generator</title><link>https://devzone.nordicsemi.com/thread/72485?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 12:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98a11add-3bfc-4778-b697-6cf095e825f3</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Never used that, but i think you have to start it, just like every other module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_RNG-&amp;gt;EVENTS_VALRDY = 0;
NRF_RNG-&amp;gt;TASK_START = 1;
while (NRF_RNG-&amp;gt;EVENTS_VALRDY == 0)
{
    // Do nothing.
}
return NRF_RNG-&amp;gt;VALUE;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>