aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2013-05-28 15:36:52 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2013-05-28 15:36:52 +0900
commit5552a9590dc5e91878c882951d1188472f49b58a (patch)
tree7ff09cb528377b498d558941dd68358b9bff5298 /board
parent62d20a323fb38d7788a8093a5a0fba910557647d (diff)
add olimex stm32-h103
Diffstat (limited to 'board')
-rw-r--r--board/board-olimex-stm32-h103.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/board/board-olimex-stm32-h103.h b/board/board-olimex-stm32-h103.h
new file mode 100644
index 0000000..69fdaaa
--- /dev/null
+++ b/board/board-olimex-stm32-h103.h
@@ -0,0 +1,24 @@
+#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
+#define STM32_PLLMUL_VALUE 9
+#define STM32_HSECLK 8000000
+
+#define GPIO_USB_CLEAR_TO_ENABLE 11
+#define GPIO_LED_CLEAR_TO_EMIT 12
+
+/*
+ * PC0 - Digital input with PullUp. AN10 for NeuG
+ * PC1 - Digital input with PullUp. AN11 for NeuG
+ * PC6 - Normal input because there is an external resistor.
+ * PC7 - Normal input because there is an external resistor.
+ * PC11 - Open Drain output (USB disconnect).
+ * PC12 - Push Pull output (LED).
+ */
+#define VAL_GPIO_ODR 0xFFFFFFFF
+#define VAL_GPIO_CRL 0x44888888 /* PC7...PC0 */
+#define VAL_GPIO_CRH 0x88837888 /* PC15...PC8 */
+
+#define GPIO_USB_BASE GPIOC_BASE
+#define GPIO_LED_BASE GPIOC_BASE
+
+#define RCC_APB2ENR_IOP_EN RCC_APB2ENR_IOPCEN
+#define RCC_APB2RSTR_IOP_RST RCC_APB2RSTR_IOPCRST