aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2015-04-20 14:17:40 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2015-04-20 14:17:40 +0900
commitfc26cf08894e25f1ae1109c530b382d70babaf06 (patch)
tree23e9fdea71ac8c793c02621bf7d7935388ab4e01 /board
parent18b38533f7f16074e986483cc357c310cc533a0f (diff)
parent7c022432d19351dfc9553585ea6614b47fcd0c06 (diff)
Version 0.05release/0.05
Merge branch 'cortex-m0-support'
Diffstat (limited to 'board')
-rw-r--r--board/board-fsm-55.h42
-rw-r--r--board/board-stm32f0-discovery.h47
2 files changed, 89 insertions, 0 deletions
diff --git a/board/board-fsm-55.h b/board/board-fsm-55.h
new file mode 100644
index 0000000..9cb405e
--- /dev/null
+++ b/board/board-fsm-55.h
@@ -0,0 +1,42 @@
+/*
+ * Running at 48MHz with HSI as clock source.
+ *
+ */
+#define MCU_STM32F0 1
+/* __ARM_ARCH_6M__ */
+
+
+#define FLASH_PAGE_SIZE 1024
+
+#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
+#define STM32_PLLMUL_VALUE 12
+#define STM32_HSICLK 8000000
+
+#define GPIO_LED_SET_TO_EMIT 5
+
+/*
+ * Port A setup.
+ * PA5 - ON (LED 1:ON 0:OFF)
+ * PA4 - Pull DOWN
+ */
+#define VAL_GPIO_MODER 0x00145555 /* Output Pin0-7, Pin9 and Pin10 */
+#define VAL_GPIO_OTYPER 0x0000001f /* Open-drain for Pin0-4, Push-Pull*/
+#define VAL_GPIO_OSPEEDR 0x003cffff /* High speed */
+#define VAL_GPIO_PUPDR 0x00000000 /* No pull-up/pull-down */
+
+#define GPIO_LED_BASE GPIOA_BASE
+
+#define RCC_ENR_IOP_EN (RCC_AHBENR_IOPAEN | RCC_AHBENR_IOPFEN)
+#define RCC_RSTR_IOP_RST (RCC_AHBRSTR_IOPARST | RCC_AHBRSTR_IOPFRST)
+
+/* ??? NeuG settings for ADC2 is default (PA0: Analog IN0, PA1: Analog IN1). */
+
+#define GPIO_OTHER_BASE GPIOF_BASE /* USER BUTTON */
+/*
+ * Port F setup.
+ * PF0 - USER Button
+ */
+#define VAL_GPIO_OTHER_MODER 0x00000000 /* Input Pin0 */
+#define VAL_GPIO_OTHER_OTYPER 0x00000000
+#define VAL_GPIO_OTHER_OSPEEDR 0x00000000
+#define VAL_GPIO_OTHER_PUPDR 0x00000001 /* Pull-up Pin0 */
diff --git a/board/board-stm32f0-discovery.h b/board/board-stm32f0-discovery.h
new file mode 100644
index 0000000..15b8b51
--- /dev/null
+++ b/board/board-stm32f0-discovery.h
@@ -0,0 +1,47 @@
+/*
+ * Running at 48MHz with HSI as clock source.
+ *
+ */
+#define MCU_STM32F0 1
+/* __ARM_ARCH_6M__ */
+
+
+#define FLASH_PAGE_SIZE 1024
+
+#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
+#define STM32_PLLMUL_VALUE 12
+#define STM32_HSICLK 8000000
+
+#define GPIO_LED_SET_TO_EMIT 8
+
+/*
+ * Port C setup.
+ * PC9 - LED3 (LED 1:ON 0:OFF)
+ * PC8 - LED4 (LED 1:ON 0:OFF)
+ */
+#define VAL_GPIO_MODER 0x00050000 /* Output Pin9 and Pin8 */
+#define VAL_GPIO_OTYPER 0x00000000 /* Push-Pull */
+#define VAL_GPIO_OSPEEDR 0x000f0000 /* High speed: Pin9 and Pin8 */
+#define VAL_GPIO_PUPDR 0x00000000 /* No pull-up/pull-down */
+
+#define GPIO_LED_BASE GPIOC_BASE
+
+#if 0
+#define RCC_ENR_IOP_EN (RCC_AHBENR_IOPAEN | RCC_AHBENR_IOPCEN)
+#define RCC_RSTR_IOP_RST (RCC_AHBRSTR_IOPARST | RCC_AHBRSTR_IOPCRST)
+#else
+#define RCC_ENR_IOP_EN RCC_AHBENR_IOPCEN
+#define RCC_RSTR_IOP_RST RCC_AHBRSTR_IOPCRST
+#endif
+
+/* ??? NeuG settings for ADC2 is default (PA0: Analog IN0, PA1: Analog IN1). */
+
+#define GPIO_OTHER_BASE GPIOA_BASE /* USER BUTTON */
+/*
+ * Port A setup.
+ * PA0 - USER Button
+ */
+#define VAL_GPIO_OTHER_MODER 0x00000000 /* Input Pin0 */
+#define VAL_GPIO_OTHER_OTYPER 0x00000000 /* Push-Pull */
+#define VAL_GPIO_OTHER_OSPEEDR 0x00000000
+#define VAL_GPIO_OTHER_PUPDR 0x00000000 /* No pull-up/pull-down */