This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1290NCPDT: USB enumeration delay

Part Number: TM4C1290NCPDT


I'm using the TMC4129x as a bulk USB device.  DFU works, USB works, the only problem I have is there is a 5 second delay between calling USBDBulkInit() and the device completing enumeration (Windows, multiple different PCs have the same delay).

uint32_t ui32PLLRate;
SysCtlVCOGet(ui32Crystal, &ui32PLLRate);
USBDCDFeatureSet(0, USBLIB_FEATURE_CPUCLK, &SystemCoreClock);
USBDCDFeatureSet(0, USBLIB_FEATURE_USBPLL, &ui32PLLRate);
    
USBDevice = USBDBulkInit(0, &USBDeviceInfo);
USBModeConfig(USB0_BASE, USB_GPCS_DEVMOD_DEVVBUS); // ignore USB0ID pin
    
osThreadId_t t_usb;
t_usb = osThreadNew(USB_Task, NULL, &usb_task_attr);

In my receive event handler I get a USB_EVENT_SUSPEND almost immediately and then 5 seconds later USB_EVENT_CONNECTED.

I'm working on getting an enumeration trace.

  • Hello,

    Are you running from a TivaWare example at this point, or custom firmware? Also LaunchPad or custom hardware? Just want to get a background here on the software/hardware.

    The USB trace will be very useful here to help see what is going on there.

    I don't recall it taking 5 seconds to finish enumeration. I just tried that myself and I am seeing the TivaWare Bulk Device showing up immediately. That said I do see that the Device Manager is 'refreshing' after about 5 seconds, so perhaps that is related and its an issue tangential to enumeration.

    Let's see what your trace shows and what is of concern with it then I can also take some measurements on my end too.

    Best Regards,

    Ralph

  • I'm sorry - I am having trouble replying to my original post.

  • I captured the enumeration process and the delay was exactly 5 seconds, so I figured that it was a timeout.

  • Apologies about the multiple replies - seems that I have to type the reply in without using Enter.  Looking at the enumeration packets it had string indexes for the serial, interface and config in the tUSBDBulkDevice struct, even through I had '0' as the string index in the struct declaration.  So I added a serial of '00000000' and the enumeration then processed at normal speed.