This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Activating the HFCLK

Hi

We are using an external 32MHz crystal to generate the internal 64MHz clock.

As described in several examples, we start the HFCLK with

NRF_CLOCK->TASKS_HFCLKSTART    = 1;

Now our question is: how can we be shure, that the HFCLK has started correctly and is runnig stable? We found several times in this forum the hint that one shoud check for the 

EVENTS_HFCLKSTARTED event.
What is a bit confusing to us is the following description of this event in the nRF52840 Product Specification v1.2.pdf manual on Page 94:
"The EVENTS_HFCLKSTARTED event is generated after the HFXO power up time + the HFXO debounce time has elapsed. It is not allowed to change the value of this register while the HFXO is starting."
For us that sounds like the event is generated in every case after HFXO power up time + the HFXO debounce time, even if the clock is not running propperly.
Can please some one clarify this behaviour for us?
best regards
Michael
Parents
  • Hi,

     

    "The EVENTS_HFCLKSTARTED event is generated after the HFXO power up time + the HFXO debounce time has elapsed. It is not allowed to change the value of this register while the HFXO is starting."
    For us that sounds like the event is generated in every case after HFXO power up time + the HFXO debounce time, even if the clock is not running propperly.
    Can please some one clarify this behaviour for us?

     That event will not fire unless the HFXO is present and has been successfully started.

    You can use this event, or you can read the HFCLKSTAT register.

    Kind regards,

    Håkon

Reply
  • Hi,

     

    "The EVENTS_HFCLKSTARTED event is generated after the HFXO power up time + the HFXO debounce time has elapsed. It is not allowed to change the value of this register while the HFXO is starting."
    For us that sounds like the event is generated in every case after HFXO power up time + the HFXO debounce time, even if the clock is not running propperly.
    Can please some one clarify this behaviour for us?

     That event will not fire unless the HFXO is present and has been successfully started.

    You can use this event, or you can read the HFCLKSTAT register.

    Kind regards,

    Håkon

Children
No Data
Related