cancel
Showing results for 
Search instead for 
Did you mean: 

USB-C Key detection

SKham.2
Associate II

Hello,

 

I am working on a Bootloader that reads USB-Key using USB_Host middleware to retrieve files before performing some operations but I have some issues detecting some USB keys.

  • USB 2.0 Keys are all detected
  • USB 3.2 Keys are not well detected

I have examinated USB File descriptors using USB Device Tree Viewer and noticed that:

  • Demanded Current <=500 mA : Detected
  • Demanded Current > 500 mA : Not Detected

Even though, I have measured Ibus and it's never over 120 mA so I assume it's not that.

If I use a USB-C to USB-A adapter to force to use USB 2.0 fallback, it doesn't work either.

 

Then I noticed that in the Device Tree that:

  • Enumerator: SCSI => Not Detected
  • Enumerator: USBSTOR => Detected

 

When I use Debugger, I can see a hard fault coming from USBH_Process :

 
case HOST_CHECK_CLASS:
if (phost->ClassNumber == 0U)
{
USBH_UsrLog("No Class has been registered.");
}
else
{
phost->pActiveClass = NULL;

for (idx = 0U; idx < USBH_MAX_NUM_SUPPORTED_CLASS; idx++)
{
if (phost->pClass[idx]->ClassCode == phost->device.CfgDesc.Itf_Desc[0].bInterfaceClass)
{
phost->pActiveClass = phost->pClass[idx];
break;
}
}

The phost->pClass[idx]->ClassCode is unknown for SCSI USB 3.2 Keys.

When I use USB 2.0 Key, it's ok ClassCode is known.

 

Any idea how to solve this issue?

11 REPLIES 11

Then apologies I can be wrong with this. Haven't checked there for a while.

USBPcap is pure software. It is useful to inspect (almost) normal data flow between host and device. Hardware sniffer can be handy if you suspect electrical or firmware issues, when Windows cannot even detect the device and access it at all.