summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-09-03 14:38:57 +0700
committerGitHub <[email protected]>2025-09-03 14:38:57 +0700
commitbcff6388f9beb11b1082f619aa25d404fd1b4e0a (patch)
tree76c729798aca079e10bcce81f0de3cc8a031a0dd
parent8c5d05238fb02c584cb3462afc431512f733803e (diff)
parent7142818abecca803bda7f31c3bfc1e5bd9eec51d (diff)
Merge pull request #3210 from martijnvdwoude/fix/stm32l4-gpiod-conditional
Fix STM32L4 GPIOD clock enable for variants without GPIOD
-rw-r--r--hw/bsp/stm32l4/family.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/bsp/stm32l4/family.c b/hw/bsp/stm32l4/family.c
index 2b555b5c2..5c6ba5c61 100644
--- a/hw/bsp/stm32l4/family.c
+++ b/hw/bsp/stm32l4/family.c
@@ -59,7 +59,9 @@ void board_init(void) {
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
+#if defined(GPIOD)
__HAL_RCC_GPIOD_CLK_ENABLE();
+#endif
#if defined(GPIOE)
__HAL_RCC_GPIOE_CLK_ENABLE();
#endif