cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 USB device library - won't recoginize device on reset

marknorton9
Associate II
Posted on November 21, 2012 at 01:46

Hi All,

I am having a problem the STM32F4 USB library labeled version 2.1.0.  If I start the device and then plug in the USB, all is good.  If I have the USB connected and start the device, my PC will not recognize the device.  I created a composite MSC & CDC device.  However, I tried just the supplied MSC and that will also not work.  I am not using the VBus to signal the stack (Port A.9).  Any ideas?
2 REPLIES 2
marknorton9
Associate II
Posted on November 21, 2012 at 13:44

I think I have found the problem or at least a work around.  The 1.5K pullup resistor on the USB_DP pin is always tied to 3.3V in our design.  If I set this pin to an output low after reset and allow the stack to configure the pins then the device is recognized.  I looked at the STM32F40G eval schematic and see that this pullup is enabled through the USB Vbus signal.  I don't see how connecting it in this mannor would be any different since Vbus would have the pullup enabled on reset as well.

harasak
Associate II
Posted on March 03, 2013 at 17:30

Hi Mark,

I am trying to make a composite device MSC + HID. May I ask you how you made your USB composite device? The USB libs (2.1.0) look like prepared only for an implementation of one intereface (class).

//USB Initialization:

  USBD_Init(&USB_OTG_dev,

#ifdef USE_USB_OTG_HS

            USB_OTG_HS_CORE_ID,

#else

            USB_OTG_FS_CORE_ID,

#endif

            &USR_desc,

            &USBD_MSC_cb,   //How can you put here more callbacks than for one class???

            &USR_cb);

Do I have to modify even USB core files where the argument is defined ? How?

Thank you.

Best Regards,

harasak