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 Software Development Questions

Other Parts Discussed in Thread: MSP-GANG, MSP430F5341

Hello all,

I am writing a custom application that uses the MSP-GANG programmer for flashing MSP430F5341 chips, and another batch programmer for flashing other chips on the same target boards. I am able to successfully program the MSP430s, by creating an image in the MSP-Gang memory, and then calling the MSPGANG_MainProcess() function. I am using using MSP-Gang.dll version 1.01.00.00 (Oct 25, 2012).

So, my question: How can I toggle (not cycle) the target devices' Reset lines for an arbitrary length of time? (If any TI reps are reading, I did ask about this, but have not yet heard back--SR# 1-881 749 754.)

On each target board, the MSP430 chip controls the programming lines for the other chip, such that in order to program the other chip from an external source, the MSP430 must be held in reset. So what I want to do is to be able to issue a command (which?) to the MSP-Gang that holds the MSP430s' Reset pins low indefinitely. Then I will program the other chips; then I will send another command (which?) to the MSP-Gang to release the MSP430s' Reset lines.

I was thinking maybe the MSPGANG_SetTmpGANG_Config() function with CFG_TMP_RESET would do what I'm looking for, but so far that command does nothing by itself, even though it reports ERR_NONE.

Thanks for any help you can offer.

Brendan

  • Brendan McDonnell said:

    I was thinking maybe the MSPGANG_SetTmpGANG_Config() function with CFG_TMP_RESET would do what I'm looking for, but so far that command does nothing by itself, even though it reports ERR_NONE.

    Hi Brendan,

    When you use MSPGANG_SetTmpGANG_Config() you change something in the configuration that is used when the Main Process command executes. So any changes you make are changes to the configuration, and just like with the normal gang image configuration it won't have any direct effect on the MSP430 parts until Main Process is next used. So after you make all of your calls to MSPGANG_SetTmpGANG_Config() to set up all the parameters of your temporary configuration for resetting your parts, you still need to call MSPGANG_MainProcess() before the reset will actually happen. Please see section 3.5.3.3 Set Temporary Configuration in MSP-GANG Command in the MSP-GANG User's Guide.

    Hope this helps!

    Regards,

    Katie

  • Hi Katie,

    Thanks for the response.

    Katie Enderle said:
    So after you make all of your calls to MSPGANG_SetTmpGANG_Config() to set up all the parameters of your temporary configuration for resetting your parts, you still need to call MSPGANG_MainProcess() before the reset will actually happen.

    Can you be more specific about the sequence of function calls required?

    So far, I've tried the following, but I still have observed no results.

    MSPGANG_SetTmpGANG_Config(CFG_TMP_RESET, 1);  // 1 == enable
    MSPGANG_SetTmpGANG_Config(CFG_TMP_TASK_MASK, RST_AND_START_FW_BIT | CONNECT_TASK_BIT);
    MSPGANG_MainProcess(10); // 10s timeout

    I've tried with and without the CFG_TMP_TASK_MASK; with and without the CONNECT_TASK_BIT; and I have reversed the order of the two MSPGANG_SetTmpGANG_Config() statements.

    Recall that what I'm trying to do here is not just to pulse the reset line; but rather, to have the MSP-Gang hold the target MSP430s in reset, until it is commanded otherwise.

    Katie Enderle said:
    Please see section 3.5.3.3 Set Temporary Configuration in MSP-GANG Command in the MSP-GANG User's Guide.

    Thanks for the reference. I'm continuing to look there.

    Regards,

    Brendan

  • Hi Brendan,

    I've done a little testing with an MSP-GANG trying to see the best way to achieve what you are doing, and the behavior I am seeing it appears that actually I was mistaken - it looks like the CFG_TMP_RESET actually does cause the line to go low immediately (without the main process command). I think this is indicated in the user's guide but I had misinterpreted it before (most parameters don't take effect until running Main process again, but the CFG_TMP_RESET and CFG_TMP_VCC_ONOFF say in section 3.5.3.3 that they "Immediately" reset or power the part, and this is matching what I'm observing with a scope on the RST line) . I'm going to check with our tools team that writes the code for the MSP-GANG to confirm this is correct.

    So I'm thinking instead what you would need if you want to keep the RST lines held low is to set the CFG_TMP_RESET to 1 using the MSPGANG_SetTmpGANG_Config command and then to wait however long until you want the RST lines to be released before calling other commands like main process - after main process executes the temp configuration is erased and settings return to the settings from the image, so this would explain why calling main process right after you set the temp config to hold the reset line low, you were seeing it just toggle low instead of staying low.

    UPDATE: I just got confirmation from the MSP-GANG designers. The CFG_TMP_RESET and the CFG_TMP_VCC_ONOFF will take effect immediately when the MSPGANG_SetTmpGANG_Config is called, while all other parameters are not used until MainProcess is called. So you just need to set CFG_TMP_RESET and shouldn't call MainProcess if you want to keep the RST line held low, because after MainProcess finishes the temp configuration is cleared.

    Regards,

    Katie

  • Katie,

    Thanks for clarifying. I was wondering about that bit in the User's Guide.

    Katie Enderle said:
    I've done a little testing with an MSP-GANG trying to see the best way to achieve what you are doing, and the behavior I am seeing it appears that actually I was mistaken - it looks like the CFG_TMP_RESET actually does cause the line to go low immediately (without the main process command).

    I recently noticed that CFG_TMP_RESET is causing an immediate effect on the (classic) JTAG reset line, by which I mean RST/NMI. Since we are using Spy Bi Wire (SBW), we need to hold TDO low. I tried

    MSPGANG_SetTmpGANG_Config(CFG_TMP_INTERFACE, INTERFACE_SBW);
    MSPGANG_SetTmpGANG_Config(CFG_TMP_RESET, 1); // enable

    but that did not affect TDO.

    Is there a way to have CFG_TMP_RESET affect TDO? Or should I be using some other function--perhaps MSPGANG_Set_IO_State()? (I'm just starting to look into that one now.)

    Thanks,

    Brendan

  • Brendan McDonnell said:
    Or should I be using some other function--perhaps MSPGANG_Set_IO_State()? (I'm just starting to look into that one now.)

    FYI, I tried

    byte ioCfg[8] = { 2, 0xFF, 0, 0, 0xFF, 0, 0, 0 }; // TDIO, all targets, don't care, LOW, Vcc enb (all), Icc HI disable, spare, spare
    MSPGANG_Set_IO_State(3300, ioCfg);

    It only produced a ~0.5ms pulse on TDO.

  • Hi Brendan,

    Would it be possible in your hardware to connect the RST line from the MSP-GANG to the MSP430 RST instead of connecting the MSP-GANG TDIO line? If so, then you can setup your normal programming configuration to use RST line for SBW using SetConfig:

    MSPGANG_SetConfig(CFG_IO_INTERFACE, 1); //sets to use RST from GANG instead of TDIO for SBW programming

    And then when you get to where you want to hold the device in reset you could use the MSPGANG_SetTmpGANG_Config command like you tried before to be able to hold the device in reset immediately.

    MSPGANG_SetTmpGANG_Config(CFG_TMP_RESET, 1); // enable
     
    Regards,
    Katie

**Attention** This is a public forum