Hi,
I have an AM1808 custom board where the USB2.0 port has to work in peripheral mode, but USB0_ID has been grounded instead of been left floating.
I've read that mode can be forced writing the CFGCHIP2, so looking at da850_evm_usb_init(void) function in board-850-evm.c ...
/*
* We have to override VBUS/ID signals when MUSB is configured into the
* host-only mode -- ID pin will float if no cable is connected, so the
* controller won't be able to drive VBUS thinking that it's a B-device.
* Otherwise, we want to use the OTG mode and enable VBUS comparators.
*/
cfgchip2 &= ~CFGCHIP2_OTGMODE;
#ifdef CONFIG_USB_MUSB_HOST
cfgchip2 |= CFGCHIP2_FORCE_HOST;
#else
cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;
#endif
... I've changed the else statement in such a way:
#else
cfgchip2 |= CFGCHIP2_FORCE_DEVICE;
#endif
Is it correct or do I need to set also CFGCHIP2_SESENDEN and CFGCHIP2_VBDTCTEN ?
Do I need to make further changes?
Thanks for your help.
Regards,
Max