After discussing this topic with XMOS support (support ticket #10759) I've been forwarded back to the forum. I learned so far that XMOS does
not support OTG. Therefore statement in the datasheet (
XE216-512-TQ128-Datasheet_1.14.pdf, pg. 20): "Different wiring is required for USB-host and USB-OTG." looks to me more as a disclaimer for public and/or reminder for XMOS team that more work is needed here. It is not clear to me what was the purpose of mentioning OTG at all: saying that different wiring is required for something that does not exist (not supported) makes no sense. OTG is mentioned in table on pg. 9, too where USB_ID pin is listed. That pin is marked there as
I/O what is also confusing to me (I believed that is only
input pin connected to GND or left unconnected).
Also according to information received from XMOS support USB-host mode (from above mentioned statement) is supported to some extent only for iOS audio. But, on the
Github are available examples for communication with USB mouse and keyboard that is as far as I understand an example of MCU acting as
host not device. My interest for OTG and USB-host mode was initiated by that repository on which I built my wishful thinking about making USB port OTG capable for flexible communication with PC as a host or that MCU can accept USB memory drive (
USB MSD). XMOS support told me that MSD class of device is not on the roadmap, but hopefully I'll manage to add it by following USB specification and code available for MCUs from other vendors/architectures.
In summary the OTG is not supported and USB_ID is not supported, not functional or not documented pin that should leave unconnected. For the moment only one question remain unanswered to me: when MCU is going to act as USB-host does I need to take care about "handshaking" pull-downs (15K) externally (e.g. by adding come extra wiring) or that is accomplished internally that I'd like to believe that is the case?