We're using a K60 with our own HW, but it applies to TOWER boards as well. We are working as a device only, and the computer is the host, with a CDC driver.
How to detect that a USB cable has been connected to the device? The other side can either be a computer or a charger. With a computer on the other end it's fairly simple - there are various interrupts and messages sent to the USB stack which we can use.
But when connecting to a USB charger (a simple power supply with a USB jack) we only see a SLEEP interrupt and no message (which is to be expected). From the description of the SLEEP interrupt (in USB0_ISTAT) it doesn't look like it's the correct way to identify USB connection.
Is there some other interrupt/register that can tell us only that the USB cable is connected to something?