add fix for stm32l4 (version 3.10a) which generate transfer complete when setup recieved and control out data complete
This commit is contained in:
@@ -186,8 +186,12 @@ void board_init(void)
|
||||
/* Enable USB FS Clock */
|
||||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
||||
|
||||
// Enable VBUS sense (B device) via pin PA9
|
||||
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN;
|
||||
// // Enable VBUS sense (B device) via pin PA9
|
||||
// USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN;
|
||||
|
||||
// L476Disco use general GPIO PC11 for VBUS sensing instead of dedicated PA9 as others
|
||||
// Disable VBUS Sense and force device mode
|
||||
USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBDEN;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user