summaryrefslogtreecommitdiff
path: root/resources/gdb/at91sam9xe-ek-sram.gdb
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-24 09:39:28 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-24 09:39:28 +0200
commit98f9d442b44dbe2e3e4b3c8296be7e78d5d05450 (patch)
treee9d0a9c86ce3645926c3206f83026deff142af25 /resources/gdb/at91sam9xe-ek-sram.gdb
initial import of the usb ccid example for the sam7s
Diffstat (limited to 'resources/gdb/at91sam9xe-ek-sram.gdb')
-rw-r--r--resources/gdb/at91sam9xe-ek-sram.gdb26
1 files changed, 26 insertions, 0 deletions
diff --git a/resources/gdb/at91sam9xe-ek-sram.gdb b/resources/gdb/at91sam9xe-ek-sram.gdb
new file mode 100644
index 0000000..24fadd0
--- /dev/null
+++ b/resources/gdb/at91sam9xe-ek-sram.gdb
@@ -0,0 +1,26 @@
+# MCK initialization script for the AT91SAM9XE
+#------------------------------------------------
+# Configure master clock
+echo Configuring the master clock...\n
+# Enable main oscillator
+set *0xFFFFFC20 = 0x00004001
+while ((*0xFFFFFC68 & 0x1) == 0)
+end
+
+# Set PLLA to 200MHz
+set *0xFFFFFC28 = 0x2060BF09
+while ((*0xFFFFFC68 & 0x2) == 0)
+end
+
+# Select prescaler
+set *0xFFFFFC30 = 0x00000100
+while ((*0xFFFFFC68 & 0x8) == 0)
+end
+
+# Select master clock
+set *0xFFFFFC30 = 0x00000102
+while ((*0xFFFFFC68 & 0x8) == 0)
+end
+
+echo Master clock ok.\n
+
personal git repositories of Harald Welte. Your mileage may vary