Hi
When the cable is removed the device will detect a USB suspend state (>3ms idle line- (low speed D+ = 0, D- = 1 / high speed D+ = 1, D- = 0)).
See the SLEEP flag in the INT_STAT register.
Therefore the suspend interrupt can be used to detect this.
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
For the complete "out-of-the-box" Kinetis experience and faster time to market
:smileyinfo: Out-of-the-box support for 46 Kinetis boards and 10 IDEs (460 combinations from a single code source with no porting required)