diff --git a/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c b/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c index 4754352..33fa7e0 100644 --- a/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c +++ b/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c @@ -1027,7 +1027,7 @@ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd) #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->SuspendCallback(hpcd); #else - HAL_PCD_SuspendCallback(hpcd); + //HAL_PCD_SuspendCallback(hpcd); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } __HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_USBSUSP); diff --git a/README.md b/README.md index 06ba6b8..62f7b7f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # NaviKit_stm32 导航套件源码,STM32F107VCT6,开发环境STM32CubeIDE + +# Note + 在使用usb的时候, + `stm32f1xx_hal_pcd.c文件内` + `void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)函数内` + `HAL_PCD_SuspendCallback(hpcd) 代码段` 务必屏蔽,否则导致枚举失败,提示获取设备描述符失败。 \ No newline at end of file