MSP430 Flasher Doc

  • View
    115

  • Download
    1

Embed Size (px)

DESCRIPTION

Manual for the TI MSP430

Text of MSP430 Flasher Doc

  • MSP430 Flasher Manual 1 Version 1.2.3, Sept.2013

    MSP430 Flasher Manual

    Version 1.2.3

    September 2013

  • MSP430 Flasher Manual 2 Version 1.2.3, Sept.2013

    CONTENTS

    1 Introduction ................................................................................................................................ 3 2 Triggers and Arguments ............................................................................................................ 4 3 Exit specifications ...................................................................................................................... 6 4 Firmware Update ....................................................................................................................... 6 5 Segment Erase .......................................................................................................................... 7 6 Example Cases .......................................................................................................................... 8 6.1 Loading and executing target code from a TXT file ................................................................... 8 6.2 Reading out device memory .................................................................................................... 10 6.3 Setting hardware breakpoints .................................................................................................. 11 6.4 Accessing a device with a device activation code ................................................................... 13 6.5 Blowing the devices JTAG security fuse ................................................................................. 15

    LIST OF FIGURES

    Figure 1 Loading and executing target code from a .txt file.................................................................... 9 Figure 2 Reading out device memory ................................................................................................... 10 Figure 3 Setting hardware breakpoints ................................................................................................. 12 Figure 4 Accessing a L092 device without specifying an operating mode ........................................... 13 Figure 5 Accessing a L092 device ........................................................................................................ 14 Figure 6 Blowing the devices JTAG security fuse ............................................................................... 15 Figure 7 Trying to access a device with a blown JTAG security fuse .................................................. 16

    LIST OF TABLES

    Table 1 Available Triggers and Arguments 5 Table 2 Available (combinations of) exit specifications 6

  • MSP430 Flasher Manual 3 Version 1.2.3, Sept.2013

    1 Introduction

    MSP430 Flasher is a user-friendly, shell-based interface providing the user with easy access to MSP430 devices through a FET via JTAG or Spy-Bi-Wire (SBW). It provides the user with the freedom to:

    choose which port of the computer the FET is connected to

    choose which mode to use for accessing the device (JTAG/SBW)

    choose which erase method to run on the memory of the device

    load a TXT or HEX file into the device

    verify the memory of the device

    read memory out and write into a TXT or HEX file

    reprogram a certain memory segment while leaving the rest of the memory untouched

    set hardware breakpoints

    provide a JTAG password (if applicable)

    select the mode of operation for multi-mode devices

    update the firmware of the debugger

    disable status reports (in Quiet Mode)

    reset the device

    blow the devices JTAG fuse While keeping the user informed via essential status reports, MSP430 Flasher performs all the necessary tasks for accessing a MSP430, including but not limited to:

    initializing the interface port

    checking the firmware and hardware versions

    performing a FET recovery if supported by the FET debugger

    powering up and down the device For convenience status reports are logged into a text file called log.txt in the subdirectory Log, which has to be in line with the MSP430 Flasher executable. If the directory does not exist, it will automatically be created. NOTE: New instances are appended to the logfile so old logs are never overwritten.

  • MSP430 Flasher Manual 4 Version 1.2.3, Sept.2013

    2 Triggers and Arguments

    MSP430 Flasher runs from an executable file called MSP430Flasher.exe. This file accepts a number of triggers and arguments necessary to give the user access to the full capabilities of the software. Table 1 lists all available triggers and arguments.

    Trigger Arguments Description / Additional Information

    -h / -? N/A Usage information (displays this table of command line switches)

    -x N/A Displays available exit specifications (see trigger z)

    -i (TI)USB - default Communication port for the FET debugger TIUSB (or USB) is the default. Use COMn to choose a debugger connected to COM port n. Use LPTn for parallel tools (MSP-FET430PIF).

    COMn (i.e. COM15)

    LPTn (i.e. LPT1)

    -m AUTO - default This trigger specifies which communication mode will be used.

    - JTAG for devices which only support 4-wire JTAG.

    - SBW2 for 2-wire Spy-Bi-Wire communication

    - SBW4 for 4-wire JTAG communication with devices which also support Spy-Bi-Wire

    - AUTO for automatic communication mode detection (default)

    JTAG

    SBW2

    SBW4

    -n Device name The name of the device being accessed (prompt if missing)

    -r [Filename, mem_section] This switch triggers a read operation in target device memory section specified by mem_section. The memory content will be written to a file specified by Filename. Available memory sections are:

    MAIN the devices main memory

    INFO info memory (see trigger u)

    BSL bootstrap loader memory (see trigger b)

    RAM random access memory

    -w Filename This switch triggers a memory write operation. The accepted formats are TXT (TI-txt) or HEX (Intel-hex).

    -v N/A Triggers a verification of the device memory after programming

    -u N/A This trigger unlocks locked flash memory (InfoA) for writing

    -b N/A This trigger unlocks the BSL memory for writing

    -e ERASE_ALL - default Erase mode to be used before programming device memory (use only with w trigger)

    ERASE_MAIN

    ERASE_SEGMENT

  • MSP430 Flasher Manual 5 Version 1.2.3, Sept.2013

    Table 1 Available Triggers and Arguments

    Example: In Windows Command Processor, on prompt, the following is entered: MSP430Flasher.exe -i USB -n MSP430C092 -l 4 -p 0x1234ABCD5678 -v -w myfile.txt MSP430 Flasher will: 1) Attempt to access the FET connected to the USB port. 2) Decide which access mode to use and use it, since it has been omitted. 3) Attempt to access a device called MSP430C092. 4) Request a password of length 4 (words) from the user, since the password entered is only length 3. 5) Erase the whole memory of the device by default. 6) Program myfile.txt into the device. 7) Verify the content of the memory after the file is programmed

    -d [breakpoint addresses] Set hardware breakpoints. Use , as delimiter.

    -t Timeout_in_ms Specifies a timeout for breakpoints (counted in milliseconds).

    -p JTAG password This trigger specifies the JTAG password that should be used to open the target device. The user is prompted if its incompatible with the password length specified by trigger -l.

    -l password_length Optional - The length of the JTAG password specified via trigger p. Can be used for double-checking the entered password. Length is counted in 16-bit words! Default = 0

    -o L Operating mode for L092 devices.

    L L092 mode (with external EPROM)

    C C092 mode C

    -f N/A Blows the devices JTAG security fuse.

    Warning: The device will no longer be accessible via JTAG. This action is irreversible.

    -g N/A This trigger disables the logging mechanism

    -s N/A This trigger suppresses the FET firmware update user prompt. A FET firmware update will be forced!

    -q N/A Triggers QUIET mode No system messages will be displayed (except for errors and user prompts)

    -z [exit_spec,] This trigger specifies the state of the device after programming.

    For available exit specs see Table 2. Use , as a delimiter.

    Omitted arguments will be replaced by the default options if possible or the user will be prompted to provide them later.

  • MSP430 Flasher Manual 6 Version 1.2.3, Sept.2013

    3 Exit specifications

    The user has the freedom to select a desired state for the device to be set to when MSP430 Flasher finishes its operation. This can be done using the trigger -z and passing the argument(s) [exit_spec,], where exit_spec is a valid exit specification (see Table 2).

    NOTE: The specifications are delimited with the , (comma) character and enclosed by square braces

    Table 2 Available (combinations of) exit specifications

    4 Firmware Update

    During runtime, in case MSP430 Flasher detects a conflict in the existing firmware versions it will prompt the user to choose whether to let MSP430 Flasher update the firmware or not: >> The firmware of your FET is outdated. >> Would you like to update it? (Y/N): _ Entering Y will update the firmware of the FET, displaying timely status reports, and on success will continue execution of the MSP430 Flasher routine. Entering N will resume the running instance with the outdated firmware. In case of an error during the update the user will be prompted with: >> Update failed. (R)etry/(C)ancel? _