From 0f1e5105740b08d5033737accc6922bad90fb825 Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Fri, 25 Mar 2022 12:46:49 +0100 Subject: [PATCH] Nimble: Compatibility with LFRC calibration Nimble has to be aware of the low frequency clock calibration procedure, in order to not interfere with the usage of the HFCLK. For more info, see https://github.com/apache/mynewt-nimble/issues/1207 --- src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c b/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c index 2f6ce08e..aa25096b 100644 --- a/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c +++ b/src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c @@ -37,6 +37,7 @@ #else #include "core_cm4.h" #endif +#include #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY) #if !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52840) && !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52811) @@ -2101,7 +2102,7 @@ ble_phy_rfclk_enable(void) #if MYNEWT nrf52_clock_hfxo_request(); #else - NRF_CLOCK->TASKS_HFCLKSTART = 1; + nrf_drv_clock_hfclk_request(NULL); #endif } @@ -2111,6 +2112,6 @@ ble_phy_rfclk_disable(void) #if MYNEWT nrf52_clock_hfxo_release(); #else - NRF_CLOCK->TASKS_HFCLKSTOP = 1; + nrf_drv_clock_hfclk_release(); #endif }