Page 1 of 1

USB Device OTG FS

Posted: Tue Apr 09, 2013 1:59 pm
by chelox
Hello!

I'm testing a board similar to Olimex STM32-E407, the difference is that it has a single USB_OTG.
This is connected to PA11/OTG_FS_DM and PA12/OTG_FS_DP.

I run the demos ARMCM4-STM32F407-lwIP-FATFS-USB and doing well!
What does not work is in USB_OTG1 serial_usb.

Viewing hardware note that this board is not connected in USB_OTG1: PA9/OTG_FS_VBUS and PA10/OTG_FS_ID.

Could this be the problem? Or having a single USB_OTG need not PA9/OTG_FS_VBUS and P10/OTG_FS_ID are connected?

Thank you!

Re: USB Device OTG FS

Posted: Tue Apr 09, 2013 2:30 pm
by Giovanni
Hi,

Not having those two signals should not be a problem but I never tested the scenario.

Giovanni

Re: USB Device OTG FS

Posted: Tue Apr 09, 2013 2:42 pm
by Tectu
You don't need the ID pin as long as you're only in device mode. Simply keep it N/C.
Since you're now in device mode, your MCU does detect for a "connected"-event by checking the VBUS pin. Therefore, you need to connect this - or keep it high all the time, but I don't know how to handle the software in that case then.


~ Tectu

Re: USB Device OTG FS

Posted: Tue Apr 09, 2013 4:30 pm
by chelox
Ok! thank you!

Would have to modify the HAL interface for this case serial_usb...

Re: USB Device OTG FS

Posted: Tue Apr 09, 2013 10:51 pm
by chelox
Well! It worked!
Add the flag GCCFG_NOVBUSSENS in the file usb_lld.c

/* Internal FS PHY activation.*/
otgp->GCCFG = GCCFG_VBUSASEN | GCCFG_VBUSBSEN | GCCFG_PWRDWN | GCCFG_NOVBUSSENS;

Thanks!

Re: USB Device OTG FS

Posted: Wed Apr 10, 2013 6:08 am
by Tectu
Oh yes, I knew the NOVBUSSENSE flag but I completely forgot to mention it. I'm sorry!
But glad to hear that you got it running now :)


~ Tectu