Skip to content

Commit 3eedfcc

Browse files
djiatsaf-stcfriedt
authored andcommitted
drivers: clock_control: stm32: enable clocks for SRAM1 and SRAM2
enables the AHB2 peripheral clocks for SRAM1 and SRAM2 on STM32H7RSX series using LL_AHB2_GRP1_EnableClock. These clocks are required to access the corresponding SRAM regions during runtime. Fixes potential access faults when using SRAM1 and SRAM2. Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent db54c4c commit 3eedfcc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/clock_control/clock_stm32_ll_h7.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,14 @@ int stm32_clock_control_init(const struct device *dev)
10401040
#endif
10411041
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
10421042

1043+
#if defined(CONFIG_SOC_SERIES_STM32H7RSX)
1044+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram1))
1045+
LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_AHBSRAM1);
1046+
#endif
1047+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram2))
1048+
LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_AHBSRAM2);
1049+
#endif
1050+
#endif
10431051
/* Set up individual enabled clocks */
10441052
set_up_fixed_clock_sources();
10451053

0 commit comments

Comments
 (0)