Using High Resolution Oscillator for zephyr timer

Dear Nordic Team,

I had questions concerning the use of the High resolution oscillator

Question 1 :

Could you provide the detailed step needed to enable the HFXO ?

Some previous ticket mentioned that “ NRF_CLOCK->TASKS_HFCLKSTART  = 1;” should enable it, is it the only thig to do ?

What about the whole Clock control API of zephyr, is something like “clock_control_on(clock0, CLOCK_CONTROL_NRF_SUBSYS_HF);” needed ?

Eventually, is there a simple example on how to switch the oscillator ? 

 

Question 2: 

If the HFXO is enable, will the Zephyr timer use this HFXO for generating time duration ?  

(for example if using  “k_timer_start(&my_status_timer, K_USEC(200), K_NO_WAIT);”  , will the 200us counted using the HFXO ?)

I’ m asking that because we are having issue with very short timer delay , it seems that the zephyr timer can’t handle a value smaller than 100us, because we are using the LFXO 32.768 kHz. For our project we need to be able to generate very short timer duration. (around 10us) 

 

(I’ m using an NRF52840 DK , SDK v2.5.2)

 

Thanks for you help

 

Gregoire

Related