STM32F205使用官网USB固件库device only mode,硬件没有连接VBUS、ID,只连接了DP、DM,PC检测不到USB,软件中已经注释了VBUS_SENSING_ENABLED,调试查看寄存器中相应位确实被置1了,不知道还有哪里需要设置的?
STM32F2xx参考手册中有如下描述:
The VBUS pin can be freed by disabling the VBUS sensing option. This is done by setting the
NOVBUSSENS bit in the OTG_FS_GCCFG register. In this case the VBUS is considered
internally to be always at VBUS valid level (5 V).
USB固件版本如下:
******************************************************************************
* @file usb_core.c
* @author MCD Application Team
* @version V2.1.0
* @date 19-March-2012
* @brief USB-OTG Core Layer
****************************************************************************** |