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!
USB Device OTG FS
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: USB Device OTG FS
Hi,
Not having those two signals should not be a problem but I never tested the scenario.
Giovanni
Not having those two signals should not be a problem but I never tested the scenario.
Giovanni
Re: USB Device OTG FS
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
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
Ok! thank you!
Would have to modify the HAL interface for this case serial_usb...
Would have to modify the HAL interface for this case serial_usb...
Re: USB Device OTG FS
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!
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
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
But glad to hear that you got it running now
~ Tectu