Other Parts Discussed in Thread: TM4C1290NCPDT
I am using TM4C1290NCPDT controller.
I am trying to configure USB as virtual serial port. Below is my USB configuration function.
void USB_Configuration(void)
{
uint32_t ui32PLLRate;
ui32PLLRate = 480000000;
ROM_GPIOPinTypeUSBAnalog(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0);
//
// Initialize the transmit and receive buffers.
//
USBBufferInit(&g_sTxBuffer);
USBBufferInit(&g_sRxBuffer);
//
// Set the USB stack mode to Device mode with VBUS monitoring.
//
USBStackModeSet(0, eUSBModeDevice, 0);
//
// Tell the USB library the CPU clock and the PLL frequency. This is a
// new requirement for TM4C129 devices.
//
USBDCDFeatureSet(0, USBLIB_FEATURE_CPUCLK, &ui32SysClock);
USBDCDFeatureSet(0, USBLIB_FEATURE_USBPLL, &ui32PLLRate);
//
// Pass our device information to the USB library and place the device
// on the bus.
//
USBDCDCInit(0, (tUSBDCDCDevice *)&g_sCDCDevice);
}
I copied usb_serial_struct.c & usb_serial_struct.h files from usb_device_serial example code.
And also i put USB0DeviceIntHandler() in startup.ccs file.
In my hardware i directly connected VBUS, D+,D-, & GND to USB connector.
But when i connect my device to PC using USB cable. The PC is unable to detect COM Port. There isn't any notification like unknown device or driver error when i connect or disconnect the usb cable.
So what's wrong in my code/hardware?