You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/12/23 13:23:36 UTC

[GitHub] [mynewt-core] danielkucera commented on a change in pull request #2441: hw/mcu/nordic/nrf52xxx: Using hfxo_request and release. Addresses #2393.

danielkucera commented on a change in pull request #2441:
URL: https://github.com/apache/mynewt-core/pull/2441#discussion_r547956552



##########
File path: hw/mcu/nordic/nrf52xxx/src/nrf52_clock.c
##########
@@ -44,7 +44,18 @@ nrf52_clock_hfxo_request(void)
     __HAL_DISABLE_INTERRUPTS(ctx);
     assert(nrf52_clock_hfxo_refcnt < 0xff);
     if (nrf52_clock_hfxo_refcnt == 0) {
-        NRF_CLOCK->TASKS_HFCLKSTART = 1;
+        /* Check the current STATE and SRC of HFCLK */
+        if ((NRF_CLOCK->HFCLKSTAT &
+             (CLOCK_HFCLKSTAT_SRC_Msk | CLOCK_HFCLKSTAT_STATE_Msk)) !=
+            (CLOCK_HFCLKSTAT_SRC_Msk | CLOCK_HFCLKSTAT_STATE_Msk)) {

Review comment:
       Just out of  curiosity... What is this condition supposed to test?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org