Skip to main content
KMats.2
Visitor II
August 9, 2019
Question

VBUS sensing not working at Stop Mode

  • August 9, 2019
  • 1 reply
  • 638 views

I'm used mcu stm32l476vg.

I'll have to low power mode.

It is in low power mode using the following API.

HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI);

But although it is in low power mode, it does not return by USB insertion.

I ask for your help...

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
August 9, 2019

You would need to set up EXTI line 17 and then whatever settings within the OTG module to get the OTG_FS_WKUP signal going. I am not sure what exactly that requires and the documentation is not crystal clear. Maybe there are examples, I did not search.

It's probably much easier to set the pin to which VBUS is connected, as an EXTI interrupt directly, without the involvement of the OTG module. There won't be wakeup upon host-initiated suspend resume (without pulling/inserting the cable), but you didn't say you'd need that.

JW