summaryrefslogtreecommitdiff
path: root/cpu/at32ap
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/at32ap')
-rw-r--r--cpu/at32ap/at32ap700x/sm.h2
-rw-r--r--cpu/at32ap/cpu.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/cpu/at32ap/at32ap700x/sm.h b/cpu/at32ap/at32ap700x/sm.h
index 6492c8e81d..b6e4409b22 100644
--- a/cpu/at32ap/at32ap700x/sm.h
+++ b/cpu/at32ap/at32ap700x/sm.h
@@ -21,7 +21,7 @@
#define SM_PM_IMR 0x0048
#define SM_PM_ISR 0x004c
#define SM_PM_ICR 0x0050
-#define SM_PM_GCCTRL 0x0060
+#define SM_PM_GCCTRL(x) (0x0060 + 4 * x)
#define SM_RTC_CTRL 0x0080
#define SM_RTC_VAL 0x0084
#define SM_RTC_TOP 0x0088
diff --git a/cpu/at32ap/cpu.c b/cpu/at32ap/cpu.c
index 0ba836180e..1a1370289d 100644
--- a/cpu/at32ap/cpu.c
+++ b/cpu/at32ap/cpu.c
@@ -65,6 +65,9 @@ int cpu_init(void)
sysreg_write(EVBA, (unsigned long)&_evba);
asm volatile("csrf %0" : : "i"(SYSREG_EM_OFFSET));
+ if(gclk_init)
+ gclk_init();
+
return 0;
}