Skip to content

Commit e6d4b84

Browse files
authored
Merge pull request #2213 from pan-/fix#2132
Remove LF clock initialization from os_init_clock.
2 parents db60d6a + 07d7165 commit e6d4b84

File tree

1 file changed

+1
-10
lines changed
  • hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822

1 file changed

+1
-10
lines changed

hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -515,16 +515,7 @@ static void register_next_tick() {
515515
*/
516516
int os_tick_init (void)
517517
{
518-
NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
519-
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
520-
NRF_CLOCK->TASKS_LFCLKSTART = 1;
521-
522-
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {
523-
// wait for the low frequency clock start
524-
}
525-
526-
NRF_RTC1->PRESCALER = 0; /* for no pre-scaling. */
527-
518+
// their is no need to start the LF clock, it is already started by SystemInit.
528519
NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI);
529520
NVIC_ClearPendingIRQ(RTC1_IRQn);
530521
NVIC_EnableIRQ(RTC1_IRQn);

0 commit comments

Comments
 (0)