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.

RTOS/EK-TM4C1294XL: USB CDC for firmware download

Part Number: EK-TM4C1294XL

Tool/software: TI-RTOS

Hi,

I want to working on PoC to perform firmware upgrade via USB CDC mode.

Bootloader implementation is available, but that uses USB DFU mode. Is there any example program that makes use of USB CDC mode for firmware upgrade?

Need guidance in this regards.

Thanking you,

Rahul

  • Hi Rahul,

    Hopefully this will be of help: processors.wiki.ti.com/.../TI-RTOS_USB_DFU

    Todd
  • Hi Rahul,

    My understanding is that the bootloader code for firmware update support resides primarily in the TM4C ROM, although a small part of Flash must have custom code to launch into the ROM routines. If you grab SPMU301D.PDF from the Texas Instruments site, you'll see that most peripherals use a custom bootloader protocol, but Ethernet uses the standard BOOTP and USB uses the standard DFU protocol. There is no way to change any of these protocols because they are implemented in ROM. Therefore, you basically must use DFU.

    I assume that you might want to use CDC instead of DFU because you do not have USB Host code that implements DFU. In that case, you would still need custom code to handle firmware downloads via CDC. If this is your situation, I would be curious to know what sort of USB Host code you have that is specific to CDC updates (and which doesn't have DFU support).

    It appears that you have two choices: Either obtain a DFU client for your USB Host (this option seems much easier due to the standardization of DFU by the USB organization) -or- write your own bootloader that will run out of Flash, not ROM, and implement your own custom CDC Mode firmware download. The latter will be much more difficult, and the bootloader will consume a portion of your Flash space since you cannot use the ROM for its built-in DFU support. There is also the added risk that if a bug in your code erases your custom CDC bootloader in Flash, then your customer will suffer from bricked hardware.

    The documentation that Todd referenced describes a system where the normal (non-update) mode of the firmware is CDC, but the firmware download still occurs via the DFU protocol. In other words, CDC is not used for firmware downloads, but is merely the mode when not upgrading. I have not looked at the exact details of this specific TM4C firmware, but DFU defines a Device with specific commands for resetting the chip into DFU mode so that a new firmware image can be downloaded. This occurs by switching into the ROM code while the Flash is reprogrammed.

    Good luck,

    Brian
  • "I assume that you might want to use CDC instead of DFU because you do not have USB Host code that implements DFU. In that case, you would still need custom code to handle firmware downloads via CDC. If this is your situation, I would be curious to know what sort of USB Host code you have that is specific to CDC updates (and which doesn't have DFU support)."

    => Yes, host does not have support for DFU mode and device should be capable to handle firmware upgrade vis CDC only. And at present that's the only information I have.

    => I do not have access to USB Host code as of now. But what kind of information is required, can you be more specific? So that I can ask for the required details only instead of generic one.

    Also, I am referring to the document that you have shared "TivaWare™ Boot Loader USER’S GUIDE". This document has good information about the existing implementation of USB boot loader that uses DFU mode.

    So, is there any scope to use/refer existing example (bootloaderusb_completed available at processors.wiki.ti.com/.../TI-RTOS_USB_DFU) that can be tailored to convert to CDC mode? Or should I no look into example code at all and start entirely from zero?

    Thanking you,

    Rahul

  • Hi Rahul,

    It sounds like you have some strict requirements. I feel that you are probably on your own on this one.

    Todd