AnsweredAssumed Answered

USB reconnect problems on K26

Question asked by Anders Esbensen on Jan 16, 2017
Latest reply on Jul 6, 2018 by Jeff Simons


on our custom K26 board we are experiencing an issue when trying to reconnect USB after initial connect.

Board is self powered, but the USB part’s are power via VREGIN connected to VBUS.


Software is based on KSDK 2.0


On all boards the initial USB enumeration works, but on some boards if we disconnect and reconnect usb. The enumeration procedure fails when the host request the device descriptor.


We detect the present of the USB cable with a GPIO interrupt, and USB stack is initialized/deinitialized based on the state of this pin.


The issue can be fixed by constantly powering the VREGIN from a local source, but we would like to avoid this in order to save power when USB is not connected.


Investigations so far could indicate the USBHS controller or PHY is not in a valid state at the second connect attempt.  If I manually deinitializes the USB stack prior to disconnecting the USB scale it also works perfectly. Also if deinitialize and initialize the stack with the USB cable plugged in it works as expected.


I have tried resetting the PHY and controller before reinitialization of the USB stack after VBUS has become present again, but this does not seem to make any difference.


I have not had a chance to put on a USB analyzer yet, but I can see that the stack recognizes the reset and GetDeviceDescriptor, but it looks like that the TX part of the USB isn’t working proberly since the host issues new reset shortly after.


Any suggestion are welcome.