AnsweredAssumed Answered

STM32F4 USB HID Change PID (Product ID) during runtime

Question asked by Mig on Sep 15, 2014
Latest reply on Sep 16, 2014 by Chinzei.Tsuneo

Hi,

Im using the STM32F4 with the STM USB Stack and the demo VB project from http://janaxelson.com/JANAXELSON.COM
Communication is working fine.

Now I want to change the PID on the STM during runtime. Calling the HidD_GetHidGuid() from the PC, 
still shows the old device path name, unless if I detach and attach the USB connector physically.

Is there any possibility:

 - to force the PC to reimport the HID Device Descriptor?
 - generate 'something' in the STM32F4 USB Stack to force the PC to reconnect the USB device?

Optionally I could disconnect from the VBUS, changing the special function of the PortA9 to input 
pin and reassign it to VBUS, but I'm concerned that this could have a side effect, if the time between
disconnect and connect is too short, or either too long.

I would appreciate a software based solution, without modifying the I/O of the MCU.

cheers

Outcomes