Skip to content

Commit 8c079e9

Browse files
erwangogalak
authored andcommitted
serial: Provide STM32Cube based serial driver on stm32f1, stm32f4
STM32Cube based implementation allows single driver file for all stm32 based SoCs. By maximizing code reuse, use of STM32Cube eases new SoCs porting into Zephyr and provides better maintanability and maturity. Change-Id: Ief4b723add3dfc8b2a839683559c5a4c5d5eb837 Signed-off-by: Erwan Gouriou <[email protected]>
1 parent c899cd0 commit 8c079e9

File tree

5 files changed

+139
-262
lines changed

5 files changed

+139
-262
lines changed

arch/arm/soc/st_stm32/stm32f1/soc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ static int stm32f1_init(struct device *arg)
6060

6161
irq_unlock(key);
6262

63+
/* Update CMSIS SystemCoreClock variable (HCLK) */
64+
SystemCoreClock = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
65+
6366
return 0;
6467
}
6568

arch/arm/soc/st_stm32/stm32f4/soc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ static int st_stm32f4_init(struct device *arg)
6161

6262
irq_unlock(key);
6363

64+
/* Update CMSIS SystemCoreClock variable (HCLK) */
65+
SystemCoreClock = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
66+
6467
return 0;
6568
}
6669

0 commit comments

Comments
 (0)