diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2015-06-29 15:59:30 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2015-06-29 15:59:30 +0900 |
commit | 666572315430ff5e545b32dc9f97fa70a236a6bd (patch) | |
tree | 86ee43c3a2620b2a233bdde0269a473113b6bb8a /board | |
parent | 97b4471cee86b4d7efc23d272db80fb89c7c8ab2 (diff) |
Add support for CQ STARM.
Diffstat (limited to 'board')
-rw-r--r-- | board/board-cq-starm.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/board/board-cq-starm.h b/board/board-cq-starm.h new file mode 100644 index 0000000..980791f --- /dev/null +++ b/board/board-cq-starm.h @@ -0,0 +1,46 @@ +#define FLASH_PAGE_SIZE 1024 + +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HSECLK 8000000 + +#define GPIO_LED_BASE GPIOC_BASE +#define GPIO_LED_SET_TO_EMIT 6 +#undef GPIO_USB_BASE +#undef GPIO_USB_CLEAR_TO_ENABLE +#define GPIO_OTHER_BASE GPIOA_BASE + +/* + * Port A setup. + * PA0 - input with pull-up. AN0 + * PA1 - input with pull-up. AN1 + * PA11 - Push Pull output 10MHz 0 default (until USB enabled) (USBDM) + * PA12 - Push Pull output 10MHz 0 default (until USB enabled) (USBDP) + * ------------------------ Default + * PAx - input with pull-up + */ +#define VAL_GPIO_OTHER_ODR 0xFFFFE7FF +#define VAL_GPIO_OTHER_CRL 0x88888888 /* PA7...PA0 */ +#define VAL_GPIO_OTHER_CRH 0x88811888 /* PA15...PA8 */ + +/* + * Port C setup. + * PC0 - Push Pull output 50MHz. + * PC1 - Push Pull output 50MHz. + * Everything input with pull-up except: + * PC4 - Normal input (ADC_IN14 : VoutY of LIS344ALH). + * PC5 - Normal input (ADC_IN15 : VoutZ of LIS344ALH). + * PC6 - Push Pull output (LED). + * (PC9 - SDCard CD) + * (PC12 - SDCard CS) + * PC14 - Normal input (XTAL). + * PC15 - Normal input (XTAL). + */ +#define VAL_GPIO_LED_CRL 0x83448833 /* PC7...PC0 */ +#define VAL_GPIO_LED_CRH 0x44888888 /* PC15...PC8 */ +#define VAL_GPIO_LED_ODR 0xFFFFFFFF + +#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN|RCC_APB2ENR_IOPCEN) +#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST|RCC_APB2RSTR_IOPCRST) + +/* NeuG settings for ADC2 is default (PA0: Analog IN0, PA1: Analog IN1). */ |