cancel
Showing results for 
Search instead for 
Did you mean: 

re-enumerate USB on STM32F103

Treacy Yao
Associate II

CDC function run normally. But if MCU reboot(For example, USB connect to PC and reboot MCU), USB will not recongnized. It will return to normal if I remove USB then insert it again.

So I want to add re-enumerate function to let device re-enumerate though USB always in PC.

  1. How to modify the code to realize re-enumerate function?
  2. I try to set PA12 low to high before USB init. Device cannot run. Maybe blocking
1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal II

If you want a work-around that is not standard compliant, switch PA12 to GPIO/Open Drain, set it low for about 10 ms, and than set up USB. This works for Bl*ckm*gic debug probes.

View solution in original post

3 REPLIES 3
Uwe Bonnes
Principal II

If you want a work-around that is not standard compliant, switch PA12 to GPIO/Open Drain, set it low for about 10 ms, and than set up USB. This works for Bl*ckm*gic debug probes.

I tried. But if I add low PA12 to my code(MX_GPIO_Init). Then my FW cannot run. I don't know why

> Then my FW cannot run.

What does it mean? Debug. Find out, what does it exactly do.

JW