We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm moving an application that runs on a K20 processor (Teensy 3.2) to a Cortex M7 (Teensy 4.0). On the K20 I was able to use the LINESTATESTABLE field in the OTGSTAT register to reliably tell via software if the device was connected to a windows PC. How can I tell if the usb cable is connected to a windows pc or not. So far I've tried the following, none of which changed state when the USB cable was unplugged:
USBPHY_STATUS OTGID_STATUS (bit 8) and DEVPLUGIN_STATUS (bit 6)
USB1_OTGSC bits 8-10 related to Vbus,
USB1_USBSTS PCI bit 2 port change detect
What field can I test to see if there is a USB connection or not? At over 3500 pages, the i.MX RT1060 Processor Reference Manual probably holds the answer, I can't seem to find it. Any help would be greatly appreciated