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.

ROM based USB Bootloader

Other Parts Discussed in Thread: EK-TM4C1294XL

Dear All,

We want to make use of ROM based USB BootLoader. In Our application software, after receiving a particular command(Received via USB virtual COM Port) we are executing the following code

USBDCDTerm(0);
//
// Disable SysTick and its interrupt.
//
ROM_SysTickIntDisable();
ROM_SysTickDisable();
//
// Disable all processor interrupts. Instead of disabling them one at a
// time, a direct write to NVIC is done to disable all peripheral
// interrupts.
//
HWREG(NVIC_DIS0) = 0xFFFFFFFF;
HWREG(NVIC_DIS1) = 0xFFFFFFFF;
HWREG(NVIC_DIS2) = 0xFFFFFFFF;
HWREG(NVIC_DIS3) = 0xFFFFFFFF;
//HWREG(NVIC_DIS4) = 0xFFFFFFFF;
//
ROM_USBDevDisconnect(USB0_BASE);
ROM_UpdateUSB(0);

After this code execution, virtual port has been removed from PC and other unknown USB device has registered in PC even LM Flash Programmer with USB DFU interface selection doesn't show any device. 

Our aim is to initiate the ROM based USB BootLoader from application software and updating the Software using LM Flash Programmer.

Can you help us to solve the problem.

  • Hello Chidambaram,

    The first step is to make sure that the drivers for DFU class device is correctly installed.

    If you erase the device and connect the USB port then does the "Tiva DFU" show up?
  • Hi Amit,

    After Erasing the device and Connecting the USB , it shows as DFU Device. Please find attached snapshot. Given below is our processor clock and USB initialization code in our application software.  Is there any thing wrong in Clock initialization preventing USB update?

       //

       // Set the system clock to run at 120MHz from the PLL.

       //

       v_SysClock_u32r = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |

                                              SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |

                                              SYSCTL_CFG_VCO_480), 120000000);

       //

       // Save the PLL rate used by this application.

       //

       v_USBPLLRate_u32r = 480000000;

    /**************************************************************************************************

    **************************************USB Initialisation*******************************************

    ***************************************************************************************************/

       //

       // 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, &v_SysClock_u32r);

       USBDCDFeatureSet(0, USBLIB_FEATURE_USBPLL, &v_USBPLLRate_u32r);

       //

       // Pass our device information to the USB library and place the device

       // on the bus.

       //

       USBDCDCInit(0, (tUSBDCDCDevice *)&g_sCDCDevice);

       // Enable USB interrupt with Priority = -1.

       ROM_IntPrioritySet(INT_USB0, 0x20);

    /**************************************************************************************

    **************************End Of USB Initialization***********************************

    **************************************************************************************/

  • Hello Chidambaram

    That means the drivers have been correctly installed. Since you main USB application is working it would mean all the initialization done is also correct. Can you try installing the DFU driver from the TivaWare windows_driver again? If it it still does not work, please make a small test code for me to reproduce the problem using EK-TM4C1294XL.