drivers: clock_control: Add support for XOTUNE in nRF54L
Adding support for handling XOTUNE event in clock_control. Right now XOTUNE event reflects situation when HFCLK is stable and tuned. Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
This commit is contained in:
parent
1844e98d96
commit
68f6cfb382
1 changed files with 13 additions and 1 deletions
|
@ -681,6 +681,17 @@ static void clock_event_handler(nrfx_clock_evt_type_t event)
|
|||
const struct device *dev = CLOCK_DEVICE;
|
||||
|
||||
switch (event) {
|
||||
#if NRF_CLOCK_HAS_XO_TUNE
|
||||
case NRFX_CLOCK_EVT_XO_TUNED:
|
||||
clkstarted_handle(dev, CLOCK_CONTROL_NRF_TYPE_HFCLK);
|
||||
break;
|
||||
case NRFX_CLOCK_EVT_HFCLK_STARTED:
|
||||
/* HFCLK is stable after XOTUNED event.
|
||||
* HFCLK_STARTED means only that clock has been started.
|
||||
*/
|
||||
break;
|
||||
#else
|
||||
/* HFCLK started should be used only if tune operation is done implicitly. */
|
||||
case NRFX_CLOCK_EVT_HFCLK_STARTED:
|
||||
{
|
||||
struct nrf_clock_control_sub_data *data =
|
||||
|
@ -695,6 +706,8 @@ static void clock_event_handler(nrfx_clock_evt_type_t event)
|
|||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NRF_CLOCK_HAS_HFCLK192M
|
||||
case NRFX_CLOCK_EVT_HFCLK192M_STARTED:
|
||||
clkstarted_handle(dev, CLOCK_CONTROL_NRF_TYPE_HFCLK192M);
|
||||
|
@ -725,7 +738,6 @@ static void clock_event_handler(nrfx_clock_evt_type_t event)
|
|||
case NRFX_CLOCK_EVT_PLL_STARTED:
|
||||
#endif
|
||||
#if NRF_CLOCK_HAS_XO_TUNE
|
||||
case NRFX_CLOCK_EVT_XO_TUNED:
|
||||
case NRFX_CLOCK_EVT_XO_TUNE_ERROR:
|
||||
case NRFX_CLOCK_EVT_XO_TUNE_FAILED:
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue