From 1d93451981ecf94d78161f8f735a04bf771ebeb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 24 Sep 2021 16:00:55 +0200 Subject: [PATCH] application: disable VBUS sensing --- application.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application.c b/application.c index ba21734..96158e3 100644 --- a/application.c +++ b/application.c @@ -24,6 +24,7 @@ #include // debug utilities #include // design utilities #include // flash utilities +#include // USB definitions /* own libraries */ #include "global.h" // board definitions @@ -379,6 +380,8 @@ void main(void) board_setup(); // setup board uart_setup(); // setup USART (for printing) usb_cdcacm_setup(); // setup USB CDC ACM (for printing) + OTG_FS_GCCFG |= OTG_GCCFG_NOVBUSSENS | OTG_GCCFG_PWRDWN; // disable VBUS sensing + OTG_FS_GCCFG &= ~(OTG_GCCFG_VBUSBSEN | OTG_GCCFG_VBUSASEN); // force USB device mode puts("\nwelcome to the CuVoodoo STM32F4 example firmware\n"); // print welcome message #if DEBUG