From 5dfe80d24ca6c36f59821f8537b4cb7beb28aaba Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 4 Oct 2019 17:05:40 +0200 Subject: [PATCH] boards/stm32: initialize board gpios after cpu --- boards/f4vi1/board.c | 6 +++--- boards/limifrog-v1/board.c | 5 +++-- boards/p-l496g-cell02/board.c | 6 +++--- boards/spark-core/board.c | 5 +++-- boards/stm32f0discovery/board.c | 6 +++--- boards/stm32f3discovery/board.c | 6 +++--- boards/stm32f429i-disc1/board.c | 6 +++--- boards/stm32f4discovery/board.c | 6 +++--- boards/stm32l0538-disco/board.c | 6 +++--- boards/stm32l476g-disco/board.c | 6 +++--- 10 files changed, 30 insertions(+), 28 deletions(-) diff --git a/boards/f4vi1/board.c b/boards/f4vi1/board.c index a390ca792e..ac3a96cda8 100644 --- a/boards/f4vi1/board.c +++ b/boards/f4vi1/board.c @@ -24,11 +24,11 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); gpio_init(LED2_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/limifrog-v1/board.c b/boards/limifrog-v1/board.c index ac52819c41..84171eb4d4 100644 --- a/boards/limifrog-v1/board.c +++ b/boards/limifrog-v1/board.c @@ -24,8 +24,9 @@ void board_init(void) { - /* initialize the boards LEDs */ - gpio_init(LED0_PIN, GPIO_OUT); /* initialize the CPU */ cpu_init(); + + /* initialize the boards LEDs */ + gpio_init(LED0_PIN, GPIO_OUT); } diff --git a/boards/p-l496g-cell02/board.c b/boards/p-l496g-cell02/board.c index 3a3a0bd90b..ee27df6766 100644 --- a/boards/p-l496g-cell02/board.c +++ b/boards/p-l496g-cell02/board.c @@ -23,10 +23,10 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/spark-core/board.c b/boards/spark-core/board.c index 16b2423d54..854f370995 100644 --- a/boards/spark-core/board.c +++ b/boards/spark-core/board.c @@ -24,6 +24,9 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); @@ -34,8 +37,6 @@ void board_init(void) gpio_set(LED2_PIN); gpio_set(LED3_PIN); - /* initialize the CPU */ - cpu_init(); /* disable systick interrupt, set by the spark bootloader */ SysTick->CTRL = 0; /* signal to spark bootloader: do not enable IWDG! set Stop Mode Flag! */ diff --git a/boards/stm32f0discovery/board.c b/boards/stm32f0discovery/board.c index 64eea24f92..b593318104 100644 --- a/boards/stm32f0discovery/board.c +++ b/boards/stm32f0discovery/board.c @@ -23,10 +23,10 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/stm32f3discovery/board.c b/boards/stm32f3discovery/board.c index 4960cfaacc..fb558a9f78 100644 --- a/boards/stm32f3discovery/board.c +++ b/boards/stm32f3discovery/board.c @@ -23,6 +23,9 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); @@ -32,7 +35,4 @@ void board_init(void) gpio_init(LED5_PIN, GPIO_OUT); gpio_init(LED6_PIN, GPIO_OUT); gpio_init(LED7_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/stm32f429i-disc1/board.c b/boards/stm32f429i-disc1/board.c index 1fe72e373f..1a2f3e5e7f 100644 --- a/boards/stm32f429i-disc1/board.c +++ b/boards/stm32f429i-disc1/board.c @@ -23,10 +23,10 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/stm32f4discovery/board.c b/boards/stm32f4discovery/board.c index b06836cfbd..160d3f3fde 100644 --- a/boards/stm32f4discovery/board.c +++ b/boards/stm32f4discovery/board.c @@ -23,12 +23,12 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); gpio_init(LED2_PIN, GPIO_OUT); gpio_init(LED3_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/stm32l0538-disco/board.c b/boards/stm32l0538-disco/board.c index a1d9fc06e1..e3cfe53853 100644 --- a/boards/stm32l0538-disco/board.c +++ b/boards/stm32l0538-disco/board.c @@ -23,10 +23,10 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize the boards LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); } diff --git a/boards/stm32l476g-disco/board.c b/boards/stm32l476g-disco/board.c index 12b83403ad..b8769c974d 100644 --- a/boards/stm32l476g-disco/board.c +++ b/boards/stm32l476g-disco/board.c @@ -23,10 +23,10 @@ void board_init(void) { + /* initialize the CPU */ + cpu_init(); + /* initialize LEDs */ gpio_init(LED0_PIN, GPIO_OUT); gpio_init(LED1_PIN, GPIO_OUT); - - /* initialize the CPU */ - cpu_init(); }