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.

MSP430F5510: BSL-Scripter fails with [ERROR_MESSAGE]Data is not completely transmitted! when re-flashing a HID target, but only on Microsoft Surface Pro. Works fine on other computers.

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

The problem that I'm seeing is that BSL scripter works perfectly on one computer to re-flash a USB HID target running on an MSP430F5510, but fails on the other. The problem computer does fine with using the BSL scripter to target UART based devices, and I'm able to use MSP430Flasher to re-flash JTAG targets. In both cases the same target hardware is used, and the same MSP-FET device is used.

There's more info below on the output from the tool in the cases where it works and the case where it doesn't, as well as a copy of the script I'm feeding BSL-Scripter. Does anyone know what the source of this problem might be or what steps might be taken to narrow down the cause?

The output from BSL-scripter, in the failure case is:

---------------------------------------------------------
BSL Scripter 3.2.0
PC software for BSL programming
2017-Jan-25 13:40:51
---------------------------------------------------------
Input file script is : D:/flashFiles/ScriptFile.txt

////////////////////////////////////
//Write RAM USB BSL to the device
////////////////////////////////////
MODE 5xx USB
//gives wrong password to do mass erase in the memory
RX_PASSWORD badPass.txt
    Read Txt File  : D:\flashFiles\badPass.txt
    [ERROR_MESSAGE]BSL Password is error!
RX_PASSWORD defaultPass.txt
    Read Txt File  : D:\flashFiles\defaultPass.txt
    BSL Password is correct!
DELAY 1000
    Delay 1000 ms
RX_DATA_BLOCK_FAST RAM_BSL_USB.txt
    Read Txt File  : D:\flashFiles\RAM_BSL_USB.txt
    Time elapsed of writing 3602 bytes : 0.07877 seconds
    Speed of writing data :44.66(kB/s)
SET_PC 0x2504
    [ERROR_MESSAGE]Data is not completely transmitted!

On another computer (new HP Spectre laptop) it works fine, and I get this output:

---------------------------------------------------------
BSL Scripter 3.2.0
PC software for BSL programming
2017-Jan-25 19:38:52
---------------------------------------------------------
Input file script is : E:/flashFiles/ScriptFile.txt

////////////////////////////////////
//Write RAM USB BSL to the device
////////////////////////////////////
MODE 5xx USB
//gives wrong password to do mass erase in the memory
RX_PASSWORD badPass.txt
    Read Txt File  : E:\flashFiles\badPass.txt
    [ERROR_MESSAGE]BSL Password is error!
RX_PASSWORD defaultPass.txt
    Read Txt File  : E:\flashFiles\defaultPass.txt
    BSL Password is correct!
DELAY 1000
    Delay 1000 ms
RX_DATA_BLOCK_FAST RAM_BSL_USB.txt
    Read Txt File  : E:\flashFiles\RAM_BSL_USB.txt
    Time elapsed of writing 3602 bytes : 0.07904 seconds
    Speed of writing data :44.5(kB/s)
SET_PC 0x2504
DELAY 3000
    Delay 3000 ms
////////////////////////////////////
//Start the RAM USB BSL application to download the app
////////////////////////////////////
MODE 5xx USB
RX_PASSWORD .\defaultPass.txt
    Read Txt File  : E:\flashFiles\defaultPass.txt
    BSL Password is correct!
RX_DATA_BLOCK .\Firmware.txt
    Read Txt File  : E:\flashFiles\Firmware.txt
    Time elapsed of writing 35213 bytes : 2.29 seconds
    Speed of writing data :15.02(kB/s)
DELAY 500
    Delay 500 ms
RX_DATA_BLOCK RESET.txt
    Read Txt File  : E:\flashFiles\RESET.txt
    Time elapsed of writing 35218 bytes : 0.009502 seconds
    Speed of writing data :3620(kB/s)
SET_PC 0x2504

The script file I"m using is:


////////////////////////////////////
//Write RAM USB BSL to the device
////////////////////////////////////
MODE 5xx USB
//gives wrong password to do mass erase in the memory
RX_PASSWORD badPass.txt
RX_PASSWORD defaultPass.txt
DELAY 1000
RX_DATA_BLOCK_FAST RAM_BSL_USB.txt
SET_PC 0x2504
DELAY 3000
////////////////////////////////////
//Start the RAM USB BSL application to download the app
////////////////////////////////////
MODE 5xx USB
RX_PASSWORD .\defaultPass.txt
RX_DATA_BLOCK .\Firmware.txt
DELAY 500
RX_DATA_BLOCK RESET.txt
SET_PC 0x2504

  • Hi Joshua,


    Could you please give more information what PC and the operating system you are using?

    I tried the test in Win7, Win8, and Win10, so far and everything works as expected.

    Just yesterday the fixed version of Scripter is uploaded on the Web :

    Could you please try this version and see if the behavior is the same?

  • Fatmawati,

    The system I'm using is running Windows 10 Pro, version 10.0.14393 build 14393

    The System Model is "Surface Book"

    It has an Intel Core i5-6300U with 8 GB of RAM.

    Bios version/Date Microsoft Corporation 90.1380.768, 11/4/2016

    SMBIOS version 3.0

    Is there any other information that would be useful? I'm going to try some other windows pcs later today, if I find another configuration that fails I'll let you know.

  • I forgot to mention I also tried the latest version of BSL-Flasher, released yesterday, and nothing was different.
  • Hi Joshua,

    I'll check the windows 10 version on my side. it will be great if you can test in other machine and see the compatibility. this problem is something that i can not reproduce on my side, so it's a little bit challenging to debug what happened in your side.

    Which BSL that you download to your device? the latest was the 00.08.09.39.
  • I'm not actually sure which BSL version I'm using. I'll try the latest and see if that makes any difference. I'm not seeing a place to download this latest RAM BSL. Could you please point me in the right direction?
  • Aha, Found it. I'll let you know if it makes a difference. It does still work on the "working" computer.
  • Okay, more information:
    Switching to the 00.08.09.39 RAM BSL from 00.08.08.39 made no difference. However, connecting the target device through a usb 2.0 hub allows the process to work.

    So, the problem appears to have something to do with USB3.0 ports on a Microsoft Surface. The HP Spectre I'm using doesn't suffer this issue and it has USB 3.0 ports as well.
  • Hi Joshua,

    thanks a lot for your investigation. I will deliver this information to the team, and plan some update/testing for USB3.0 in our environment. Up to know we are still working with the USB2.0 most of the time. I'll let you know the update.

  • Hi Joshua,

    Fatmawati forwarded this issue to me and I am looking into this.  Just so that I am able to re-create your issue can you tell me which one of these setups will produce both the failing and passing cases:

    1)Failing scenario:   You have Microsoft Surface with Windows 10 pro.  You connect USB 3.0 hub to its 3.0 port or 2.0 port if it has one? 

    2) Passing scenario:  Microsoft Surface with Windows 10 pro.  You connect USB 2.0 hub to its 2.0 or 2.0 port if it has one?

    3) Passing scenario:  You have HP Spectre with Windows 10 pro also.  You connect USB 3.0 hub to its 3.0 port or 2.0 port if it has one?

    In Windows 10, Microsoft has put in a number of USB port options to save power to the ports when the host thinks that the port is not in use.  Can you verify that the port options for both the HP Spectre and Microsoft Surface are the same because it is interesting that BSL Scripter works on HP Spectre and not on Microsoft Surface when both have Windows 10.  Thanks for bringing this issue up!

    Regards,

    Arthi Bhat

  • Arthi,


    Sorry for the slow response. Answers below:

    If you need any more questions answered or want me to try something let me know.

    Josh

    >>>Fatmawati forwarded this issue to me and I am looking into this.  Just so that I am able to re-create your issue can you tell me which one of these setups will produce both the failing and passing cases:

    >>>1)Failing scenario:   You have Microsoft Surface with Windows 10 pro.  You connect USB 3.0 hub to its 3.0 port or 2.0 port if it has one? 

    It fails if I connect to any of the onboard USB 3.0 ports. It also fails if connected through the USB port (also 3.0) on the power adapter dongle.

    >>>2) Passing scenario:  Microsoft Surface with Windows 10 pro.  You connect USB 2.0 hub to its 2.0 or 2.0 port if it has one?

    I connect a usb 2.0 hub to one of the onboard usb 3.0 ports on the surface, and connect the MSP-FET to one of the ports on the USB 2.0 hub, and it then works fine.

    >>>3) Passing scenario:  You have HP Spectre with Windows 10 pro also.  You connect USB 3.0 hub to its 3.0 port or 2.0 port if it has one?

    In this case, I connected the USB-FET directly to one of the 3.0 ports on the Spectre laptop, or to one of the 3.0 ports on my docking station, or to one of the usb 3.0 ports on my keyboard. All three of these scenarios work fine.

  • Hi Joshua,

    I am not sure what is going on with the Microsoft Surface Book USB 3.0 port because on my Lenova computer that has USB 3.0 port, I am able to download firmware using the BSL Scripter.  Your HP Spectre also works fine.   All three computers (Spectre, Lenova and HP) have Windows 10 pro.  So this leads me to believe that this issue is probably a Surface Book port issue.

    You could try un-installing and re-installing the USB drivers and also check the power setting with the HP spectre.  Here is link that tells you how to set the port power option:  (see part 2):

    windowsable.com/.../

    My thought with the power option is that maybe during the delay built into BSL Scripter, that the port is either being suspended or put into low power mode.

    Finally do you have a way of capturing the USB logs?  If you do, that might be worth looking at.

    Regards,

    Arthi Bhat

      

  • Arthi,

    I've tried disabling every possible USB power management feature via the information you provided, and there's no change in behavior. Do you have a suggested method of making a USB log? Is this something you can do with WireShark or the like or do you need a usb protocol analyzer?

    Josh

  • Josh,

    I briefly read through WireShark and it looks like it can capture USB protocol.  I am not sure if it requires hardware to do this.  We use a Usb protocol analyzer (hardware and software). 

    Regards,

    Arthi

  • Hi Joshua,


    is there any update from your trial with USB BSL in the Microsoft Surface notebook?

  • The only thing to report is that turning off all the power management stuff had no effect, still the same failure. We have not yet found another PC that exhibits this issue.

    Regards,
    Josh

**Attention** This is a public forum