Hi,
1. Is it possible to read the I/O explander and decide, thus bypassing the method used in the BSP
TS: Yes, it is possbile. RT1060 SDK software package provied <usb_pin_detect_hid_mouse> demo, which using OTG ID status to decide USB working as host or device.
Related code is below:
/*!
* @brief get USB id pin status
*/
uint8_t USB_GetIdPinStatus(void)
{
return ((ehciRegisterBase->OTGSC & USBHS_OTGSC_ID_MASK) >> USBHS_OTGSC_ID_SHIFT);
}
So, replace related code with GPIO pad voltage check.
2. If so, what sort of software effort is involved? Would be hours, days, weeks? How easy would it be to track down and what sort of risks are involved?
TS: We have similar application to use GPIO to replace ID pin with Kinetis device. There should be ok and no issue reported from customers. Related GPIO pin should enable interrupt to let chip know USB ID status changed in time.
3. Are we much better off up issuing the board by sticking an I/O expander on the 1062 to free up the actual ID pin and connect it up properly?
TS: Customer can let actual ID pin floating.
best regards,
Mike