SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
When the USB controller is the A device, ID is Low, and the controller automatically enters host mode when a session starts. When the USB controller is the B device, ID is High, and the controller automatically enters device mode when a session starts. However, software can request that the USB controller become the host by setting the HOSTREQ bit in the USBDEVCTL register. This bit can be set either at the same time as requesting a Session Start by setting the SESSION bit in the USBDEVCTL register or at any time after a session has started. When the USB controller next enters SUSPEND mode and if the HOSTREQ bit remains set, the controller enters host mode and begins host negotiation (as specified in the USB On-The-Go supplement) by causing the PHY to disconnect the pullup resistor on the D+ line, causing the A device to switch to device mode and connect its own pullup resistor. When the USB controller detects this, a Connect interrupt is generated and the RESET bit in the USBPOWER register is set to begin resetting the A device. The USB controller begins this reset sequence automatically to ensure that RESET is started as required within 1 ms of the A device connecting its pullup resistor. The main processor should wait at least 20 ms, then clear the RESET bit and enumerate the A device.
When the USB OTG controller B device has finished using the bus, the USB controller goes into SUSPEND mode by setting the SUSPEND bit in the USBPOWER register. The A device detects this and either terminates the session or reverts to host mode. If the A device is USB OTG controller, it generates a Disconnect interrupt.