Skip to content

Commit ee89011

Browse files
committed
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 apache/mynewt-nimble#1207
1 parent a1e909d commit ee89011

File tree

1 file changed

+3
-2
lines changed
  • src/libs/mynewt-nimble/nimble/drivers/nrf52/src

1 file changed

+3
-2
lines changed

src/libs/mynewt-nimble/nimble/drivers/nrf52/src/ble_phy.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#else
3838
#include "core_cm4.h"
3939
#endif
40+
#include <legacy/nrf_drv_clock.h>
4041

4142
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
4243
#if !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52840) && !MYNEWT_VAL_CHOICE(MCU_TARGET, nRF52811)
@@ -2101,7 +2102,7 @@ ble_phy_rfclk_enable(void)
21012102
#if MYNEWT
21022103
nrf52_clock_hfxo_request();
21032104
#else
2104-
NRF_CLOCK->TASKS_HFCLKSTART = 1;
2105+
nrf_drv_clock_hfclk_request(NULL);
21052106
#endif
21062107
}
21072108

@@ -2111,6 +2112,6 @@ ble_phy_rfclk_disable(void)
21112112
#if MYNEWT
21122113
nrf52_clock_hfxo_release();
21132114
#else
2114-
NRF_CLOCK->TASKS_HFCLKSTOP = 1;
2115+
nrf_drv_clock_hfclk_release();
21152116
#endif
21162117
}

0 commit comments

Comments
 (0)