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.

PSA algorithm on GANG430

Other Parts Discussed in Thread: MSP-GANG

Hey,

I try to implement the communication with a GANG430 programmer in python.

To get an idea how it work i sniffed on the serial port.

There are same things I don't understand.

First: the PSA algorithm

this is the sample code in c: (from the Manual rev Q)

for (PSA = StartAddr - 2, i = 0; i < Length; i++) { if (PSA & 0x8000) PSA = ((PSA ^
0x0805) << 1) | 1; else PSA <<= 1; PSA ^= Data[i]; }

This is what i have done in python:

psa=DEF_MAIN_START-2
for i in range(0,DEF_MAIN_LENGTH,1):
          if psa & 0x8000:
             psa = (((psa ^ 0x0805)<<1) | 1)
         else:
            psa <<=1
                            
        psa ^= data[i]


I feeded my python script with the same firmeware but cann't get the same PSA checksum from sniffing the port.

Second: in the manual for the GANG430  under 3.5.10 Load Image Checksum

the bytes  D9 : should be MSByte of the start address

and           D11: should be LSByte of the start address

same for the length  byte D12 : MSB and D14 : LSB

but I  can't see this in my sniffed sample....there is D9: LSB und D11:MSB....and the same for D12: LSB -D14 : MSB

Is this a fault in the manual???

Thanks in advance.

Regards,

Kay

  • Hi Kay,

    I have a few questions:

    1. Are you using the MSP-GANG (new, black with LCD screen) or the MSP-GANG430 (old, grey with LEDs)? I'm asking because they work differently.
    2. What are you trying to do with GANG?
    3. Did you know that there are MSP-GANG DLL examples provided with the download that show how to control it from a PC program (C or C++)?

    Regards,
    Katie
  • Hey Katie,

    i'm using  the old grey GANG :-)

    I need to use the GANG for a produktion programming.

    I can not use the GANG DLL because he is connected to an linux maschine. I didn't find any device lib for linux :-(.

    Did anyone know more about the GANG PSA checksum or about a fault in the datasheet or in my implemention?

    Regards,

    kay

  • Kay Matzke said:

    I can not use the GANG DLL because he is connected to an linux maschine. I didn't find any device lib for linux :-(.

    Did anyone know more about the GANG PSA checksum or about a fault in the datasheet or in my implemention?

    This one is working on linux, with open source interface without DLL's.

    http://forum.43oh.com/topic/2972-sbw-msp430f550x-based-programmer/?p=48762

    For what you need PSA? Only marginal read will check if target devices are flashed OK or not.

**Attention** This is a public forum