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.

MSP430F5359: MSP-FET programming: What is the cause of “Error 59: Could not write device memory”?

Part Number: MSP430F5359
Other Parts Discussed in Thread: MSP-FET

The system that we're developing uses two MSP430F5359 microprocessors running in tandem. We maintain a continuous integration test system that has 20 or more of these modules continuously running test programs. The CI system occasionally reprograms the modules-under-test using MSP-FET flashers and MSPFlasher_1.3.20.

Occasionally, attempts to reprogram a module-under-test result in the MSP-FET flasher returning “Error 59: Could not write device memory”. According to my test engineer, once a module has started returning this error, it persists until corrective action is taken. We're a little unclear on exactly what action actually clears the failure but it may be some combination of 1) unplugging and replugging the MSP-FET flasher from its USB cable; 2) powering down and repowering the module-under-test; and 3) perhaps leaving it all unit unpowered and/or unplugged for as long as 30 minutes. (The problem hasn't occurred so frequently that we've been able to narrow this list down much.)

I've tried to read the source code for the MSPFlasher and for the (apparently appropriate) DLL but between the app, the DLL(s), Windows USB (HID?) support, firmware in the MSP-FET flasher, and funclets loaded into the target device, it's quite the twisty-turny maze of passages, all alike.

Can anyone state, in simple language, what is the approximate root cause of “Error 59: Could not write device memory”? At which of those many functional levels is this error occurring/being detected?

  • Here's an example of the log when the failure occurs:

    Tue May 10 08:56:14 2022:      * -----/|-------------------------------------------------------------------- *
    Tue May 10 08:56:14 2022:      *     / |__                                                                   *
    Tue May 10 08:56:14 2022:      *    /_   /   MSP Flasher v1.3.20                                             *
    Tue May 10 08:56:14 2022:      *      | /                                                                    *
    Tue May 10 08:56:14 2022:      * -----|/-------------------------------------------------------------------- *
    Tue May 10 08:56:14 2022:      *
    Tue May 10 08:56:14 2022:      * Evaluating triggers...done
    Tue May 10 08:56:14 2022:      * Checking for available FET debuggers:
    Tue May 10 08:56:16 2022:      * Found USB FET @ COM10 <- Selected
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:     
    Tue May 10 08:56:16 2022:      * Initializing interface @ COM10...done
    Tue May 10 08:56:17 2022:      * Checking firmware compatibility:
    Tue May 10 08:56:17 2022:      * FET firmware is up to date.
    Tue May 10 08:56:17 2022:      * Reading FW version...done
    Tue May 10 08:56:17 2022:      * Setting VCC to 3000 mV...done
    Tue May 10 08:56:17 2022:      * Accessing device...done
    Tue May 10 08:56:18 2022:      * Reading device information...done
    Tue May 10 08:56:18 2022:      * Loading file into device...
    Tue May 10 08:56:33 2022:      # Exit: 59
    Tue May 10 08:56:33 2022:      # ERROR: Could not write device memory
    Tue May 10 08:56:33 2022:      * Powering down...done
    Tue May 10 08:56:33 2022:      * Disconnecting from device...done
    Tue May 10 08:56:33 2022:      *
    Tue May 10 08:56:33 2022:      * ----------------------------------------------------------------------------
    Tue May 10 08:56:33 2022:      * Driver      : closed (No error)
    Tue May 10 08:56:33 2022:      * ----------------------------------------------------------------------------
    Tue May 10 08:56:33 2022:      */

  • Hi Atlant,

    I'll have to check with our SW tools team to see if they can help decode this one.  In the meantime, how often does this happen?  Once per hour, day, week...etc.?

  • My test engineer tells me that its difficult to state what the absolute failure rate is because our test infrastructure will mask this so long as it is recoverable within ten retries.

    On the other hand, one of them happened to me this very morning, but for me, there was no special recovery needed: I just retried the TI Flasher and it immediately succeeded.

  • Hi Atlant,

    Ok, this is good information.  So when the code is updated using MSPFlasher, you have multiple MSPFET tools connected to a single PC?  Is it possible to demonstrate this behavior with only a single MSPFET connected?

**Attention** This is a public forum