Hello I have a TM4C129ENCPDT processor running TIRTOS 2.1.1.71b
The processor is connected to two USB modems through a HUB.
Most of the time it works fine, but sometimes I find it just freezes in processing USBDescGetInterface.
When it does this it is because the descriptor length is 0 and as such the loop never exits
while(ui32TotLength < ui32Size)
{
//
// Does this descriptor match the type passed (if a specific type
// has been specified)?
//
if((ui32Type == USB_DESC_ANY) ||
(psDescCheck->bDescriptorType == (uint8_t)(ui32Type & 0xFF)))
{
//
// We found a matching descriptor. If our count matches the
// supplied index, we are done so return the pointer.
//
if(ui32Count == ui32Index)
{
return(psDescCheck);
}
//
// We have not found enough descriptors yet to satisfy the supplied
// index so increment our count and continue.
//
ui32Count++;
}
//
// Move on to the next descriptor.
//
ui32TotLength += (uint32_t)psDescCheck->bLength;
psDescCheck = NEXT_USB_DESCRIPTOR(psDescCheck);
}
Any suggestion as to why sometimes the descriptor would have a null length?
The returned size is as expected.