nRF52810 Errata CLOCK: EVENTS_HFCLKSTARTED / How to Add Stabilization Time?

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 Radio performance.

WORKAROUND:  States if the startup time can be longer than 400us the software must ensure using a timer that the 32MHz XTAL has had enough time to startup before using Peripherals such as the Radio/ADC/etc.

QUESTION:  While I see how to to manually start the Radio by the following lines of code...

      NRF_CLOCK->TASKS_HFCLKSTART = 1;
      while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0 );

How can I go about adding a constant delay before the Radio tries to use the HFCLK for the case that I get a HFCLKSTARTED = 1 but the XTAL truly hasn't stabilized?  I have tried adding delays but it has not seemed to work.  Can someone help me with having the ability to set a stabilization time that is longer than 400us that I can control. 

I have been using a simple project "ble_app_blinky" for this. 

Functionality I observe is that once the application enters the for(;;) loop and enters sleep and then wakes up the HFLCLK is not consistently stabilizing in time and dramatically affects our radio performance. 

Would be very grateful if someone can help me with being able to add an extra stabilization time inside the for(;;) loop that I can control the duration of the extra delay after the nRF52810 comes out of SLEEP and the HFXO is trying to stabilize before the Radio turns on.

I have attached the simple 'ble_app_blinky_mod' project I have been using.  You can place Unzip this directly into the examples/ble_peripheral folder and it will NOT overwrite the original 'ble_app_blinky' project as I have renamed the folder and project to 'ble_app_blink_mod'.

BTW - I am using SDK => nRF5_SDK_16.0.0_98a08e2 and S112 7.0.1

Thanks in Advance!!

Regards,

Frank

  • Hello Hung,

     

    Thanks for your responses.  I will try the XTAL setup you show below and let you know what I see today.  I am the hardware guy for us but know enough firmware to be 'dangerous' 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.

    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?

    2) Read Range & Connectable vs. Non-Connectable Configurations:  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 'Read Ranges' with our hardware configured with the DC/DC converter with Connectable vs. Non-Connectable beacons.  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.

    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's.  If I don'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...

    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...?

    Regards,

    Frank

  • Hi Franks, 

    Thanks for the information. It's indeed quite 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. 

    Ketil will handle the private case that you created as he has the most experience in radio and hardware 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. 

Related