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.

BOOT loader and API firmware Commands in MSP-GANG

Other Parts Discussed in Thread: MSP-GANG

Hi,

We have some issues with using the latest MSP-GANG.

I coudn't find more details about BOOT loader and API firmware in the MSP-GANG manual.
Could you please let me know what is the difference between BOOT loader and API firmware commands?

We are trying to control MSP-GANG via firmware commands through RS-232.
 
The Synchronization Sequence-0x0D works fine and also the Get Progress Status (0xA5) command is successful.

But, when we try to start programming cycle with "send the Main Process Command"
as shown below, the MSP-GANG is returning NACK (0xA0).

​​Tx-->3e 31 04 04 00 00 00 00 3a 35

​The check-sum ​"3a 35​" is calculated as per the Manual.

Please let me know what could be the reason MSP-GANG is returning NACK?
Is there any mistake with the check-sum calculation in the above command.

Regards.
Prad

  • Hi Prad,

    Prad1 said:

    I coudn't find more details about BOOT loader and API firmware in the MSP-GANG manual. Could you please let me know what is the difference between BOOT loader and API firmware commands?

    The BOOT loader is not something that you as a user would normally mess with, but it is documented for reference - as you can see most of the command descriptions for the BOOT commands are labeled "Do not use this command." Basically, these are just commands that the MSP-GANG GUI uses to update the MSP-GANG firmware, which isn't something you'd really want to do yourself.

    The "API firmware commands that should not be used" (section 3.5.4 of the user's guide) are commands that would be used by the DLL if that was the method you were using to control the MSP-GANG. The MSP-GANG DLL is a very nice option for getting low-level control over the MSP-GANG over a serial connection without having to directly calculate all of the bytes for your commands - you can have specific control but still work at a higher level than having to directly control the RS-232 messages. I'd highly recommend trying out the DLL examples installed with the MSP-GANG software at C:\Program Files\Texas Instruments\MSP-GANG\Examples.

    Prad1 said:

    We are trying to control MSP-GANG via firmware commands through RS-232.

    It sounds like you are trying to control the MSP-GANG via a serial or USB connection - these are the commands documented in section 3.5.3 of the user's guide. Usually I'd only use this if the DLL wasn't an option (for example, if you are trying to control the MSP-GANG from some other controller that has RS-232 capability rather than having it controlled by a PC).

    Prad1 said:

    But, when we try to start programming cycle with "send the Main Process Command" as shown below, the MSP-GANG is returning NACK (0xA0).

    ​​Tx-->3e 31 04 04 00 00 00 00 3a 35

    ​The check-sum ​"3a 35​" is calculated as per the Manual.

    Please let me know what could be the reason MSP-GANG is returning NACK? Is there any mistake with the check-sum calculation in the above command.

    The checksum looks incorrect - instead of 3A 35 it should be C5 CA (I think you forgot to invert the result after doing all the XOR's). 

    CKL = INV[B1 XOR B3 XOR ... XOR Bn-1] = INV[3e XOR 04 XOR 00 XOR 00] = INV[3A] = C5

    CKH = INV[B2 XOR B4 XOR ... XOR Bn] = INV[31 XOR 04 XOR 00 XOR 00] = INV[35] = CA

     

    To help, I have documented here an example of how I have controlled the MSP-GANG over serial before:

    Here is some information on what I did (basically I followed the advice of section 3.5.3 of the MSP-GANG User's Guide, which suggests using the GUI to load your images and then use the COM port to select one of these pre-loaded images, then kick off and monitor the programming process).

    1. First I programmed my images that I am going to use later into the MSP-GANG using the GUI. The image below shows the settings that I used.

    For each different programming configuration image you want to have saved in the MSP-GANG memory, use the drop down to select an image number, set all of your settings, then click "Save to Image" to let the process complete.

    2. Now that you have all of your different images loaded in the MSP-GANG internal memory, you should be able to power cycle it, etc. and the images will stay in the internal memory of the MSP-GANG.

    3. Now we are going to use a USB COM port from a PC to select one of our images from the MSP-GANG memory and use it to program our part. You will need to close the GUI so that the MSP-GANG COM port will not be in use, then use a program like Docklight or Hyperterminal to control the programmer over USB. You'll need to set the COM port that your MSP-GANG is listed under in Device Manager, and then in Docklight I set up these settings: Baud rate = 115200, Parity = Even, Data bits = 8, Stop bits = 1 (I got these settings from the MSP-GANG User's Guide  section 3.2. You may need to use baud rate 9600 and the Select Baud rate command to change it if you are using RS232 instead of the USB COM port).

    Here is the command sequence I used to control the programming.

    1. Synchronization Sequence  (see MSP-GANG User's Guide section 3.3)

    TX: 0D

    RX: 90 (ACK)

    2. Select Image 0  (see MSP-GANG User's Guide section 3.5.3.1) - byte 4 sets the index in the MSP-GANG for the desired image, in this case 0 (the first image in memory)

    TX: 3E 50 04 04 00 00 00 00 C5 AB

    RX: 90 (ACK)

    3. Main Process (see MSP-GANG User's Guide section 3.5.3.2)

    TX: 3E 31 04 04 00 00 00 00 C5 CA

    RX: B0 (In Progress)

    4. Get Progress Status  (see MSP-GANG User's Guide section 3.5.2.10)

    Poll Get Progress Status command (TX: A5) until byte 6 of the response stops being B0 (In Progress) and becomes 90 (ACK).

    You can parse the fields of the Get Progress Status response to see if any of the devices failed or if they were successfully programmed - it includes information on what tasks are finished and even a byte for if there is an error code. It also returns the string currently displayed on the LCD screen.

    I hope this helps give you more information to successfully program your parts with the MSP-GANG using the Serial or USB COM port.

    Regards,

    Katie

**Attention** This is a public forum