add fix for stm32l4 (version 3.10a) which generate transfer complete when setup recieved and control out data complete

This commit is contained in:
hathach
2021-11-02 13:52:30 +07:00
parent 4ea8f1441d
commit aa682d7301
5 changed files with 122 additions and 55 deletions

View File

@@ -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;
}
//--------------------------------------------------------------------+