mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2213 from pan-/fix#2132
Remove LF clock initialization from os_init_clock.pull/2196/merge
commit
e6d4b84197
|
@ -515,16 +515,7 @@ static void register_next_tick() {
|
|||
*/
|
||||
int os_tick_init (void)
|
||||
{
|
||||
NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
|
||||
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
|
||||
NRF_CLOCK->TASKS_LFCLKSTART = 1;
|
||||
|
||||
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {
|
||||
// wait for the low frequency clock start
|
||||
}
|
||||
|
||||
NRF_RTC1->PRESCALER = 0; /* for no pre-scaling. */
|
||||
|
||||
// their is no need to start the LF clock, it is already started by SystemInit.
|
||||
NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI);
|
||||
NVIC_ClearPendingIRQ(RTC1_IRQn);
|
||||
NVIC_EnableIRQ(RTC1_IRQn);
|
||||
|
|
Loading…
Reference in New Issue