cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of connection when using USB OTG device (HS in Full Speed mode)

Thomas_Socomec
Associate II
Posted on April 18, 2013 at 14:13

Hello everybody,

I have a board with stm32f207 and I use GPIO_AF_OTG2_FS as USB device connection, and I have sometime a strange problem when I plug the USB cable.

When I plug the cable, all is working correctly and I go into all steps of USB detection (reset, enumeration, addressing, ...).

After that, if I unplug and re-plug the cable, the connection is sometime not recognize by the PC.

I made some diagnostic and in this case some interrupts occur (sessreqintr, usbreset, enumdone), but the process stop here and I never go into addressed state.

If fact, the configuration of the USB stack from ST is not really clear about the defines. So my configuration is :

- GPIO (portB : 12, 13, 14, 15) as alternate function GPIO_AF_OTG2_FS (excepted VBUS which is on input mode)

- interrupt : BSP_PERIPH_ID_OTG_HS and BSP_INT_ID_OTG_HS

- usb_conf.h : USE_USB_OTG_FS + USB_OTG_FS_CORE + VBUS_SENSING_ENABLED

- core : USB_OTG_HS_CORE_ID

Is there anybody with a good idea to help me?

Thanks.

Thomas
2 REPLIES 2
Thomas_Socomec
Associate II
Posted on April 19, 2013 at 08:53

Nobody have an idea about this problem ?

I don't know if this problem comes from my board or from my computer.

Maybe the computer does not send the addressing command ? Is that possible ?

I have added a callback when the ''disconnect'' interrupt occurs (througth the VBus pin) to reset completely the USB pins (DP, DM, ID switched to inputs). The behavior is quite better but it remains sometimes the addressing command is not received (no ''endpoint out'' interrupt occurs after the ''enumaration done'' interrupt).

gordon239955_st
Associate II
Posted on September 30, 2014 at 09:36

This is long,

long

after the question, but I think PB13 should also be set to alternate function for the USB.  I can't say whether that would affect the symptom as I'm not using VBUS sensing.

There is something odd about PB13, because even when set as a GPIO, the VBUS_SENSING affects the pin, holding it low.