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 2019/12/29 19:38:01 UTC

[GitHub] [mynewt-core] mlaz commented on a change in pull request #1783: Modified the nRF5x timer and system init code to use the nRF HFXO manager

mlaz commented on a change in pull request #1783: Modified the nRF5x timer and system init code to use the nRF HFXO manager
URL: https://github.com/apache/mynewt-core/pull/1783#discussion_r361868204
 
 

 ##########
 File path: hw/mcu/nordic/nrf52xxx/src/nrf52_clock.c
 ##########
 @@ -39,7 +39,12 @@ nrf52_clock_hfxo_request(void)
     __HAL_DISABLE_INTERRUPTS(ctx);
     assert(nrf52_clock_hfxo_refcnt < 0xff);
     if (nrf52_clock_hfxo_refcnt == 0) {
+        /* Make sure that the HFXO has not previously been started manually */
+        assert((NRF_CLOCK->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk) !=
+            (CLOCK_HFCLKSTAT_STATE_Running << CLOCK_HFCLKSTAT_STATE_Pos));
 
 Review comment:
   When I compile a blinky and try to run it on an nrf52840 board it breaks on this assert.
   I just looked at some [nrfx code](https://github.com/NordicSemiconductor/nrfx/blob/master/hal/nrf_clock.h#L505) which verifies whether hfclk is running and I found a few differences. @amrbekhit Can you change and verify this please?

----------------------------------------------------------------
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


With regards,
Apache Git Services