[riot-notifications] [RIOT-OS/RIOT] cpu/nrf5x: enhance external HF clock source handling to allow for substantial energy savings (#15804)

benpicco notifications at github.com
Wed Jan 20 13:19:51 CET 2021


@benpicco commented on this pull request.



> @@ -39,14 +43,34 @@ void clock_init_hf(void)
 #endif
 #endif
 
-#if CLOCK_HFCLK
-    /* start the HF clock */
-    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
-    NRF_CLOCK->TASKS_HFCLKSTART = 1;
-    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0) {}
+    /* allow to always enable the HFXO as non-default option */
+#if CLOCK_HFXO_ONBOOT

This option is never defined / documented.

Do we need it at all?

> @@ -247,6 +248,11 @@ static int _init(netdev_t *dev)
     txbuf[0] = 0;
     _state = 0;
 
+    /* the radio need the external HF clock source to be enabled */
+    /* @todo    add proper handling to release the clock whenever the radio is
+     *          idle */
+    clock_hfxo_request();

I think `nrf802154_radio.c` will need an update too. This always needs to be updated together with `NRF_RADIO->POWER`, right? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15804#pullrequestreview-572161718
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210120/af31e9a1/attachment.htm>


More information about the notifications mailing list