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.

MSP430F5342: About MSP-GANG Checksum and Verify

Expert 2785 points
Part Number: MSP430F5342
Other Parts Discussed in Thread: MSP-GANG,

Hi experts,

Could you tell me about Verification and CheckSum of MSP-GANG-SOFTWARE(GUI) and MSP-GANG(HW)?
The device is writing to MSP430F5342.

Q1: When I press the "Verify" button of MSP-GANG-SOFTWARE (GUI), do you compare "Flash memory inside the CPU where the program is actually written" and "Program data to write (For example, the .txt file.)" for each 1Byte?
*From "Figure 2-1. Main MSP Gang Programmer Dialog GUI, Interactive Mode" in "MSP Gang Programmer (MSP-GANG) User's Guide"

Q2: When I press the "Verify" button of MSP-GANG-SOFTWARE (GUI), is there no difference in the verification method whether it is done via BLS or JTAG/SBW?

Q3: When the MSP-GANG(HW) is run standalone, is the value of Checksum displayed on the screen as a result of calculation using the "3.4.2 Checksum" method in "MSP Gang Programmer (MSP-GANG) User's Guide"?
Or is it the result calculated by the "3.5.4.7 Verify Image Check Sum Command" method?
*From "Figure 2 -10. Image Option" in "MSP Gang Programmer (MSP-GANG) User's Guide"

Q4: Is it correct to understand that the result calculated by the method of "2.1.13 Checksum Calculation" is the verification of "Program data to write (For example, .txt file.)" and has nothing to do with the result of Q3 above?

Q5: Is the result of Q3 above the same as "2.4.2 Checksum" in "MSP 430 TM Flash Devices Bootloader (BSL) User's Guide"?

Q6: When the MSP-GANG(HW) is operated standalone and the "GO" button is pressed to execute JTAG communication write (8 devices), the following actions are recognized.
Erase- > write program- > verify- > checksum- > all complete- > repeat for second device.
If an error occurs in Verify and Chechsum after a program has been written, will the written program be erased?

Best Regards,
O.H

  • Hello,

    O.H said:
    Q1: When I press the "Verify" button of MSP-GANG-SOFTWARE (GUI), do you compare "Flash memory inside the CPU where the program is actually written" and "Program data to write (For example, the .txt file.)" for each 1Byte?
    *From "Figure 2-1. Main MSP Gang Programmer Dialog GUI, Interactive Mode" in "MSP Gang Programmer (MSP-GANG) User's Guide"

    According to Section 2.1.1.5,

    Click the Verify button in the Main Dialog GUI to verify that the contents of the target MCU's flash memory have been properly programmed. This function is best used after programming the same segment of memory, as performed using the button described above. Make sure that the same memory segments are enabled in the Memory Options configuration window shown in Figure 2-2, as during programming described above, to ensure all programmed segments are verified (Section 2.1.5 describes in detail how to use the memory configuration window). Verification of selected flash memory is divided into two steps: (1) verify selected flash memory that only corresponds to the code file, and (2) verify selected flash memory that corresponds to the code file AND selected flash memory not included in the code file that should be empty (0xFF). Examples of selected flash memory include Main Memory, All Memory, or User defined, with the exception of Retain Data (if defined). Verified flash memory that only corresponds to the code file is displayed in the GUI using VerifyXXXX messages, where XXXX is the start address of a contiguous code segment. Verified flash memory that corresponds to the code file AND flash memory not included in the code file is displayed in the GUI using Gl.Verify-XXXX messages; where XXXX is the start address of a contiguous code and empty data segment. Each contiguous segment is verified using a checksum (CS) and pseudo-signature analysis (PSA). Verification passes if the CS and PSA match between flash memory and the code file.

    O.H said:
    Q2: When I press the "Verify" button of MSP-GANG-SOFTWARE (GUI), is there no difference in the verification method whether it is done via BLS or JTAG/SBW?

    It should be the same even though the programming interface may be different.

    O.H said:
    Q3: When the MSP-GANG(HW) is run standalone, is the value of Checksum displayed on the screen as a result of calculation using the "3.4.2 Checksum" method in "MSP Gang Programmer (MSP-GANG) User's Guide"?
    Or is it the result calculated by the "3.5.4.7 Verify Image Check Sum Command" method?
    *From "Figure 2 -10. Image Option" in "MSP Gang Programmer (MSP-GANG) User's Guide"

    Section 3.4.2 describes the checksum that's performed on the communication commands. Section 3.5.4.7 is describing the commands used between the MSP-GANG and the GUI to perform the image checksum, not the communication command checksum.

    O.H said:
    Q4: Is it correct to understand that the result calculated by the method of "2.1.13 Checksum Calculation" is the verification of "Program data to write (For example, .txt file.)" and has nothing to do with the result of Q3 above?

    Correct.

    O.H said:
    Q5: Is the result of Q3 above the same as "2.4.2 Checksum" in "MSP 430 TM Flash Devices Bootloader (BSL) User's Guide"?

    This is referring to the checksum that's performed on the communication commands, not on the image.

    O.H said:
    Q6: When the MSP-GANG(HW) is operated standalone and the "GO" button is pressed to execute JTAG communication write (8 devices), the following actions are recognized.
    Erase- > write program- > verify- > checksum- > all complete- > repeat for second device.
    If an error occurs in Verify and Chechsum after a program has been written, will the written program be erased?

    The verify step is performing the checksum. Since it's after write, it's checking if the image was written correctly. If not, the verification will fail, but it will not erase the device until you start the process over.

    Regards,

    James

  • Hi James,

    Thank you for your reply.

    James Evans said:

    According to Section 2.1.1.5,

    Q7:In other words, When I press the "Verify" button of MSP-GANG-SOFTWARE (GUI),The result of executing "2.1.13 Checksum Calculation" on the contents of the flash memory are compared to the "2.1.13 Checksum Calculation" on the code file.
    In addition, the PSA for the contents of the flash memory are compared to the PSA for the code file.
    Is this correct?

    Q8:Is the CRC the same as the content of the PSA?
    Sorry for the low-level question, but I am not able to clearly distinguish between PSA and CRC as explained in the following thread and would appreciate a brief explanation.
    https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/538213?MSP-GANG-Image-CRC

    Best Regards,
    O.H

  • Hi,

    O.H said:
    Q8:Is the CRC the same as the content of the PSA?
    Sorry for the low-level question, but I am not able to clearly distinguish between PSA and CRC as explained in the following thread and would appreciate a brief explanation.
    https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/538213?MSP-GANG-Image-CRC

    Is the PSA algorithm the same as the one in "3.5. 10 Load Image Checksum" in "MSP 430 Gang Programmer (MSP-GANG 430) User's Guide"?
    Is the recognition that CRC is the value calculated by the above algorithm correct?

    In addition, could you please answer about Q7?

    Best Regards,
    O.H

  • Hello O.H,

    I'm looking into your questions and should have a reply by Friday at the latest.

    Thanks,

    James

  • O.H said:
    Q7:In other words, When I press the "Verify" button of MSP-GANG-SOFTWARE (GUI),The result of executing "2.1.13 Checksum Calculation" on the contents of the flash memory are compared to the "2.1.13 Checksum Calculation" on the code file.
    In addition, the PSA for the contents of the flash memory are compared to the PSA for the code file.
    Is this correct?

    Correct. Section 2.1.1.5 discusses what happens when the "Verify" button is pressed. Basically, each contiguous segment is verified using a checksum (CS) and pseudo-signature analysis (PSA). Verification passes if the CS and PSA match between flash memory and the code file.

    The unspecified byes in the .txt file are considered blank (0xFF) and are ignored for the CS. Also, when BSL is used, PSA is not calculated, just CS.

    O.H said:
    Is the PSA algorithm the same as the one in "3.5. 10 Load Image Checksum" in "MSP 430 Gang Programmer (MSP-GANG 430) User's Guide"?
    Is the recognition that CRC is the value calculated by the above algorithm correct?

    I'm assuming it is the same algorithm, but I'll need to confirm it.

    Regards,

    James

  • Hi James,

    Thank you for your answer.

    I understood the contents of "Verify".

    Best Regards,
    O.H