From e1e2af64f7096fecc1ca9cee407d1e23bd99b52e Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Wed, 4 May 2016 13:42:03 +0000 Subject: Improved STM32 Nucleo64 board files git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9410 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/boards/ST_NUCLEO64_F103RB/board.h | 34 ++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'os/hal/boards/ST_NUCLEO64_F103RB/board.h') diff --git a/os/hal/boards/ST_NUCLEO64_F103RB/board.h b/os/hal/boards/ST_NUCLEO64_F103RB/board.h index 576ac28f1..4446fa678 100644 --- a/os/hal/boards/ST_NUCLEO64_F103RB/board.h +++ b/os/hal/boards/ST_NUCLEO64_F103RB/board.h @@ -52,12 +52,15 @@ * IO pins assignments. */ #define GPIOA_ARD_A0 0U +#define GPIOA_ADC1_IN0 0U #define GPIOA_ARD_A1 1U +#define GPIOA_ADC1_IN1 1U #define GPIOA_ARD_D1 2U -#define GPIOA_USART_TX 2U +#define GPIOA_USART2_TX 2U #define GPIOA_ARD_D0 3U -#define GPIOA_USART_RX 3U +#define GPIOA_USART2_RX 3U #define GPIOA_ARD_A2 4U +#define GPIOA_ADC1_IN4 4U #define GPIOA_LED_GREEN 5U #define GPIOA_ARD_D13 5U #define GPIOA_ARD_D12 6U @@ -72,6 +75,7 @@ #define GPIOA_PIN15 15U #define GPIOB_ARD_A3 0U +#define GPIOB_ADC1_IN8 0U #define GPIOB_PIN1 1U #define GPIOB_PIN2 2U #define GPIOB_SWO 3U @@ -81,9 +85,9 @@ #define GPIOB_ARD_D10 6U #define GPIOB_PIN7 7U #define GPIOB_ARD_D15 8U -#define GPIOB_ARD_A5_ALT 8U +#define GPIOB_I2C1_SCL 8U #define GPIOB_ARD_D14 9U -#define GPIOB_ARD_A4_ALT 9U +#define GPIOB_I2C1_SDA 9U #define GPIOB_ARD_D6 10U #define GPIOB_PIN11 11U #define GPIOB_PIN12 12U @@ -92,7 +96,9 @@ #define GPIOB_PIN15 15U #define GPIOC_ARD_A5 0U +#define GPIOC_ADC1_IN11 0U #define GPIOC_ARD_A4 1U +#define GPIOC_ADC1_IN10 1U #define GPIOC_PIN2 2U #define GPIOC_PIN3 3U #define GPIOC_PIN4 4U @@ -187,31 +193,39 @@ /* * Port A setup. * Everything input with pull-up except: - * PA2 - Alternate output (GPIOA_USART_TX). - * PA3 - Normal input (GPIOA_USART_RX). + * PA0 - Analog input (GPIOA_ARD_A0, GPIOA_ADC1_IN0). + * PA1 - Analog input (GPIOA_ARD_A1, GPIOA_ADC1_IN1). + * PA2 - Alternate output (GPIOA_ARD_D1, GPIOA_USART2_TX). + * PA3 - Normal input (GPIOA_ARD_D0, GPIOA_USART2_RX). + * PA4 - Analog input (GPIOA_ARD_A2, GPIOA_ADC1_IN4). * PA5 - Push Pull output (GPIOA_LED_GREEN). * PA13 - Pull-up input (GPIOA_SWDIO). * PA14 - Pull-down input (GPIOA_SWCLK). */ -#define VAL_GPIOACRL 0x88384B88 /* PA7...PA0 */ +#define VAL_GPIOACRL 0x88304B00 /* PA7...PA0 */ #define VAL_GPIOACRH 0x88888888 /* PA15...PA8 */ #define VAL_GPIOAODR 0xFFFFBFDF /* * Port B setup. * Everything input with pull-up except: + * PB0 - Analog input (GPIOA_ARD_A3, GPIOB_ADC1_IN8). * PB3 - Pull-up input (GPIOA_SWO). + * PB8 - Alternate output (GPIOB_ARD_D15, GPIOB_I2C1_SCL). + * PB9 - Alternate output (GPIOB_ARD_D14, GPIOB_I2C1_SDA). */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */ +#define VAL_GPIOBCRL 0x88888880 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x888888BB /* PB15...PB8 */ #define VAL_GPIOBODR 0xFFFFFFFF /* * Port C setup. * Everything input with pull-up except: + * PC0 - Analog input (GPIOA_ARD_A5, GPIOC_ADC1_IN11). + * PC1 - Analog input (GPIOA_ARD_A4, GPIOC_ADC1_IN10). * PC13 - Normal input (GPIOC_BUTTON). */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRL 0x88888800 /* PC7...PC0 */ #define VAL_GPIOCCRH 0x88488888 /* PC15...PC8 */ #define VAL_GPIOCODR 0xFFFFFFFF -- cgit v1.2.3