From c95769f13cc3cddf33e0d7e5a51e7b03ae8c09b7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 10 Feb 2013 22:34:13 +0000 Subject: [PATCH] Minor fixes for STM32 F3 USB still does not work git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5637 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/stm32/stm32_usbdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c index dc05a7ebb7..81eeafdbd2 100644 --- a/arch/arm/src/stm32/stm32_usbdev.c +++ b/arch/arm/src/stm32/stm32_usbdev.c @@ -61,6 +61,7 @@ #include "up_arch.h" #include "stm32.h" #include "stm32_syscfg.h" +#include "stm32_gpio.h" #include "stm32_usbdev.h" #if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) @@ -3481,6 +3482,13 @@ void up_usbinitialize(void) usbtrace(TRACE_DEVINIT, 0); stm32_checksetup(); + /* Configure USB GPIO alternate function pins */ + +#ifdef CONFIG_STM32_STM32F30XX + (void)stm32_configgpio(GPIO_USB_DM); + (void)stm32_configgpio(GPIO_USB_DP); +#endif + /* Power up the USB controller, but leave it in the reset state */ stm32_hwsetup(priv);