summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn van der Woude <[email protected]>2025-08-09 10:41:03 +0200
committerMartijn van der Woude <[email protected]>2025-08-09 10:41:03 +0200
commit7142818abecca803bda7f31c3bfc1e5bd9eec51d (patch)
treea213fb764351395ab4a085fb79cc03f9015f0d30
parent5fb3c09963bca362e535788e289d4b3518da5973 (diff)
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