USB hub multiple devices connection issue

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

USB hub multiple devices connection issue

103 Views
Gangapavan
Contributor II

I am using an i.MX RT1060 controller in my project development. I am facing issues with USB hub functionality when multiple devices (MSD — pen drive, and CDC — printer) are connected in the following sequence:

Case 1

A) Printer: Attach event occurred and working fine

B) Flash drive: 

  • No attach event is triggered for the flash drive.

  • When the flash drive is removed, the system hangs inside USB_HostReleaseDeviceResource.

Case 2

A) Flash drive: Connected and working

B) Printer: Attach event occuured, but full interface is not properly completed. It returned error in some port open event call back.

  • When the flash drive is removed, both devices got disconnected.

Case 3

  • Both flash drive and printer inserted: Only the flash drive attach event occurred and working.

  • When the flash drive is removed and reconnected, it works fine.

  • CDC device connection/disconnection generates no event.

  • The only way to recover CDC functionality is to restart the system.

Findings:

When I connect the hub to a PC to verify its functionality, both devices are visible in Device Manager. Based on this, I conclude that the issue lies in the USB driver implementation /Composite device handling for USB on the i.MX RT1060.

Is there a way to handle this issue so that both MSD and CDC devices can be reliably enumerated and managed through the hub?

Regards,

Pavan

#IMXRT1060 #nxp #Microcontroller #USB Hub #USB Composite device handling.

 

Labels (1)
0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2363956%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUSB%20hub%20multiple%20devices%20connection%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2363956%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EI%20am%20using%20an%20i.MX%20RT1060%20controller%20in%20my%20project%20development.%20I%20am%20facing%20issues%20with%20USB%20hub%20functionality%20when%20multiple%20devices%20(MSD%20%E2%80%94%20pen%20drive%2C%20and%20CDC%20%E2%80%94%20printer)%20are%20connected%20in%20the%20following%20sequence%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3ECase%201%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EA)%20Printer%3A%20Attach%20event%20occurred%20and%20working%20fine%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EB)%20Flash%20drive%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3E%3CSPAN%3ENo%20attach%20event%20is%20triggered%20for%20the%20flash%20drive.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CSPAN%3EWhen%20the%20flash%20drive%20is%20removed%2C%20the%20system%20hangs%20inside%20USB_HostReleaseDeviceResource.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3ECase%202%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EA)%20Flash%20drive%3A%20Connected%20and%20working%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EB)%20Printer%3A%20Attach%20event%20occuured%2C%20but%20full%20interface%26nbsp%3Bis%20not%20properly%20completed.%20It%20returned%20error%20in%20some%20port%20open%20event%20call%20back.%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3E%3CSPAN%3EWhen%20the%20flash%20drive%20is%20removed%2C%20both%20devices%20got%20disconnected.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3ECase%203%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3E%3CSPAN%3EBoth%20flash%20drive%20and%20printer%20inserted%3A%20Only%20the%20flash%20drive%20attach%20event%20occurred%20and%20working.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CSPAN%3EWhen%20the%20flash%20drive%20is%20removed%20and%20reconnected%2C%20it%20works%20fine.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CSPAN%3ECDC%20device%20connection%2Fdisconnection%20generates%20no%20event.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CSPAN%3EThe%20only%20way%20to%20recover%20CDC%20functionality%20is%20to%20restart%20the%20system.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%3EFindings%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWhen%20I%20connect%20the%20hub%20to%20a%20PC%20to%20verify%20its%20functionality%2C%20both%20devices%20are%20visible%20in%20Device%20Manager.%20Based%20on%20this%2C%20I%20conclude%20that%20the%20issue%20lies%20in%20the%20USB%20driver%20implementation%20%2FComposite%20device%20handling%20for%20USB%20on%20the%20i.MX%20RT1060.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20a%20way%20to%20handle%20this%20issue%20so%20that%20both%20MSD%20and%20CDC%20devices%20can%20be%20reliably%20enumerated%20and%20managed%20through%20the%20hub%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EPavan%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%23IMXRT1060%20%23nxp%20%23Microcontroller%20%23USB%20Hub%20%23USB%20Composite%20device%20handling.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2363956%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EUSB%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E