From: Joey Castillo Date: Sun, 27 Jul 2025 15:30:49 +0000 (-0400) Subject: add delay before sampling VBUS_DET X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=991a4a1dc57a785c7d350049587c5dfa46e5efb0;p=sensor-watch.git add delay before sampling VBUS_DET --- diff --git a/movement.c b/movement.c index 8e2c503..b3a59e8 100644 --- a/movement.c +++ b/movement.c @@ -609,6 +609,7 @@ void app_init(void) { // check if we are plugged into USB power. HAL_GPIO_VBUS_DET_in(); HAL_GPIO_VBUS_DET_pulldown(); + delay_ms(10); if (HAL_GPIO_VBUS_DET_read()){ /// if so, enable USB functionality. _watch_enable_usb();