From fff1d5bfffaa4328801b6d571ddcd34524361a79 Mon Sep 17 00:00:00 2001 From: Sebastian 'Swift Geek' Grzywna Date: Sun, 15 Jan 2023 08:41:40 +0100 Subject: [PATCH] bluepill: fix re-enumeration --- boards/stm32-bluepill.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boards/stm32-bluepill.h b/boards/stm32-bluepill.h index a7f563f..27813f8 100644 --- a/boards/stm32-bluepill.h +++ b/boards/stm32-bluepill.h @@ -20,10 +20,15 @@ #define BOARD_PIN_LED GPIO13 #define BOARD_LED_HIGH_IS_BUSY true +/* + * Pull USB D+ low on startup, to re-enumerate. + * Bluepill board lacks dedicated pin for handling this pull-up. + * https://stm32world.com/wiki/STM32_USB_Device_Renumeration + */ #define BOARD_RCC_USB_PULLUP RCC_GPIOA #define BOARD_PORT_USB_PULLUP GPIOA #define BOARD_PIN_USB_PULLUP GPIO12 -#define BOARD_USB_HIGH_IS_PULLUP true +#define BOARD_USB_HIGH_IS_PULLUP false /* Currently you can only use SPI1, since it has highest clock. */