Skip to content

Commit

Permalink
fix previous problemc
Browse files Browse the repository at this point in the history
  • Loading branch information
TOMASHEVSKIYIVAN committed Sep 26, 2024
1 parent 18ee2e1 commit 71bebeb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 57 deletions.
2 changes: 1 addition & 1 deletion arch/arm/src/stm32h7/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ config STM32H7_HAVE_GPIOF

config STM32H7_HAVE_GPIOG
bool
default y
default n

config STM32H7_HAVE_SPI4
bool
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/src/stm32h7/hardware/stm32h7x3xx_pinmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -728,10 +728,10 @@

/* USB on-the-go full-speed (OTG_FS) */

#define GPIO_OTGFS_DM (GPIO_ALT|GPIO_AF10|GPIO_PUSHPULL|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN11)
#define GPIO_OTGFS_DP (GPIO_ALT|GPIO_AF10|GPIO_PUSHPULL|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN12)
#define GPIO_OTGFS_ID (GPIO_ALT|GPIO_AF10|GPIO_OPENDRAIN|GPIO_PULLUP|GPIO_PORTA|GPIO_PIN10)
#define GPIO_OTGFS_SOF (GPIO_ALT|GPIO_AF10|GPIO_PUSHPULL|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN8)
#define GPIO_OTGFS_DM_0 (GPIO_ALT|GPIO_AF10|GPIO_PUSHPULL|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN11)
#define GPIO_OTGFS_DP_0 (GPIO_ALT|GPIO_AF10|GPIO_PUSHPULL|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN12)
#define GPIO_OTGFS_ID_0 (GPIO_ALT|GPIO_AF10|GPIO_OPENDRAIN|GPIO_PULLUP|GPIO_PORTA|GPIO_PIN10)
#define GPIO_OTGFS_SOF_0 (GPIO_ALT|GPIO_AF10|GPIO_PUSHPULL|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN8)

/* USB on-the-go high-speed (OTG_HS) */

Expand Down
5 changes: 5 additions & 0 deletions boards/arm/stm32h7/weact-stm32h743/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@
#define GPIO_USART1_RX (GPIO_USART1_RX_1 | GPIO_SPEED_100MHz) /* PB15 */
#define GPIO_USART1_TX (GPIO_USART1_TX_1 | GPIO_SPEED_100MHz) /* PB14 */

/* OTGFS */

#define GPIO_OTGFS_DM (GPIO_OTGFS_DM_0|GPIO_SPEED_100MHz) /* PA11 */
#define GPIO_OTGFS_DP (GPIO_OTGFS_DP_0|GPIO_SPEED_100MHz) /* PA12 */
#define GPIO_OTGFS_ID (GPIO_OTGFS_ID_0|GPIO_SPEED_100MHz) /* PA10 */
/****************************************************************************
* Public Data
****************************************************************************/
Expand Down
26 changes: 0 additions & 26 deletions boards/arm/stm32h7/weact-stm32h743/src/stm32_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,32 +117,6 @@ static int usbhost_waiter(int argc, char *argv[])
* Public Functions
****************************************************************************/

/****************************************************************************
* Name: stm32_usbinitialize
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup
* USB-related GPIO pins for the nucleo-144 board.
*
****************************************************************************/

void stm32_usbinitialize(void)
{
/* The OTG FS has an internal soft pull-up.
* No GPIO configuration is required
*/

/* Configure the OTG FS VBUS sensing GPIO,
* Power On, and Overcurrent GPIOs
*/

#ifdef CONFIG_STM32H7_OTGFS
stm32_configgpio(GPIO_OTGFS_VBUS);
stm32_configgpio(GPIO_OTGFS_PWRON);
stm32_configgpio(GPIO_OTGFS_OVER);
#endif
}

/****************************************************************************
* Name: stm32_usbhost_initialize
*
Expand Down
26 changes: 0 additions & 26 deletions boards/arm/stm32h7/weact-stm32h743/src/weact-stm32h743.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@

/* Configuration ************************************************************/

#define HAVE_PROC 0
#define HAVE_USBDEV 1
#define HAVE_USBHOST 1
#define HAVE_USBMONITOR 0
#define HAVE_MTDCONFIG 0
#define HAVE_PROGMEM_CHARDEV 0

/* procfs File System */

Expand Down Expand Up @@ -117,28 +113,6 @@

#define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13)

/* USB OTG FS
*
* PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED)
* PG6 OTG_FS_PowerSwitchOn
* PG7 OTG_FS_Overcurrent
*/

#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz| \
GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9)

#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz| \
GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN6)

#ifdef CONFIG_USBHOST
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_EXTI|GPIO_FLOAT| \
GPIO_SPEED_100MHz|GPIO_PUSHPULL| \
GPIO_PORTG|GPIO_PIN7)
#else
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz| \
GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN7)
#endif

/****************************************************************************
* Public Function Prototypes
****************************************************************************/
Expand Down

0 comments on commit 71bebeb

Please sign in to comment.