Skip to content

Commit d991607

Browse files
committed
LP-527 Move PIOS_DELAY_Init() after the peripheral clocks have been started. F0 uses TIM2 for delays.
1 parent aadd17d commit d991607

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

flight/pios/stm32f0x/pios_sys.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ void PIOS_SYS_Init(void)
6161
/* do this early to ensure that we take exceptions in the right place */
6262
NVIC_Configuration();
6363

64-
/* Init the delay system */
65-
PIOS_DELAY_Init();
66-
6764
/*
6865
* Turn on all the peripheral clocks.
6966
* Micromanaging clocks makes no sense given the power situation in the system, so
@@ -98,6 +95,9 @@ void PIOS_SYS_Init(void)
9895
RCC_APB2Periph_TIM1 |
9996
0, ENABLE);
10097

98+
/* Init the delay system */
99+
PIOS_DELAY_Init();
100+
101101
/*
102102
* Configure all pins as input / pullup to avoid issues with
103103
* uncommitted pins, excepting special-function pins that we need to

0 commit comments

Comments
 (0)