1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-26 15:54:15 +01:00

LP-527 Move PIOS_DELAY_Init() after the peripheral clocks have been started. F0 uses TIM2 for delays.

This commit is contained in:
Vladimir Zidar 2017-06-05 01:09:52 +02:00
parent aadd17d1b4
commit d991607aa5

View File

@ -61,9 +61,6 @@ void PIOS_SYS_Init(void)
/* do this early to ensure that we take exceptions in the right place */
NVIC_Configuration();
/* Init the delay system */
PIOS_DELAY_Init();
/*
* Turn on all the peripheral clocks.
* Micromanaging clocks makes no sense given the power situation in the system, so
@ -98,6 +95,9 @@ void PIOS_SYS_Init(void)
RCC_APB2Periph_TIM1 |
0, ENABLE);
/* Init the delay system */
PIOS_DELAY_Init();
/*
* Configure all pins as input / pullup to avoid issues with
* uncommitted pins, excepting special-function pins that we need to