<?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>nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88618/nrf52810-errata-clock-events_hfclkstarted-how-to-add-stabilization-time</link><description>Hello Everyone, 
 We are using a nRF52810. 
 We have ran into an issue where our 32MHz XTAL can take longer than 400us and thus the Errata 3.6[68] CLOCK: EVENTS_HFCLKSTARTED can be generated before HFCLK is Stable has came into play and is affecting our</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Jun 2022 12:33:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88618/nrf52810-errata-clock-events_hfclkstarted-how-to-add-stabilization-time" /><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371892?ContentTypeID=1</link><pubDate>Fri, 10 Jun 2022 12:33:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8694feec-4b0a-4ff7-b36f-a2b57e37e209</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Franks,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks for the information. It&amp;#39;s indeed quite&amp;nbsp;strange issue that you have here. Especially with the test result about the code I suggested to run at the beginning of main() and the test result of the RF Spectrum.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Ketil will handle the private case that you created as he has the most experience in&amp;nbsp;radio and hardware&amp;nbsp;among us in our team. I will work along side with him on this case. We will try to test on the hardware that you sending us.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371716?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 15:37:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3872c78d-3074-4769-95ff-91f25b5b1041</guid><dc:creator>sensormaestros2</dc:creator><description>&lt;p&gt;Hello Hung,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your responses.&amp;nbsp; I will try the XTAL setup you show below and let you know what I see today.&amp;nbsp; I am the hardware guy for us but know enough firmware to be &amp;#39;dangerous&amp;#39; so there may be some things that are not obvious to me on the firmware side but I can get things configured the way I need them and verify they are operating in the modes I need via Spectrum Analyzers, Scopes, and Power measurement tools.&lt;/p&gt;
&lt;p&gt;1) If the XTAL warm-up is 1.5ms then I am rather confused as to why the Errata for the nRF52810-QCAA CLOCK: EVENTS_HFCLKSTARTED can be generated before HFCLK is stable specifically mentions 400us as being the critical time value that the 32MHz XTAL must startup in or the Errata can cause issues?&lt;/p&gt;
&lt;p&gt;2) Read Range &amp;amp; Connectable vs. Non-Connectable Configurations:&amp;nbsp; Yes I agree generally one would think that a BLE Scanner should always pick up a BLE Advertisement if it sees it BUT what I can tell you that there is a CLEAR DIFFERENCE between &amp;#39;Read Ranges&amp;#39; with our hardware configured with the DC/DC converter with Connectable vs. Non-Connectable beacons.&amp;nbsp; I also agree that a major clue is that the Connectable Beacons all have a Scan-Response and my hunch is as you mention that if the BLE Scanner/Mobile App does not get the Scan Response then it assumes the BLE Beacon is not there and does not show it in the list of Beacons that it sees.&lt;/p&gt;
&lt;p&gt;3) nrf_pwr_mgmnt_run() OK understand the net effect I can clearly see is that IF logging is disabled and this function is called I get my expected AVG IDD for a nRF52810 with a 2000ms ADV Interval which means it is going to SLEEP between ADV Tx&amp;#39;s.&amp;nbsp; If I don&amp;#39;t allow this function to be called the device never goes to sleep and the interesting thing is that IF the device DOES NOT GO TO SLEEP I get ~2X the Read Range of the Same hardware with the same software but is allowed to go to sleep...hence the Errata I have been referring to...&lt;/p&gt;
&lt;p&gt;4) I have no problem sharing schematics and Gerbers but I will need to move this to a private case to do so...is there a way to transfer this to be a private case or should I enter a new private case...?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371596?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 09:02:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f239cc40-3b38-4011-9cbe-e7a3edd7a4a5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Frank,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a look at this again:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can find that the softdevice will try to start the XTAL about 1.5ms before each advertising event or connection event. And by default after each connection/advertising event it will disable the XTAL to save power.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This means that it is difficult for the application to intercept this procedure of the softdevice to&amp;nbsp;extend the&amp;nbsp;ramp up time (which is already quite long)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, there is one thing you can try to test is to start the XTAL before the softdevice started. In this case the softdevice will not turn off the XTAL after each connection/advertising event.&amp;nbsp;&lt;br /&gt;Please add :&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;&lt;br /&gt; while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0 );&lt;br /&gt;nrf_delay_us(1000);&lt;/p&gt;
&lt;p&gt;Before you call&amp;nbsp;ble_stack_init();&lt;/p&gt;
&lt;p&gt;This way we can be sure if the &lt;span&gt;XTAL stabilization time&lt;/span&gt;&amp;nbsp;is causing the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not so clear about the Read Range on the phone. You mentioned that it&amp;#39;s the range that the phone detect the beacon. However, I don&amp;#39;t see&amp;nbsp;why in your test connectable vs non-connectable could make any difference in the range test.&lt;/p&gt;
&lt;p&gt;Since the phone should be able to detect the beacon regardless if the scan request/scan response is sent/received or not. What I meant is that if you do connectable beacon it should have the same range as non-connectable beacon if we don&amp;#39;t take scan request /scan response into account. There is a chance that the phone discard the advertising packet if it doesn&amp;#39;t receive scan response packet.&lt;/p&gt;
&lt;p&gt;I would suggest to cross check by using one of our NRF52 DK as the scanner and perform the same test.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also one more thing to clarify,&amp;nbsp;&lt;span&gt;nrf_pwr_mgmt_run() will not put the device to SYSTEM OFF mode, instead it only put the device to&amp;nbsp; System ON idle mode (put the CPU to sleep).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Could you please send us the schematic and PCB layout of your latest board ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371494?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 17:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebc080a6-c27b-42e8-827d-f63053f46957</guid><dc:creator>sensormaestros2</dc:creator><description>&lt;p&gt;Hello Hung,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Read Range = Using Mobile Device in this case Android Galaxy Tab A with a BLE Client app such as nRF Connect.&amp;nbsp; These are connectable Beacons so I am simply measuring the distance at which the BLE Client during a SCAN picks up the Beacon Advertisement.&amp;nbsp; This is what we refer to as &amp;#39;Read Range&amp;#39; the distance at which a BLE Client can reliably &amp;#39;see&amp;#39; the Beacon Advertisement.&amp;nbsp; As simple as that.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For &amp;#39;Connectable Beacon&amp;#39; simple example would be BLE_Blinky as an example with DC/DC Enabled this &amp;#39;Read Range&amp;#39; is basically 1/2 of the &amp;#39;Read Range&amp;#39; for a Connectable Beacon with the LDO enabled.&lt;/li&gt;
&lt;li&gt;For a &amp;#39;Non-Connectable Beacon&amp;#39; TX only I get the same read range whether the DC/DC is enabled or the LDO.&amp;nbsp; A simple example is the nRF Beacon example.&lt;/li&gt;
&lt;li&gt;For a &amp;#39;Connectable Beacon&amp;#39; configured to use the DC/DC we can disable it from boing to SYSTEM OFF and we get the same Read Range as a LDO enabled &amp;#39;Connectable Beacon&amp;#39; that utilizes SLEEP/SYSTEM OFF in between each Tx which is 2000ms.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When I mention Receiver Sensitivity I am referring to the nRF52810.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We have done a new revision of the PCBA that was sent to Ketil in which we moved the 32MHz and 32kHz XTAL to the opposite side of the PCB from the nRF52810 to avoid possible 32MHz noise affecting the nRF52 Receive Sensitivity and increased the Cload cap values to 15pF for a 10pF Cload 32MHz XTAL.&amp;nbsp; We also re-arranged the DC/DC components slightly to match closer to the orientation of the nRF52810 Reference design.&amp;nbsp; The problem still exists.&lt;/p&gt;
&lt;p&gt;We have also tested &amp;#39;Shielded 10uH &amp;amp; 15nH&amp;#39; inductors thinking that possibly the switching noise is bleeding into the nRF52 RF Path/Receiver but yielded no noticeable improvement.&lt;/p&gt;
&lt;p&gt;To avoid having the nRF52810 go to SYSTEM OFF we simply don&amp;#39;t call the nrf_pwr_mgmt_run() so the nRF52810 never goes into a SLEEP Mode in between Beacon Transmits.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Being that this is somehow tied to having the nRF52 wake from SYSTEM OFF/SLEEP mode I have also tried using the&lt;/p&gt;
&lt;p&gt;sd_power_mode_set(NRF_POWER_MODE_CONSTLAT);&lt;/p&gt;
&lt;p&gt;to see if that yielded any noticeable results.&amp;nbsp; Had no effect.&lt;/p&gt;
&lt;p&gt;Last night I looked at the RF Spectrum from 2MHz - 2480MHz using the Radio Test app and put the nRF52 into Receiver Mode to inspect if there was a noticeable difference between when the DC/DC is enabled vs. LDO and you can see from the Spectrum plots there is no noticeable noise difference at the Receiver input between when the DC/DC is enabled vs. the LDO.&lt;/p&gt;
&lt;p&gt;I am going to do the same thing but with using the simple ble_app_blinky example modified to have a longer Adv interval of 2000ms and with Logging disabled so it can enter SYSTEM OFF mode.&lt;/p&gt;
&lt;p&gt;This comes back to the original topic of the Errata that talks about the EVENTS_HFCLKSTARTED that could be generated before the HFCLK is stable and if the XTAL stabilization time takes longer than 400us the Workaround indicates that the user MUST ADD A DELAY using a timer to ensure the XTAL has had enough time to stabilize.&lt;/p&gt;
&lt;p&gt;At this time I don&amp;#39;t have an easy way to probe or inspect the HFCLK.&amp;nbsp; It would have been nice to have the ability to output the HFCLK or a divided down version of it directly onto a GPIO Pin.&amp;nbsp; If there is an easy way to do this could you please instruct me how to do this.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2M_2D00_2480MHz-BCN_2D00_P6700-Rx-DCDC-RAD_5F00_TEST.png" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2M_2D00_2480MHz-BCN_2D00_P6700-Rx-LDO-RAD_5F00_TEST.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371337?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 09:29:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91bc289f-f197-4191-9ecb-0507a3ef3d34</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Frank,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you clarify what you meant by &amp;quot;Read range&amp;quot; ? How did you test that ? Does it involve that the scan response need to be received on the phone to consider it as &amp;quot;readable&amp;quot; ? or only the initial advertising packet is enough ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;When you mentioned &amp;quot;&lt;span&gt;&amp;nbsp;Receiver Sensitivity&amp;quot; , is it the RSSI on the phone or the RSSI on the device ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I noticed that you have a long discussion with our coworker Ketil on your other ticket, is this the same PCB as the one you sent to Ketil ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you give more detail on how you avoid the device to enter&amp;nbsp;SLEEP/SYSTEM OFF mode ? Please be&amp;nbsp;noted that waking up from&amp;nbsp; System off will cause a chip reset.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371261?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 05:30:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7304149-7ff0-401c-bbf8-d4cf6b426e16</guid><dc:creator>sensormaestros2</dc:creator><description>&lt;p&gt;Hello Hung&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Yeah sorry I should have deleted the lines in the for(;;) loop I had been experimenting and was assuming that the HFXO could be started each time from the System OFF mode.&amp;nbsp; I will outline my issues with Radio performance but first to clarify there is still a possibility of the 32MHz XTAL not being stabilized before the EVENTS_HFCLKSTARTED is set to 1, correct?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;ISSUE Observed:&amp;nbsp; This has been a long standing issue that must be solved to reduce IDD.&amp;nbsp; When the DC/DC is enabled we lose about 1/2 of the Read Range of our beacon.&amp;nbsp; Our beacon is a connectable beacon and thus must have a Scan Response.&amp;nbsp; We have tested the same hardware with LDO enabled and we get effectively 2X the Read range from a BLE Scanner looking for the Advertisements.&amp;nbsp; As soon as we enabled the DC/DC our Read Range from a BLE Client/Scanner is 1/2 the read range.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Testing:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) I have performed testing with a TX Only Beacon with the DC/DC enabled and the same BLE Client/Scanner nRF Connect on Android in this case can see the Beacon at the same range as the same hardware enabled as a &amp;#39;Connectable Beacon&amp;#39; with the LDO enabled.&lt;/p&gt;
&lt;p&gt;2)&amp;nbsp; I have tested the same hardware configured in a &amp;#39;Connectable Beacon&amp;#39; mode ble_blinky app using the DC/DC BUT with not allowing the nRF52 to go to SLEEP and I also get the same Beacon Read Range from a BLE Client/Scanner as the hardware configured to use the LDO.&lt;/p&gt;
&lt;p&gt;Conclusions:&amp;nbsp; Based on the 2 tests above and other similar testing performed there MUST be an issue with one or both of the following scenarios...&lt;/p&gt;
&lt;p&gt;1) DC/DC Enabled is affecting Receiver Sensitivity in a significant fashion.&amp;nbsp; Otherwise the TX Only Beacon Mode would have same reduced BLE Client/Scanner Read Range.&lt;/p&gt;
&lt;p&gt;2) SYSTEM OFF has a direct affect on making this issue prevalent.&amp;nbsp; There is something going on with coming out of SYSTEM OFF every 2000ms and then turning on the Radio that is causing an issue.&amp;nbsp; If this was not the case then units that were not configured to utilize the SYSTEM OFF would have no noticeable difference to the same hardware that is programmed to go into SYSTEM OFF/SLEEP mode in between Advertising Transmits which is configured for ever 2000ms.&lt;/p&gt;
&lt;p&gt;We have been dealing with this issue for a long time now and have tested a couple different versions of PCBA&amp;#39;s with slightly different Cload values and different Cl cap values on the 32MHz XTALs and we always seem to end up in the same spot which is when we enable the DC/DC converter we end up with 1/2 the Read range as the same hardware with the LDO configured.&lt;/p&gt;
&lt;p&gt;One could easily think that it is a 32MHz clock issue that is causing the Rx sensitivity degradation but this should also occur in the LDO mode if this was the case, correct?&amp;nbsp; Secondarily the fact that we get the same &amp;#39;Read Range&amp;#39; or ability to see the Beacon Advertisements from a BLE Client(nRF Connect) from a unit configured to use the DC/DC that is NOT allowed to go to SLEEP/SYSTEM OFF mode seems to lend itself to an issue with getting the system to stabilize correctly after waking from SLEEP.&amp;nbsp; Hence the original assertion that this could be due to the Errata 3.6 [68] CLOCK: EVENTS_HFCLKSTARTED can be generated before HFCLK is stable.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My hunch is that once the DC/DC is enabled there is enough 4MHz switching noise that it is either causing the 32MHz XTAL longer than 400us to stabilize which brings into affect the Errata OR the 4MHz switching noise is impacting the Receive sensitivity.&lt;/p&gt;
&lt;p&gt;The culprit must lie in either the DC/DC switching noise reducing the Rx Sensitivity or once the &amp;#39;COMING OUT OF SLEEP&amp;#39; with the DC/DC enabled is causing the XTAL longer than 400us to stabilize.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?</title><link>https://devzone.nordicsemi.com/thread/371115?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2022 11:18:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe54322f-1237-481b-a0da-dcacc164d3eb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Frank,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know which exact the radio performance issue you have ?&amp;nbsp;&lt;br /&gt;What&amp;#39;s the worst start up time of your crystal ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the code that you provided I don&amp;#39;t see how&amp;nbsp;HFCLK_Delay(1000) can return 0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And what you are trying to do by putting&amp;nbsp;NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1; in to the main loop ? Could you instead call this function at the beginning of main() instead ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Note that the softdevice will start the HFCLK automatically about 1.5ms before it&amp;#39;s actually using the HFCLK for the radio.&amp;nbsp;&lt;br /&gt;See here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>