Skip to main content
David.Cheng
Associate III
November 27, 2019
Question

STM32 USB connect recognition

  • November 27, 2019
  • 2 replies
  • 512 views

how to know it is a usb charger or PC connect to the stm32 USB device mass storage?​

This topic has been closed for replies.

2 replies

Pavel A.
November 27, 2019

If it enumerates the device, it is a PC.

Else, to further detect the kind of charger, google for "USB charger detection". ST has a chip for this.

-- pa

David.Cheng
Associate III
December 2, 2019

>>If it enumerates the device, it is a PC.

means that i need to check the enumerates flag in stm32 usb driver?