STM32 USB VBUS 监控

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.

 

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值