From 8e13152b6f1cf62a58d98b7340b1e5457204e6ea Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 4 Aug 2013 23:19:37 +0000 Subject: enabled USB, fixed missing PortF and PortG init git-svn-id: https://svn.spreadspace.org/mur.sat@826 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/mpu/board/board.c | 2 ++ software/mpu/board/board.h | 16 ++++++++++++++++ software/mpu/halconf.h | 4 ++-- software/mpu/mcuconf.h | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) (limited to 'software/mpu') diff --git a/software/mpu/board/board.c b/software/mpu/board/board.c index b5aa8ff..c1a077e 100644 --- a/software/mpu/board/board.c +++ b/software/mpu/board/board.c @@ -30,6 +30,8 @@ const PALConfig pal_default_config = {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, + {VAL_GPIOFODR, VAL_GPIOFCRL, VAL_GPIOFCRH}, + {VAL_GPIOGODR, VAL_GPIOGCRL, VAL_GPIOGCRH} }; #endif diff --git a/software/mpu/board/board.h b/software/mpu/board/board.h index bcb8319..19b4fa7 100644 --- a/software/mpu/board/board.h +++ b/software/mpu/board/board.h @@ -116,6 +116,22 @@ #define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ #define VAL_GPIOEODR 0xFFFFFFFF +/* + * Port F setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOFCRL 0x88888888 /* PF7...PF0 */ +#define VAL_GPIOFCRH 0x88888888 /* PF15...PF8 */ +#define VAL_GPIOFODR 0xFFFFFFFF + +/* + * Port G setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOGCRL 0x88888888 /* PG7...PG0 */ +#define VAL_GPIOGCRH 0x88888888 /* PG15...PG8 */ +#define VAL_GPIOGODR 0xFFFFFFFF + /* * USB bus activation macro, required by the USB driver. */ diff --git a/software/mpu/halconf.h b/software/mpu/halconf.h index 027657e..f41266a 100644 --- a/software/mpu/halconf.h +++ b/software/mpu/halconf.h @@ -132,7 +132,7 @@ * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE +#define HAL_USE_SERIAL_USB TRUE #endif /** @@ -153,7 +153,7 @@ * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB FALSE +#define HAL_USE_USB TRUE #endif /*===========================================================================*/ diff --git a/software/mpu/mcuconf.h b/software/mpu/mcuconf.h index d2eef5b..1d65b27 100644 --- a/software/mpu/mcuconf.h +++ b/software/mpu/mcuconf.h @@ -192,7 +192,7 @@ /* * USB driver system settings. */ -#define STM32_USB_USE_USB1 FALSE +#define STM32_USB_USE_USB1 TRUE #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE #define STM32_USB_USB1_HP_IRQ_PRIORITY 13 #define STM32_USB_USB1_LP_IRQ_PRIORITY 14 -- cgit v1.2.3