aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/stm32g0.c
diff options
context:
space:
mode:
authorBIGTREETECH <38851044+bigtreetech@users.noreply.github.com>2022-06-01 22:43:45 +0800
committerGitHub <noreply@github.com>2022-06-01 10:43:45 -0400
commit1ff72612033de0f4b857d960358c88eaa1046e4b (patch)
tree35c0a6a6a7a30873701c3b498d50ee7eeac557e5 /src/stm32/stm32g0.c
parentaf38d708cb3fad993422b8cf6bf4880acda568a3 (diff)
downloadkutter-1ff72612033de0f4b857d960358c88eaa1046e4b.tar.gz
kutter-1ff72612033de0f4b857d960358c88eaa1046e4b.tar.xz
kutter-1ff72612033de0f4b857d960358c88eaa1046e4b.zip
stm32: stm32g0b1 fdcan support (#5488)
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
Diffstat (limited to 'src/stm32/stm32g0.c')
-rw-r--r--src/stm32/stm32g0.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stm32/stm32g0.c b/src/stm32/stm32g0.c
index 6cb7c54c..4906f051 100644
--- a/src/stm32/stm32g0.c
+++ b/src/stm32/stm32g0.c
@@ -30,6 +30,8 @@ lookup_clock_line(uint32_t periph_base)
uint32_t bit = 1 << ((periph_base - AHBPERIPH_BASE) / 0x400);
return (struct cline){.en=&RCC->AHBENR, .rst=&RCC->AHBRSTR, .bit=bit};
}
+ if ((periph_base == FDCAN1_BASE) || (periph_base == FDCAN2_BASE))
+ return (struct cline){.en=&RCC->APBENR1,.rst=&RCC->APBRSTR1,.bit=1<<12};
if (periph_base == USB_BASE)
return (struct cline){.en=&RCC->APBENR1,.rst=&RCC->APBRSTR1,.bit=1<<13};
if (periph_base == CRS_BASE)