From b9d93f2cadc102c79d5da9ef35e71ccc4546c0cf Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Thu, 11 Aug 2016 07:17:11 -1000 Subject: [PATCH] OTG_FS_ID that is on PA10 is managed by stm32 otg fs device Driver N.B The driver set FDMOD, Force device mode and Writing a 1 to this bit forces the core to device mode irrespective of the OTG_FS_ID input pin. --- src/drivers/boards/tap-v1/board_config.h | 5 ++--- src/drivers/boards/tap-v1/tap_usb.c | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/drivers/boards/tap-v1/board_config.h b/src/drivers/boards/tap-v1/board_config.h index 14ff7f5a4f..1aeb167606 100644 --- a/src/drivers/boards/tap-v1/board_config.h +++ b/src/drivers/boards/tap-v1/board_config.h @@ -203,10 +203,9 @@ __BEGIN_DECLS /* USB OTG FS * - * PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED) + * PA9 OTG_FS_VBUS VBUS sensing */ -#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9) -#define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN10) +#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN9) #define RC_SERIAL_PORT "/dev/ttyS5" #define INVERT_RC_INPUT(_s) while(0) diff --git a/src/drivers/boards/tap-v1/tap_usb.c b/src/drivers/boards/tap-v1/tap_usb.c index 64c003afea..4c9f96007d 100644 --- a/src/drivers/boards/tap-v1/tap_usb.c +++ b/src/drivers/boards/tap-v1/tap_usb.c @@ -80,11 +80,10 @@ __EXPORT void stm32_usbinitialize(void) { /* The OTG FS has an internal soft pull-up */ - /* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */ + /* Configure the OTG FS VBUS sensing GPIO */ #ifdef CONFIG_STM32_OTGFS px4_arch_configgpio(GPIO_OTGFS_VBUS); - px4_arch_configgpio(GPIO_OTGFS_OVER); #endif }