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.

MSP-GANG Programmer

Other Parts Discussed in Thread: MSP430F2272

Goodmorning,

I'm developing a software to program 8 MSP430F2272 in parallel.

I'm using VB.NET language and the MSP-GANG.dll.

The configuratio, creation and use of the image to program the devices work correctly, also the program and the verification, but when I try to use the "MSPGANG_GetProgressStatus", to check witch device go in fail, my application loops to infinite without returning any answer.

In my application I have declared the function as...

Declare Function MSPGANG_GetProgressStatus Lib "MSP-GANG.dll" (ByRef lpData() As Object) As Integer

and when I want to use the function, my call at the function is...

GANG_Status = MSPGANG_GetProgressStatus(ProgressStatus)

where Gang_Status is...

Public GANG_Status As Short

and ProgressStatus is...

Dim ProgressStatus(50) As Object

Where I'm doing wrong? It's the only command that doesn't work.

Have someone any solution to my problem?

There's a know problem about this function inside the DLL? I'm using the 1.1.3.0 version.

I'm waiting your answer ASAP because I'm stopped with my work.

Thanks in advance for your cooperetion.

Best regards,

Davide.

  • Hi Davide,

    I'm not aware of any issues with MSPGANG_GetProgressStatus - I've been able to use it successfully in the C and C++ example projects that come included with the MSP-GANG software download. So I don't think it is an issue with the function in the DLL - there aren't any known issues with that function.

    Have you seen the example projects? Go to your MSP-GANG install location: C:\Program Files (x86)\Texas Instruments\MSP-GANG\Examples and you'll see that there are a few different example projects that you can reference that use the DLL. I usually look at C_Applications_MSP_DLL because the C project is the simplest (the C++ one implements a GUI as well so it's a bit more complex to read through).

    The C project includes some examples of how MSPGANG_GetProgressStatus is used. In this case, a union structure called GANG_PROGRESS_STATUS is defined in the header file MSP-GANG.h (found under MSP-GANG\Examples\Lib). It explicitly defines every field of the GetProgressStatus response per the user's guide, and for each field whether it is a BYTE or WORD. Then in the code they are able to directly get at the various masks by using something like:

    	// ask DLL to populate this union with the results of the last main process 
    	union GANG_PROGRESS_STATUS results;
    	pMSPGangGetProgressStatus((BYTE *)results.bytes);

    And then later can use something like results.st.Connected_gang_mask to access just the mask for which targets connected successfully (and so on for each different field).

    I'd suspect your question or issue may have to do more with the way you are implementing the object "ProgressStatus(50)" in your code, but unfortunately I haven't used Visual Basic nearly as much as C.

    I did notice that it looks like you are making a 50 byte array maybe, but in the MSP-GANG.h file the structure  (line 1154) has a size of 52 bytes it looks like (PROGRESS_STATUS_SIZE + 4, where earlier in the header file PROGRESS_STATUS_SIZE is defined as 48).

    I would try implementing the structure if possible and then passing the pointer to it rather than trying to just make a generic array - it will probably be easier to use when you are trying to pull out individual bitfields later.

    I hope this helps get you un-stuck!

    Regards,

    Katie

  • Hi Katie,

    thanks for your reply.

    I have checked the example in the  C:\Program Files (x86)\Texas Instruments\MSP-GANG\Examples folder, but without any success.

     

    Please, is it possible to have some line of example code written for VB.NET?

    I'm always not able to use the MSPGANG_GetProgressStatus command.

     

    I hope in your answer with a bit of words of example.

     

    Thanks in advance for the cooperation.

     

    Regards,

    Davide.

     

  • Hi Davide,

    Unfortunately we don't have an example for this MSP-GANG with VB.NET, and I don't really use VB.NET myself. As I said though, I think it is probably not an issue with the DLL function itself as I've not heard of anyone having issues with this particular DLL function before, using a number of different languages and software environments. You may want to try to get help from a forum that focuses on VB.NET (unfortunately you're in a situation where I'm very familiar with the MSP-GANG, but not with the software environment that you are using).

    Did you try increasing the size of the byte array that you pass to the function? It looked like the one you were using was only 50 bytes and I think that the results are at least 52 bytes - you could just make it extra large like 100 bytes to be sure and then reduce the size to be more precise later once you have it working.

    Maybe try something like:

    Dim ProgressStatus(100) As Byte

    (again, I'm not much of a Visual Basic user so I could have some syntax or something slightly off, but I think you can see what I'm getting at - try making the array nice and large to prevent the result from running off the end of it)

    If this doesn't work, I'm not really sure where to go next and I think you'll need to get some help from someone more familiar with VB.NET.

    Regards,

    Katie

  • Hi Katie,

    I'm sorry that you, Texas Instruments, doesn't have example for all programming language.

    However yesterday I solved my problem and now I'm able to use the command in question.

    Thanks for all your replies.

    Regards,

    Davide

  • Hi Davide,

    I'm really glad to hear that you got it working!

    Unfortunately there are so many different languages out there that we cannot cover them all. I will provide your feedback on the need for a Visual Basic example to the owners of the MSP-GANG software though - I know Visual Basic was something we had an example for on the previous MSP-GANG430 so it would probably be good to have for the MSP-GANG now that it has taken over as the GANG solution.

    In the meantime if you wouldn't mind, could you please post what your problem and solution turned out to be to help other VB.NET users with MSP-GANG?

    Regards,

    Katie

**Attention** This is a public forum