Am unable to get this device to enumerate as a USB DFU using either dfuprog -e or LM Flash Programmer. We're using this part on our own board which is based off the LaunchPad design (TM4C123GH6PM) and confident the part is working. We can enumerate it as a CDC virtual COM port with no problem so pretty sure the hardware is working.
However, we've tried taking sample code both from this forum and from sample code in TivaWare2.0 usb_dev_bulk.c and boot_demo_usb.c to no avail.
Wonder if someone can take a look at the code and offer any suggestions? We've been struggling with this for quite a while and would be grateful for any input.
Many many thanks.
int
main(void)
{
// Enable lazy stacking for interrupt handlers. This allows floating-point
// instructions to be used within interrupt handlers, but at the expense of
// extra stack usage.
//
ROM_FPULazyStackingEnable();
//
// Set the clocking to run from the PLL at 50MHz
//
ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);
//
// Configure the required pins for USB operation.
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
ROM_GPIOPinTypeUSBAnalog(GPIO_PORTD_BASE, GPIO_PIN_5 | GPIO_PIN_4);
#define SYSTICKS_PER_SECOND 100
uint32_t ui32SysClock = ROM_SysCtlClockGet();
ROM_SysTickPeriodSet(ROM_SysCtlClockGet() / SYSTICKS_PER_SECOND);
ROM_SysTickIntEnable();
ROM_SysTickEnable();
//USBDCDTerm(0); // Doesn't make any difference
// Disable all interrupts
ROM_IntMasterDisable();
ROM_SysTickIntDisable();
ROM_SysTickDisable();
HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;
// 1. Enable USB PLL
// 2. Enable USB controller
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0);
ROM_SysCtlPeripheralReset(SYSCTL_PERIPH_USB0);ROM_SysCtlUSBPLLEnable();
ROM_SysCtlUSBPLLEnable();
// 3. Enable USB D+ D- pins
// 4. Activate USB DFU
ROM_SysCtlDelay(ui32SysClock / 3);
ROM_IntMasterEnable(); // Re-enable interrupts at NVIC level
ROM_UpdateUSB(0);
// 5. Should never get here since update is in progress
}