<?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 receive advertisement with raw register access</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34324/nrf52-receive-advertisement-with-raw-register-access</link><description>Hi, 
 I am trying to receive BLE advertisements on Ch38 (=2426MHz) without using SoftDevice, i.e. with direct register access. However &amp;quot;EVENTS_DISABLED&amp;quot; is very rarely called (if at all). Any ideas what I might be doing wrong? 
 
 
 Best, Paul</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 May 2018 18:00:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34324/nrf52-receive-advertisement-with-raw-register-access" /><item><title>RE: nRF52 receive advertisement with raw register access</title><link>https://devzone.nordicsemi.com/thread/132133?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 18:00:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3df51c6-b0de-4308-83c3-addc760973b3</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;Actually nvm, I copied the settings from your exampel and it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 receive advertisement with raw register access</title><link>https://devzone.nordicsemi.com/thread/132110?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 15:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e119e4b2-c147-45da-9a0c-dc0890a89295</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;br /&gt;the HFCLK is started before executing the code above. Any ideas what else could cause this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 receive advertisement with raw register access</title><link>https://devzone.nordicsemi.com/thread/132058?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 13:31:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10259db-cbc2-4512-bc8e-6a49c037061b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Paul&lt;/p&gt;
&lt;p&gt;Your code seems fine, but perhaps you didn&amp;#39;t start the external 32MHz crystal?&lt;/p&gt;
&lt;p&gt;Without this running the radio will be running off of the internal RC oscillator, which means the frequency will be way off and the reception poor.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you start the external clock before enabling the radio the code should work fine:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For future reference you can also have a look at the radio HAL from the solar beacon example. This example is sending advertise packets rather than receiving them, but the radio configuration is very similar for TX and RX:&lt;br /&gt;&lt;a href="https://github.com/NordicPlayground/solar_sensor_beacon/blob/master/src/hal_radio.c"&gt;https://github.com/NordicPlayground/solar_sensor_beacon/blob/master/src/hal_radio.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>