在#include "usb_conf.h"头文件中
官方例程中忽视OTGFS_VBUS PA9版本问题,会造成插入USB,PC设备无反应
/**
* @brief usb sof output enable
*/
/* #define USB_SOF_OUTPUT_ENABLE */
/**
* @brief ignore vbus detection, only available in at32f415xx revision C.
* at32f415xx revision B: (not support)
* the vbus detection pin (pa9) can not be used for other functionality.
* vbus pin must kept at VBUS or VDD.
*
* at32f415xx revision C: (support)
* ignore vbus detection, the internal vbus is always valid.
* the vbus pin (pa9) can be used for other functionality.
*/
/* #define USB_VBUS_IGNORE */
官方例程中是AT32F415RCT7的C系列有忽视OTGFS_VBUS PA9功能但却注释掉了
芯片AT32F415RBT7应该是无忽视OTGFS_VBUS PA9功能,不能作为普通 I/O 使用,应该属于B系列吧,但只有
#define USB_VBUS_IGNORE 才有设备反应
注释说明错了?