I am able to use boot_demo_usb on the application PCB and program it with dfuprog. The boot_demo_usb example uses a USB HID device.
The application uses a USB serial device. If I define a DFU device on the bus, I am not seeing it as a Stellaris DFU device in the device manager, only a USB serial device.
Can you comment on what is missing from the code below?
Thanks,
Priya
void USBmain(void)
{
uint32_t ui32PLLRate;
//// Enable the USB peripheral
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0);
// Configure the device pins.
PinoutSet(false, true);
// Initialize the transmit and receive buffers.
USBBufferInit(&g_psTxBuffer[0]);
USBBufferInit(&g_psRxBuffer[0]);
// Pass the device information to the USB library and place the device
// on the bus.
//
g_sCompDevice.psDevices[0].pvInstance =
USBDCDCCompositeInit(0, &g_psCDCDevice[0], &g_psCompEntries[0]);
// Tell the USB library the CPU clock and the PLL frequency. This is a
// new requirement for TM4C129 devices.
//
SysCtlVCOGet(SYSCTL_XTAL_25MHZ, &ui32PLLRate);
UARTprintf("\n ui32PLLRate = %d\n", ui32PLLRate);
USBDCDFeatureSet(0, USBLIB_FEATURE_CPUCLK, &g_ui32SysClock);
USBDCDFeatureSet(0, USBLIB_FEATURE_USBPLL, &ui32PLLRate);
USBDCompositeInit(0, &g_sCompDevice, DESCRIPTOR_DATA_SIZE + COMPOSITE_DDFU_SIZE,
g_pucDescriptorData);
USBDDFUCompositeInit(0, &g_sDFUDevice, &(g_sCompDevice.psDevices[1]));
}
tUSBDCompositeDevice g_sCompDevice =
{
//
// Stellaris VID.
//
USB_VID_TI_1CBE,
//
// Stellaris PID for composite serial device.
//
// USB_PID_SERIAL,
USB_PID_COMP_HID_DFU,
//
// This is in 2mA increments so 500mA.
//
250,
//
// Bus powered device.
//
USB_CONF_ATTR_BUS_PWR,
//
// There is no need for a default composite event handler.
//
ControlHandler,
//
// The string table.
//
g_pui8StringDescriptors,
NUM_STRING_DESCRIPTORS,
//
// The Composite device array.
//
1,
g_psCompEntries
};
#define NUM_SERIAL_DEVICES 2
tCompositeEntry g_psCompEntries [NUM_SERIAL_DEVICES];