SLAA457B September 2013 – October 2018 MSP430F5500 , MSP430F5501 , MSP430F5502 , MSP430F5503 , MSP430F5504 , MSP430F5505 , MSP430F5506 , MSP430F5507 , MSP430F5508 , MSP430F5509 , MSP430F5510 , MSP430F5513 , MSP430F5514 , MSP430F5515 , MSP430F5517 , MSP430F5519 , MSP430F5521 , MSP430F5522 , MSP430F5524 , MSP430F5525 , MSP430F5526 , MSP430F5527 , MSP430F5528 , MSP430F5529 , MSP430F5630 , MSP430F5631 , MSP430F5632 , MSP430F5633 , MSP430F5634 , MSP430F5635 , MSP430F5636 , MSP430F5637 , MSP430F5638 , MSP430F5658 , MSP430F5659 , MSP430F6630 , MSP430F6631 , MSP430F6632 , MSP430F6633 , MSP430F6634 , MSP430F6635 , MSP430F6636 , MSP430F6637 , MSP430F6638 , MSP430F6658 , MSP430F6659 , MSP430FG6425 , MSP430FG6426 , MSP430FG6625 , MSP430FG6626
A common use of USB is to enable end users to update the firmware. Among the advantages of this is that bug fixes can be pushed proactively, increasing user satisfaction and reducing returns.
The vast majority of MSP430 derivative devices have an on-chip bootloader (BSL). The BSL is a program that resides in a special protected location in MSP430 flash memory and facilitates communication with an external host. Like tools with JTAG access, it can read and write to the MCU's flash memory. But unlike JTAG tools, it cannot be used to emulate code.
The BSL interface is often a UART, or sometimes I2C. On the USB-equipped derivatives listed in Table 1, the BSL's interface is USB.
In addition to field updates, the BSL can be used for production programming. It also plays an important role when JTAG access is not available. For example, it can be used to recover the device when something has corrupted internal flash.
Because of potential use in the field, the BSL is password-protected to prevent unwanted access to proprietary application software.
The BSL must be invoked, meaning that CPU execution must be transferred to it. On the USB BSL, this can happen in one of three ways:
Field applications of the USB BSL are likely to use the first method, because a main application is already in control of the device. In this way, the developer can design a simple end user experience for the update. However, if main software becomes corrupted, this method might not work.
The second method is used during production of a device based on the MSP430 MCU, because the reset vector is blank when it leaves TI's factory; you can simply assemble the board and attach the device to a USB host, and it will enumerate under BSL control. This method also plays an important role in recovering from interrupted BSL sessions, because the reset vector is left blank throughout the update process.
The third method is the most reliable but often requires the additional cost of a pushbutton.
The BSL is designed to automatically recognize four frequencies applied to XT2:
If using BSL for production programming, you must use one of these four frequencies. If using BSL after a JTAG session has been performed, you can use that JTAG session to program a modified version of the BSL that can recognize your frequency.
All of this is described in Field Firmware Updates on MSP430 MCUs. Supporting this application note, the MSP430 USB Developers Package includes the Python-based Firmware Updater application. This application is built on the open source package python-msp430-tools. It can be used from a command line, or a GUI can be built on top of it.