Skip to content

Commit 679314a

Browse files
committed
Fix disable VBUS sensing.
1 parent 24d1fd2 commit 679314a

File tree

1 file changed

+5
-0
lines changed
  • ports/stm/supervisor

1 file changed

+5
-0
lines changed

ports/stm/supervisor/usb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ STATIC void init_usb_vbus_sense(void) {
4141
#if (BOARD_NO_VBUS_SENSE)
4242
// Disable VBUS sensing
4343
#ifdef USB_OTG_GCCFG_VBDEN
44+
// Deactivate VBUS Sensing B
4445
USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBDEN;
46+
47+
// B-peripheral session valid override enable
48+
USB_OTG_FS->GOTGCTL |= USB_OTG_GOTGCTL_BVALOEN;
49+
USB_OTG_FS->GOTGCTL |= USB_OTG_GOTGCTL_BVALOVAL;
4550
#else
4651
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS;
4752
USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN;

0 commit comments

Comments
 (0)