aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/stm32g4.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm32/stm32g4.c')
-rw-r--r--src/stm32/stm32g4.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stm32/stm32g4.c b/src/stm32/stm32g4.c
index 139ea8ea..1eed3ec1 100644
--- a/src/stm32/stm32g4.c
+++ b/src/stm32/stm32g4.c
@@ -22,6 +22,12 @@ lookup_clock_line(uint32_t periph_base)
if (periph_base < APB2PERIPH_BASE) {
uint32_t pos = (periph_base - APB1PERIPH_BASE) / 0x400;
if (pos < 32) {
+#if defined(FDCAN2_BASE)
+ if (periph_base == FDCAN2_BASE)
+ return (struct cline){.en = &RCC->APB1ENR1,
+ .rst = &RCC->APB1RSTR1,
+ .bit = 1 << 25};
+#endif
return (struct cline){.en = &RCC->APB1ENR1,
.rst = &RCC->APB1RSTR1,
.bit = 1 << pos};