summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/main.c b/main.c
index 8fcc9be..89c1e15 100644
--- a/main.c
+++ b/main.c
@@ -25,9 +25,9 @@
int main(void)
{
// enable peripheral clock
- PMC_WPMR = PMC_WPKEY << 8;
- PMC_PCER0 |= (1u << PMC_PID);
- PMC_WPMR = (PMC_WPKEY << 8) | 1u;
+ //PMC_WPMR = PMC_WPKEY << 8;
+ //PMC_PCER0 |= (1u << PMC_PID);
+ //PMC_WPMR = (PMC_WPKEY << 8) | 1u;
// enable port, set to output, disable pull-up
PIO_WPMR = PIO_WPKEY << 8;
@@ -44,3 +44,14 @@ int main(void)
return 0;
}
+
+extern const unsigned int StackTop;
+
+__attribute__ ((section(".vtor")))
+const void* VectorTable[] = {
+ &StackTop, /* CPU will automatically *
+ * set stack its pointer *
+ * to this value */
+
+ main, /* -15: Reset_IRQn */
+};