mirror of https://github.com/ARMmbed/mbed-os.git
Remove LF clock initialization from os_init_clock.
The LF clock initialization is already handled by the SystemInit function. This code was causing troubles when run on targets with an alternate LF clock.pull/2213/head
parent
db60d6a7f7
commit
07d7165f98
|
|
@ -515,16 +515,7 @@ static void register_next_tick() {
|
||||||
*/
|
*/
|
||||||
int os_tick_init (void)
|
int os_tick_init (void)
|
||||||
{
|
{
|
||||||
NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
|
// their is no need to start the LF clock, it is already started by SystemInit.
|
||||||
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. */
|
|
||||||
|
|
||||||
NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI);
|
NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI);
|
||||||
NVIC_ClearPendingIRQ(RTC1_IRQn);
|
NVIC_ClearPendingIRQ(RTC1_IRQn);
|
||||||
NVIC_EnableIRQ(RTC1_IRQn);
|
NVIC_EnableIRQ(RTC1_IRQn);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue