• Resolved

MSP430F5438A: DSLite version 7.2.0.2096 error: MSP430: Error connecting to the target: Unknown device

Part Number: MSP430F5438A

I am trying to make a simple system to program boards from the command line so UniFlash is not needed. I am running version 4.2.0.1490 of UniFlash. I create a "Standalone Command Line" package from within UniFlash. I take the uniflash_windows_64.zip and unzip it into a folder, run "one_time_setup.bat" then "dslite.bat", and DSLite (version 7.2.0.2096) always gives me the following error:

        Executing Startup Scripts: MSP430
Connecting...
error: MSP430: Error connecting to the target: Unknown device
Failed: Operation was aborted

I turned on logging in the dslite.bat batch file (-g blinker.log) and found the following in blinker.log:

0x000017EC 1201 3 MSP430 MSP C: MSP430_OpenDevice( MSP430F5438A, , 0, 0x0, 0 )
0x000017EC 6084 3 MSP430 MSP R: MSP430_OpenDevice( MSP430F5438A, , 0, 0x0, 0 ) = -1
0x000017EC 6084 3 MSP430 MSP C: MSP430_Error_Number()
0x000017EC 6084 3 MSP430 MSP R: MSP430_Error_Number() = 5
0x000017EC 6084 3 MSP430 MSP C: MSP430_Error_String( 5 )
0x000017EC 6084 3 MSP430 MSP R: MSP430_Error_String( 5 ) = Unknown device
0x000017EC 6084 3 MSP430 GTI R: GTI_CONNECT( 0x02666268 ) = 0xFFFFFFFF
0x000017EC 6084 3  PERF I: GTI_CONNECT finished:  4.884457s wall, 0.000000s user + 0.000000s system = 0.000000s CPU (n/a%)

I can get the device to program from UniFlash itself, but I want to use the command line tool for production. From UniFlash, I get the following in the log (from ds.log):

0x000016A4 344603 3 MSP430 MSP C: MSP430_OpenDevice( MSP430F5438A, , 0, 0x0, 0 )
0x000016A4 345270 3 MSP430 MSP R: MSP430_OpenDevice( MSP430F5438A, , 0, 0x0, 0 ) = 0

Why is DSLite failing and UniFlash succeeding? Is there a way to get the internal function "MSP430_OpenDevice()" to succeed from the command line through the DSLite tool? Please let me know.

Thank you,

Mike

  • Hello Mike,

    Thank you for your detailed post.

    My first suggestion would be to try updating to the latest offline version of UniFlash, which is version 4.2.1.1562. Perhaps this issue has been fixed.

    If that doesn't work, can you try using our online version of UniFlash and see if this issue still exists? I did this for our MSP430F6736 device, and the Standalone Command Tool worked fine. According to the output in the terminal, I was using DSLite version 7.2.0.2152.

    Here's the link to our cloud-based UniFlash: https://dev.ti.com/uniflash/

    Here are the instructions for generating the Standalone Command Tool: processors.wiki.ti.com/.../UniFlash_v4_Quick_Guide

    When running the two .bat files, you may need Administrator privileges. In the meantime, I'll loop in our Tools team to make them aware of this issue.

    Regards,

    James

    MSP Customer Applications

  • In reply to James Evans:

    Hello James,

    I downloaded and tried the new UniFlash (version 4.2.1.1562). This contains DSLite version 7.4.0.1095. I still received the "unknown device" error. Then I tried the online UniFlash version 4.2.0.1490, which contains DSLite version 7.2.0.2152, and I still am getting the "unknown device" error. I ran the Windows command prompt in Administrator mode in both cases (I am running this on Windows 7). I have been trying this out with the MSP-EXP430F5438 development board and the CCS v7 Blinker test code compiled to a .hex file.

    Can you try this out on your end with an actual MSP430F5438A part and see if it works for you? Maybe you could use the MSP-EXP430F5438 dev board if you have one.

    Here's what I've been seeing from the MSP-FET device itself. When the MSP-FET first tries to program, the red Mode LED blinks and the green Power LED stays off. It fails to program and the green power LED turns on. At this point, UniFlash gives me the option to retry, but DSLite just aborts. On the retry from UniFlash, the green power LED stays on while the red mode LED keeps blinking and the part actually gets programmed. Can you put this retry feature in the DSLite program, or could you just fix the code so that it retries on its own?

    I guess let me know if you can get this to work on a MSP430F5438A part on your end. I am running out of ideas on my end.

    Thanks,
    Mike
  • In reply to Mike Ostrego:

    James,

    I am going to try to attach the log from my trial with DSLite version 7.4.0.1095 and UniFlash Version: 4.2.1.1562.

    Mike

    0602.blinker.log

  • In reply to Mike Ostrego:

    Hello Mike,

    Thanks for the additional details and for the log file. I tried to duplicate your issue on my side with a target socket board, MSP-FET, and MSP430F5438, but everything worked as expected using the cloud-based UniFlash CLI and the msp430x54x_fet_1.c.out file generated in CCS v7.2.0. My PC is Windows 7 64-bit as well.

    Did you purchase your MSP-FET recently? Also, can you tell me which version of CCS v7 you have?

    Regards,

    James

    MSP Customer Applications

  • In reply to James Evans:

    Hello Jason,

    My MSP-FET and MSP-EXP430F5438 experimenter board were purchased in May of this year. The sticker on the MSP-FET box shows "SEAL DT 10/25/16".

    I am currently using CCS v7.2.0.00013, but I have installed several updates since the initial install of CCS 7.2.
    From the Installation History tab in CCS:
    8/3/17, 12:26:24 PM CDT Installed Code Composer Studio 7.2.0.00013.
    8/3/17, 12:41:49 PM CDT Installed org.eclipse.rtsc.xdctools:3.32.2.25, org.eclipse.rtsc.xdctools:3.50.2.20
    8/15/17, 10:01:44 AM CDT Updates include: com.ti.cgt.msp430.16.win32,com.ti.msp.debug_probe,com.ti.msp430.ccs_header_files,com.ti.msp430.gcc_header_files,com.ti.msp430.support_files
    9/20/17, 10:25:24 AM CDT Updates include: com.ti.gcc.msp430.win32
    10/10/17, 9:39:47 AM CDT Updates include: com.ti.dsflash.win32

    As a test, I tried using the .out instead of the .hex file (since you said you had tested with msp430x54x_fet_1.c.out). I'm still receiving the "Unknown device" error with the .out file when running the dslite.bat file.

    Do you think there is an issue with the MSP-FET firmware? Is there a way for me to tell what version of firmware is running on the MSP-FET?

    Regards,
    Mike
  • In reply to Mike Ostrego:

    Hello Mike,

    Thank you for the additional information. I'm sure this will help our Tools team figure out what's going on. I've looped them in and am waiting for their feedback.

    While we try to figure out the issue with the CLI package, another command line tool that we offer is MSP430-FLASHER. I used the following command to check the MSP-FET's firmware version using the command "MSP430Flasher.exe -i DETECT" executed in a terminal window while inside the MSPFlasher folder (for me it's C:\ti\MSPFlasher_1.3.15). If the firmware is too old, then MSP430-FLASHER may not show it. When executing the command above when the MSP-FET has an older firmware version, it will probably ask you to update the firmware.

    You could try installing and using the latest MSP430-FLASHER to upgrade your MSP-FET's firmware and then try programming the MSP430F5438A. I've included the MSP Flasher's User's Guide below for your reference. Section 3 contains the available Triggers and Arguments, and Section 4 contains Exit Specifications. Section 7 includes several example commands for loading and executing code from a .txt file.

    If you have any questions about the MSP430-FLASHER or encounter any issues, please let me know. Hopefully, this helps you move forward in your development.

    Regards,

    James

    MSP Customer Applications

  • In reply to James Evans:

    Hello James,

    I tried the MSP Flasher v1.3.15 software with the -i DETECT option. It said that the FET firmware was up to date.
    The rest of the information I pasted below:
    * Arguments : -i DETECT
    * -----------------------------------
    * Driver : loaded
    * Dll Version : 31001000
    * FwVersion : 31000003
    * Interface : DETECT
    * HwVersion : U 3.0
    * JTAG Mode : AUTO
    * Device : MSP430F5438A
    * EEM : Level 7, ClockCntrl 2
    * VCC OFF

    I decided to try to use the Flasher software to program the MSP430 from the command line. With the .hex file as-is from the CCS software, the Flasher came back with "ERROR: File type could not be identified." I then changed the first character of each line of the .hex file from "%" to ":". The Flasher software then came back with "ERROR: Error within Intel Hex file. I tried with both Unix and DOS EOLs, same error in both cases.

    As a final shot at this, I set out to find how to make TI text files in the compiler. In Project -> Properties -> CCS Build -> MSP430 Hex Utility, I clicked on "Edit Flags..." and added "--ti-txt". I then tried the MSPFlasher with the TI text file produced by the Hex Utility. It works. I now have a way to program the TI MSP430 parts from the command line.

    In conclusion, don't get rid of the MSPFlasher program. I saw in several places it is deprecated, but it seems that right now, it is the only way for some chips to be programmed from the command line.

    Regards,
    Mike
  • In reply to Mike Ostrego:

    Hello Mike,

    Thanks for the update. I'm glad to hear that the MSP430-FLASHER works well for you with the TI text file. Even though certain flags/features are deprecated, I don't expect that the MSP430-FLASHER will go away any time soon.

    I haven't heard back yet from our Tools team about the CLI issue, so just continue using the MSP430-Flasher moving forward. If you have any more issues, please let me know.

    Regards,

    James

    MSP Customer Applications

  • In reply to James Evans:

    Hello James,

    Thanks, I will continue to use the MSP Flasher software for now. If the Tools team solves the CLI issue, please respond on this thread so I will know to update my UniFlash installation.

    Regards,
    Mike
  • In reply to Mike Ostrego:

    I'll do that. If you have any other issues, don't hesitate to let us know.

    Regards,

    James

    MSP Customer Applications