1 /*
2  * Copyright (c) 2019 STMicroelectronics
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief System/hardware module for STM32L4 processor
10  */
11 
12 #include <zephyr/kernel.h>
13 #include <zephyr/device.h>
14 #include <zephyr/init.h>
15 #include <soc.h>
16 #include <stm32_ll_bus.h>
17 
18 #include <cmsis_core.h>
19 
20 /**
21  * @brief Perform basic hardware initialization at boot.
22  *
23  * This needs to be run from the very beginning.
24  * So the init priority has to be 0 (zero).
25  *
26  * @return 0
27  */
stm32m4_init(void)28 static int stm32m4_init(void)
29 {
30 	/*HW semaphore Clock enable*/
31 	LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_HSEM);
32 
33 	/* Update CMSIS SystemCoreClock variable (HCLK) */
34 	SystemCoreClock = 209000000;
35 
36 	return 0;
37 }
38 
39 SYS_INIT(stm32m4_init, PRE_KERNEL_1, 0);
40