USB device unplug identification?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB device unplug identification?

560 Views
vanajagujjala
Contributor III

Hello,

     I am using USB CDC class with MK20DX128VLH5, I am trying to identify the USB unplugging from the USB host device(PC),But i can't recognize it.Please any one help me how to identify USB unplugging from USB host device(PC) in the CDC class code.

Thanks,

vanaja.

0 Kudos
2 Replies

436 Views
mjbcswitzerland
Specialist V

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)

0 Kudos

436 Views
vanajagujjala
Contributor III

Hi Mark

Thanks for your reply,

I will check it and get back to you,if any.

Thanks,

vanaja.

On Fri, Oct 30, 2015 at 7:37 PM, mjbcswitzerland <

0 Kudos