summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-06-22 22:30:14 +0800
committersakumisu <[email protected]>2022-06-22 22:30:14 +0800
commit7f011f2706a22f446f2db643e8ff7c3645ff0058 (patch)
treec14749b34ba48d9e9505125fb620f3b8af229482
parent859c2ee6aec5255d5b226a57a7123f1e7dd1233c (diff)
disable battery
-rw-r--r--port/dwc2/usb_hc_dwc2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c
index fe96ba6a..d25c01c8 100644
--- a/port/dwc2/usb_hc_dwc2.c
+++ b/port/dwc2/usb_hc_dwc2.c
@@ -603,6 +603,8 @@ int usb_hc_hw_init(void)
defined(STM32F7) || defined(STM32H7)
/* Disable HW VBUS sensing */
USB_OTG_GLB->GCCFG &= ~(USB_OTG_GCCFG_VBDEN);
+ /* Disable Battery chargin detector */
+ USB_OTG_GLB->GCCFG &= ~(USB_OTG_GCCFG_BCDEN);
#else
/*
* Disable HW VBUS sensing. VBUS is internally considered to be always