aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsam/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atsam/main.c')
-rw-r--r--src/atsam/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/atsam/main.c b/src/atsam/main.c
index 8c2e4318..3728b734 100644
--- a/src/atsam/main.c
+++ b/src/atsam/main.c
@@ -14,6 +14,8 @@
#define FREQ_PERIPH_DIV (CONFIG_MACH_SAME70 ? 2 : 1)
#define FREQ_PERIPH (CONFIG_CLOCK_FREQ / FREQ_PERIPH_DIV)
+#define FREQ_SAME70_CAN 80000000
+
/****************************************************************
* watchdog handler
****************************************************************/
@@ -62,6 +64,10 @@ enable_pclock(uint32_t id)
uint32_t
get_pclock_frequency(uint32_t id)
{
+#if CONFIG_MACH_SAME70
+ if (id == MCAN0_CLOCK_ID || id == MCAN1_CLOCK_ID)
+ return FREQ_SAME70_CAN;
+#endif
return FREQ_PERIPH;
}