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.

Tiva: How difficult to implement USB + Bootloader code?



Hello,

   I have a project that could go either MSP430 or Tiva C series; I'm trying to figure out which will be easier. The product needs to have a USB interface for updating firmware. I've done it with a Stellaris and FTDI USB to Serial chip, and that was pretty easy. Question: How hard is it to do this with the Tiva C series' built-in USB interface? All I need from the USB interface is a simple COM port for command line interface and the ability to upload new firmware. It's a fixed fee project so I want to be sure I know up front how much work it will be prior to starting.

Also, any idea on how many hours it would take to make an application that's basic Hello World over USB plus supports USB firmware update?

Thanks,

Derek

  • Hi Derek,

         There is already a usb_stick_update example program for Tiva C Series. Here below is part of the description from the readme file.

    USB Memory Stick Updater

    This example application behaves the same way as a boot loader. It resides
    at the beginning of flash, and will read a binary file from a USB memory
    stick and program it into another location in flash. Once the user
    application has been programmed into flash, this program will always start
    the user application until requested to load a new application.

    -kel

  • If you want a command prompt over CDC and firmware update, how you implement it will depend on which update mechanism you want to use.  If you want to use something like the stick update (which leverages mass storage class (MSC)), you'll need to create a composite device that runs both CDC and MSC.  The alternative is to create a non-composite device that runs only CDC but can branch to the built-in DFU update mechanism that resides in ROM, which is actually what the Stellaris ICDI does.  In this case you'd have to send some sequence over the CDC interface telling it to go into DFU mode, at which point it would branch to ROM and re-initialize as a DFU device. You would obviously lose the CDC portion during the update process, but after reset, it would return.

    This stuff is not trivial, so measuring it in hours may be optimistic.  This could easily take a week if you're not familiar with USB.  It all depends on your skill level.

  • I'm working on a USB bootloader and I've found two documents and the example USB stick program in the TM4C123G examples.

    http://www.ti.com/lit/ug/spmu301/spmu301.pdf

    http://www.ti.com/lit/an/spma054/spma054.pdf

    This example is, from what I understand, setup for a USB host device.  I just need a boot loader for a basic USB slave device.  Is there an example of that like there is an example of the USB stick host application?  I haven't been able to dig up any more information than what I listed in this post. 

    Thanks,

    Rob

  • I am using the usb stick updater and found an issue.  

    The example program workes.

    If the downloaded program is using interrupts, then by moving the start address to 0x2000 , the program crashes.  

    Is there any workaround for this issue.

    Thanks

    Glenn

  • I was in error.  I moved the starting address to 0x8000 as the demo suggested.

    Glenn

  • Thanks Glenn. Surely you found and posted one of the most common issues on the bootloader

    Regards

    Amit

  • Any work arounds that allows the boot loader to be used.

    Thanks

    Glenn Edgar

  • Hello Glenn,

    Do you mean that the Boot Loader is not working?

    Regards

    Amit

  • Any way of using the usb stick bootloader to load programs that use interrupts

    Thanks

    Glenn

  • Hello Glenn

    When the Boot Loader is enabled then the interrupts must be disabled. Once it is completed the loaded program can use interrupts.

    Regards

    Amit