码迷,mamicode.com
首页 > 其他好文 > 详细

STM32 USB VBUS 监控

时间:2015-03-13 09:14:40      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:

OTG_FS general core configuration register (OTG_FS_GCCFG)

Bit 21 NOVBUSSENS: VBUS sensing disable option

When this bit is set, VBUS is considered internally to be always at VBUS valid level (5 V).

This option removes the need for a dedicated VBUS pad, and leave this pad free to be used for other purposes such as a shared functionality.

VBUS connection can be remapped on another general purpose input pad and monitored by software.

This option is only suitable for host-only or device-only applications.

0: VBUS sensing available by hardware
1: VBUS sensing not available by hardware.

如果需要使用 VBUS 引脚作为其他功能,NOVBUSSENS = 1

According to the reference manual for the STM32F205, page 945, you want to do the following:

First, you want to disable the VBUS sensing option.

This is done by setting the NOVBUSSENS bit in the OTG_FS_GCCFG register.

In this case VBUS is considered internally to always be at VBUS valid level (5 V),

so you don‘t need to run a trace from the VBUS pin on the USB connector over to the STM32F205 at all.

 

技术分享

技术分享

技术分享

技术分享

 

STM32 USB VBUS 监控

标签:

原文地址:http://www.cnblogs.com/shangdawei/p/4334250.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!