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.

Need USB boot loader source code for MSP430F5529

Other Parts Discussed in Thread: MSP430F5529

Need USB boot loader source code for MSP430F5529 . I also want to know the USB boot loader size so that i can design my other application design. Apart from this is it possible to customize boot loader to only use as USB boot loader by customizing it?

  • Hi Nitesh,

    The BSL is located in its own separate 2kB of flash, so it doesn't take up any of your application code space - so I don't think USB BSL size should matter for your application design (unless you need a custom version of the BSL for some reason?). I was unsure about what you were asking in your last sentence, but the MSP430F5529 already has a USB BSL in it by default for doing field firmware updates.

    See also this app note: www.ti.com/.../slaa452 about USB BSL.

    Regards,
    Katie
  • Thanks for the quick reply.

    The USB BSL which comes with MSP430F5529 has any other interfaces supported apart from USB like serial/I2C/SPI, then is it possible to customize only to USB support? What is the size of USB BSL which come with MSP430F5529. I am concerned about the USB BSL size, since i  want to have fail safe application similar to USB boot loader for my system for the firmware upgrade using switches. If i have two copy of USB BSL is it good or shall i have normal Boot and depending upon the switch i can jump to either main application for application start  and fail safe application to do the firmware upgrade.  

  • For "Customized BSL", you can use any interface you want.

    If 2KB is not enough for the entire BSL code, you can just implement only the "bootstrap" in it, and use that strap to pull the rest of the "boot" into RAM before you try to walk.

    I think the source code you got is doing precisely that.
  • Does it mean USB boot loader with flash handling will sit in 2KB area ? or i have to keep the USB device and Flash handling in separate flash area for the firmware upgrade excluding on bootstrap in 2 KB flash?
  • Hi Nitesh,

    Nitesh Padiyar52 said:
     The USB BSL which comes with MSP430F5529 has any other interfaces supported apart from USB like serial/I2C/SPI, then is it possible to customize only to USB support?"

    The BSL that comes pre-loaded in the separate 2kB BSL area of flash on the MSP430F5529 device is only supporting USB - it does not support anything else. And it takes up almost all of the 2kB in that area. This should already have everything that you need (USB and flash handling) for doing a firmware upgrade over USB, without you needing to add or change anything.

    Please refer to these documents and examples:

    MSP430 BSL User's Guide: www.ti.com/lit/pdf/slau319 This document discusses all MSP430 BSLs, not just the USB one on F5529. It talks about how you can use the BSL for a firmware update.

    MSP430F5529 datasheet: www.ti.com/lit/gpn/msp430f5529 this has more information about the BSL specifically in the MSP430F5529 - like where the 2kB of BSL flash is located in the memory map, and what kind of BSL it is (USB).

    MSP430 Custom BSL app note: www.ti.com/lit/pdf/slaa450 This has information on making a custom BSL (which you won't need to do if you can just use the USB one) but it also explains more information about all of the different BSLs in our MSP430F5xx/6xx family of devices. But note that each device only has one of these BSLs loaded by default (on USB devices, just the USB BSL is loaded. On parts with no USB module, then only the UART BSL is loaded).

    I hope this helps to make things clearer. Near the end of the training found here, there is also some discussion of the different BSLs in the MSP430 portfolio, but for your particular situation hopefully the documents I've listed will make it clear enough. https://training.ti.com/msp-software-tools-ecosystem-taking-your-concept-design-production

    Regards,

    Katie

  • Hi Katie,

    Thanks for explanation, very well understood the USB BSL and its almost answered my question. One last question, which device class does this USB BSL support? Since we need direct USB device connected to USB Host without any UART intermediate conversion. Our all application will use USB device stack with CDC class for all other communications from USB host which is PC based application. We don't want use any UART in our system its fully USB device.

    We have selected MSP430F5659IPZ controller, its similar to MSP430F5529 right.

    Please let me know your comments.

    Thanks 

    Nitesh

  • AFAIK, default TI USB BSL is HID. I made my own (not related to TI) CDC version. If 2 KByte is not enough, info memory (free, MSP430F5xx use TLV for constants) can be used.

  • Yes zrno soli is right, the default USB BSL enumerates as an HID device with a specific VID + PID combination to indicate that this is enumerated as the TI BSL. You can find more information in www.ti.com/.../slau319 section 1.4.

    The PC I believe should recognize an HID device without you needing to provide a special driver, you'll just have to make sure that your PC side application host that's talking to the BSL is able to handle communication with the HID device. We provide a Python-based USB BSL host that can run on PCs: software-dl.ti.com/.../Python_Firmware_Upgrader-5_00_01.zip
    And a Java HID example: software-dl.ti.com/.../Java_HID_Demo-5_00_01.zip
    Both are part of the downloads from the USB developer's package tools page: www.ti.com/.../msp430usbdevpack
    I believe that both of these include source code, so hopefully these may help you with your PC-side development.
    You may also want to see this app note with useful information about different USB BSL strategies for applications that also use USB and have to be able to handle both application USB and USB BSL: www.ti.com/.../slaa452

    Regards,
    Katie

  • Hi Katie,

    Thanks for the answer, Since i am first time using USB i have one more question regarding hardware , whether USB HID/CDC class requires any other conversion chip to communicate with PC for any USB in build micro controller ? Any sequence of operation i need to follow before normal data transfer after device enumeration? Please help me where i can get very straight cut reference when to use HID/CDC/BULK transfers for my application.

    Thanks and Regards,

    Nitesh

  • Micro with internal USB module can be connected directly to PC USB port without any glue logic (and can be bus powered). I made my CDC BSL in the main flash area. I was using UART for log / debug. At the end code was relocated to BSL 2 KByte area.

    You can see how HID / CDC working using original TI USB Stack examples with inlined UART logs. Bulk is also possible, but AFAIK is not covered by TI USB Stack examples. I made some CDC / Bulk benchmarks.

    forum.43oh.com/.../

**Attention** This is a public forum