cancel
Showing results for 
Search instead for 
Did you mean: 

USBX, Detect cable disconnected.

Henrik76
Associate

I am running the "Ux_Device_HID_CDC_ACM" example project on a NUCLEO-H563ZI board.

The example runs without issues, i can attach and remove the usb cable and the mouse connection appears and disappear.

The issue is that the USB-stack does not seem to detect that the usb-cable is removed. When I hit the button to move the mouse pointer when the cable is removed the mouse movements que up in the stack and when i attach the cable again the mouse pointer moves the queued movements. This also happen in VCP part of the example. Messages queue up and are transmitted when the cable is attached again.

This is not ok. My real system needs to know when the cable is removed so that actions do not queue up in the stack.

The actual cable disconnection is not the problem, i can think of several ways to detect this. 

 

The question:

How do I bring down the USB stack in a proper way so that messages are not queued up in the stack?

 

0 REPLIES 0