修正usb枚举失败的问题
parent
e467982901
commit
0196c26ad3
|
@ -1027,7 +1027,7 @@ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)
|
||||||
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
|
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
|
||||||
hpcd->SuspendCallback(hpcd);
|
hpcd->SuspendCallback(hpcd);
|
||||||
#else
|
#else
|
||||||
HAL_PCD_SuspendCallback(hpcd);
|
//HAL_PCD_SuspendCallback(hpcd);
|
||||||
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
|
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
|
||||||
}
|
}
|
||||||
__HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_USBSUSP);
|
__HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_USBSUSP);
|
||||||
|
|
|
@ -1,2 +1,8 @@
|
||||||
# NaviKit_stm32
|
# NaviKit_stm32
|
||||||
导航套件源码,STM32F107VCT6,开发环境STM32CubeIDE
|
导航套件源码,STM32F107VCT6,开发环境STM32CubeIDE
|
||||||
|
|
||||||
|
# Note
|
||||||
|
在使用usb的时候,
|
||||||
|
`stm32f1xx_hal_pcd.c文件内`
|
||||||
|
`void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)函数内`
|
||||||
|
`HAL_PCD_SuspendCallback(hpcd) 代码段` 务必屏蔽,否则导致枚举失败,提示获取设备描述符失败。
|
Loading…
Reference in New Issue