Hi, i am using a custom board with TI chip, and i am using USB to print logs on serial terminal, sometimes it wont print the logs and sometimes it even fails to detect the device in linux and gives error about discriptor.
it gets solved if i power on the device again.
USB initialization:
void USBInit(void)
{
// Configure the required pins for USB operation.
//
ROM_SysCtlPeripheralEnable(USB_GPIO_PERIPH);
ROM_GPIOPinTypeUSBAnalog(USB_GPIO_BASE, USB_GPIO_TX | USB_GPIO_RX);
ROM_SysCtlPeripheralEnable(USB_VBUS_ID_PERIPH);
ROM_GPIOPinTypeUSBAnalog(USB_VBUS_ID_BASE, USB_GPIO_VBUS | USB_GPIO_ID);
//
// Not configured initially.
//
g_bUSBConfigured = false;
//
// Initialize the transmit and receive buffers.
//
USBBufferInit((tUSBBuffer *)&g_sTxBuffer);
USBBufferInit((tUSBBuffer *)&g_sRxBuffer);
//
// Set the USB stack mode to Device mode with VBUS monitoring.
//
USBStackModeSet(0, eUSBModeDevice, 0); // for monitoring VBUS
//USBStackModeSet(0, eUSBModeForceDevice, 0);
//
// Pass our device information to the USB library and place the device
// on the bus.
//
USBDCDCInit(0, &g_sCDCDevice);
}