• TI Thinks Resolved

MSPFlasher can't erase/download in SBW2 mode

Hello everybody!

We use MSP430Flasher software to download our program into MSP430F6721 in SBW2 mode.

When we send a command "MSP430Flasher.exe -m SBW2",

we get a result:
* -----/|-------------------------------------------------------------------- *
* / |__ *
* /_ / MSP430 Flasher v1.3.3 *
* | / *
* -----|/-------------------------------------------------------------------- *
*
* Evaluating triggers...done
* Checking for available FET debuggers:
* Found USB FET @ COM3 <- Selected
* Initializing interface @ COM3...done
* Checking firmware compatibility:
* FET firmware is up to date.
* Reading FW version...done
* Setting VCC to 3000 mV...done
* Configuring...done
* Accessing device...done
* Reading device information...done
*
* ----------------------------------------------------------------------------
* Arguments : -m SBW2 -
* Warning: Some default options were used due to incomplete argument list.
* ----------------------------------------------------------------------------
* Driver : loaded
* Dll Version : 30202000
* FwVersion : 30202000
* Interface : TIUSB
* HwVersion : U 1.64
* JTAG Mode : SBW2
* Device : MSP430F6721
* EEM : Level 5, ClockCntrl 2
* VCC OFF
* ----------------------------------------------------------------------------
* Powering down...done
* Disconnecting from device...done
*
* ----------------------------------------------------------------------------
* Driver : closed (No error)
* ----------------------------------------------------------------------------
*/

So, as we can see emulator can connect to the device.

When we send a command: "MSP430Flasher.exe -m SBW2 -e ERASE_ALL -w Target_m.txt"
We get an error:
* -----/|-------------------------------------------------------------------- *
* / |__ *
* /_ / MSP430 Flasher v1.3.3 *
* | / *
* -----|/-------------------------------------------------------------------- *
*
* Evaluating triggers...done
* Checking for available FET debuggers:
* Found USB FET @ COM3 <- Selected
* Initializing interface @ COM3...done
* Checking firmware compatibility:
* FET firmware is up to date.
* Reading FW version...done
* Setting VCC to 3000 mV...done
* Configuring...done
* Accessing device...done
* Reading device information...done
* Loading file into device...
# Exit: 59
# ERROR: Could not erase device memory
* Powering down...done
* Disconnecting from device...done
*
* ----------------------------------------------------------------------------
* Driver : closed (No error)
* ----------------------------------------------------------------------------
*/

When we send a command: "MSP430Flasher.exe -m SBW2 -e NO_ERASE -w Target_m.txt"
We get an another error:
* -----/|-------------------------------------------------------------------- *
* / |__ *
* /_ / MSP430 Flasher v1.3.3 *
* | / *
* -----|/-------------------------------------------------------------------- *
*
* Evaluating triggers...done
* Checking for available FET debuggers:
* Found USB FET @ COM3 <- Selected
* Initializing interface @ COM3...done
* Checking firmware compatibility:
* FET firmware is up to date.
* Reading FW version...done
* Setting VCC to 3000 mV...done
* Configuring...done
* Accessing device...done
* Reading device information...done
* Loading file into device...
# Exit: 59
# ERROR: File input/output error
* Powering down...done
* Disconnecting from device...done
*
* ----------------------------------------------------------------------------
* Driver : closed (No error)
* ----------------------------------------------------------------------------
*/

But when we use  "Lite FET-Pro430 Elprotronic" with the same libraries and the same mode - everything goes fine (see the picture):

We have already tried to use the newest version of MSP430Flasher software, and upgraded the firmware of programmer - no success, we're just getting the same errors.

What can be the reason of such behaviour? An how to resolve this problem in Flasher?

  • Hi Vyacheslav,

    The latest MSP Flasher version (1.3.7) does not require the -m switch at all anymore. The connection mode is determined automatically. Also, since ERASE_ALL is the default setting for the erase functionality, you can leave out the -e switch as well, resulting in the following command:

    "MSP430Flasher.exe -w Target_m.txt"

    I would recommend to add a "-v" to let MSP Flasher verify the memory content after programming:

    "MSP430Flasher.exe -w Target_m.txt -v"

    The error messages that you got could point to some issue with your target code .txt file. Has this code been specifically written for the F6721? Has the .txt file been changed manually? Can you confirm that all memory areas written are actually available for that MSP device?

    Best regards,

    Robert

  • In reply to Robert_L:

    Hello, Robert.

    Thank you for recommendations, I'll try this.

    Anyway, as I wrote before, this programm (Target_m.txt) was loaded without any issues by FET-Pro430. So, I believe, there is no mistakes in this file.
  • In reply to Vyacheslav Prokopiy:

    And I didn't actually get what do you mean about ERASE_ALL?
    First I want erase device completely, and after that download my software into it.
    So, I use two different commands for that.

    What have I missed?
  • In reply to Vyacheslav Prokopiy:

    Whenever the -w switch is used, MSP Flasher erases the memory prior to programming (unless instructed otherwise - i.e. by -e NO_ERASE). This means you don't need two separate commands. If the -w switch is used but -e is not used, MSP Flasher assumes the default (ERASE_ALL).

    Would it be possible for you to send me the target code .txt file, so I can try to reproduce this issue on my end?
    If the content is confidential, it might be sufficient to exchange the hex values in the file against something else, as long as the original boundaries of the memory blocks being programmed are kept.
  • In reply to Robert_L:

    Robert, send me your e-mail please.
  • In reply to Vyacheslav Prokopiy:

    Vyacheslav,

    You are attempting to program the entire memory. This includes the BSL memory as well as the INFO A memory which are both locked for writing by default.

    MSP Flasher provides the following options for unlocking the respective sections:

    -u (unlock INFO A)

    -b (unlock BSL memory)

    Please try the following command:

    MSP430Flasher.exe -w "Target_m.txt" -u -b -v

    I tried it with your file and an MSP430F6721 and it worked.

    Best regards,

    Robert