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: hwo to upgrade to MSP_GANG from GANG430

Part Number: MSP-GANG

Dear All

   we use MSP-GANG because GANG430's no production. As reference MSG-GANG.pdf ,4.1 Gang430.dll Wrapper Description, we use wrapper GANG430.dll-, GANG430.ini, MSP-Gang.dll,copy these file to work directory. For example, need to download a program to a MSP2132 MCU. First we can download program success, but re-download ,there' a issue target Init Failed.

we compare the GANG430.ini :

GANG430
[MSP430 F2132]
DevId= 0xF213
DevIdxD= 0x02
MemDef1= R, 0x0200, 0x0200
MemDef2= I, 0x1000, 0x0040
MemDef3= I, 0x1040, 0x0040
MemDef4= I, 0x1080, 0x0040
MemDef5= I, 0x10C0, 0x0040
MemDef6= C, 0x10F8, 0x0008
MemDef7= M, 0xE000, 0x2000
VppToTest=1
SbwAble= 1
Vpp=22


wrraper

[MSP430 F2132]
Group= 2
DevId= 0xF213
DevIdxD= 0x02
MemDef1= R, 0x0200, 0x0200
MemDef2= I, 0x1000, 0x0040
MemDef3= I, 0x1040, 0x0040
MemDef4= I, 0x1080, 0x0040
MemDef5= P, 0x10C0, 0x0040
MemDef6= C, 0x10C0, 0x0040
MemDef7= M, 0xE000, 0x2000
VppToTest=1
SbwAble= 1
Vpp=22

Please help , Thank you!!!

  • Hi Yale,

    That error could be due to hardware connection issues. Can you try programming the board once with the MSP-GANG GUI and see what the result is?

    While using the GUI, can you also have them check the gang software revision and firmware versions?

    Best Regards,
    Brandon Fisher

  • Brandon,

    1.Use MSP-GANG GUI, use Interactive mode, it can programming the board.

    2.gang revision is below:

    --

    Thanks & Regards

    Yale

  • Thanks Yale,

    1.Use MSP-GANG GUI, use Interactive mode, it can programming the board.

    That indicates to me this is probably not a hardware issue. Can you have them download and try the latest version of the MSP-GANG DLL and GUI?

    https://www.ti.com/tool/download/MSP-GANG-SOFTWARE

    It should be 01.03.07.00.

    Is their application written in C or something else? Can they share which regions of memory they are trying to write on the device, are they locking JTAG/SBW as part of their code? 

    Best Regards,
    Brandon Fisher

  • Hi Brandon,

    The follow up from the customer:

    We must use VB6.0 upgrade to MSP-GANG from GANG430, there's 2 solution:

    1. For MSP-GANG.pdf 4.1 ,use wrapper , copy GANG430.dll, GANG430.ini, MSG-Gang.dll to working directory. We can only program 1 times, then 2 times

    LCD display target init Failed.

    2. For software examples c#,C , re-write by VB6.0, can loadImage, can download and get a correct result, but there's a error Runtimes'49', Bad DLL Convention. 

    Private Declare Function MSPGANG_GetProgressStatus Lib "MSP-Gang.dll" (lpData As Any) As Long

    Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal nLength As Long)
    Private Declare Function VarPtr Lib "MSVBVM60" (var As Any) As Long

    Dim pOutputArray As Long
    Dim tempBData As Byte
    Dim outputArray(0 To 51) As Byte
    pOutputArray = VarPtr(outputArray(0))

    VGangGetResult = MSPGANG_GetProgressStatus(pOutputArray) An error will be reported here.

    If VGangGetResult = 0 Then

    CopyMemory outputArray(0), pOutputArray, 52
    tempBData = outputArray(10)

    So, please help! Thank you very much!

    --

    Thanks & Regards

    Yale

  • Hi Yale,

    1. For MSP-GANG.pdf 4.1 ,use wrapper , copy GANG430.dll, GANG430.ini, MSG-Gang.dll to working directory. We can only program 1 times, then 2 times

    The fact that this is working at least once is confusing. There are no errors on the first program?

    2. For software examples c#,C , re-write by VB6.0, can loadImage, can download and get a correct result, but there's a error Runtimes'49', Bad DLL Convention. 

    The "Bad DLL Convention" error seems to be associated with a mismatch in argument types between the DLL and Code. Something in the lpData structure may have been updated since those examples were released.

    Aside from those DLL Convention errors, am I correct in interpreting your response as when using the examples you are able to program your code and watch the application run? If so that would tell me that the issue is probably not on your application code side. 

    Best Regards,
    Brandon Fisher

  • Hi Brandon,
    Thank you for your reply in detail!
    1. Use wrapper, it can program in first times,   we think some memory address is erased so that MSP-GANG programmer cannot re-connect MCU. Although we use GANG430 F
    2132 Unit information. We need a small code change if use this solution 

    2. You're right. It should be mismatch the argument about lpData which is void *pointer. Anyway I cannot find what is correct to match void * in C#. We use vb6.0 in Windows10 OS and copy MSP-Gand.dll to working directory.

    for example, we need *** parameter to check the result value of  current channel. As 3th channel, the result value is  00100000 , we can get it. There'r a Bad DLL Convention error after execute download function  because we need call MSPGANG_GetProgressStatus(void *lpData) function.  I am not sure which is conflict  with some VB syntax 

    4. Although we can download success with c# example, but both of red light and green light is on. But is not in GUI interface, only green light is on.

    Thank you so much for your help!

    --

    BR

    Yale

  • HI, Brandon

    About use VB6.0 and MSP-Gang.dll, MSPGANG_GetProgressStatus(void* lpdata) Here is a pointer to structure by Reference document , in C#  example, it's a byte*, in C example, it's a pointer to union. But we use Any in VB6.0, there's a error:

    Dim pOutputArray As Long
    Dim tempBData As Byte
    Dim outputArray(0 To 51) As Byte


    pOutputArray = VarPtr(outputArray)

    VGangGetResult = MSPGANG_GetProgressStatus(pOutputArray)   Error is here.

    Now, we add a "On Error Resume Next" before call download function,  Run Debug mode, it can download. but Make exe file,  This app interface Exit.

    Should be there's different between MSPGANG_GetProgressStatus(void* lpdata) and GANG430_GetGangResult(void* lpdata), Please help  me !

  • Hi,

    Brandon is out on leave so I'll be help with this thread. What support is needed here? 

    Based on my reading of the thread, it seems that this is an API problem between the customers application VB6.0 and the GANG DLL. Is this correct?

    This may be a tricky issue to debug, because the DLL is developed by a 3rd party and MSP doesn't have expertise in VB6.0 programming. Please let me know what next step should be.

    Regards,

    Evan

**Attention** This is a public forum