nimble/phy/nrf5x: Fix setting RTC CC[0] value

CC[0] has only 24 bits valid so we should mask target value. Not really
sure if this does matter on actual hardware (should not?), but BabbleSim
does not handle it correctly.
This commit is contained in:
Andrzej Kaczmarek
2023-02-27 14:10:20 +01:00
parent 2de66c2797
commit 154754b577
+1 -1
View File
@@ -782,7 +782,7 @@ ble_phy_set_start_now(void)
*/
now = os_cputime_get32();
NRF_RTC0->EVENTS_COMPARE[0] = 0;
nrf_rtc_cc_set(NRF_RTC0, 0, now + 3);
nrf_rtc_cc_set(NRF_RTC0, 0, (now + 3) & 0xffffff);
nrf_rtc_event_enable(NRF_RTC0, RTC_EVTENSET_COMPARE0_Msk);
#if PHY_USE_FEM_LNA