2025-04-30 2:19 AM - edited 2025-04-30 2:42 AM
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.
I have examinated USB File descriptors using USB Device Tree Viewer and noticed that:
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:
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?
2025-04-30 2:35 AM
Welcome to the forum.
Please see How to write your question to maximize your chances to find a solution; in particular How to insert source code.
What MCU are you using, and what hardware?
2025-04-30 2:44 AM
MCU is stm32h750 and I am working on a proprietary Touch Screen.
I assume Hardware is not an issue though as I can detect USB 2.0 Keys and some USB 3.2 Keys.