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.

Running Loaded Program Without Emulator

Does anyone know what might cause my program to run fine when hooked up to the emulator but not run at all when in stand alone operation?

I have been working on a program for the past few weeks, and everything is working great in the debug session with the emulator hooked up. Now that I am done, I want to unhook the emulator and run the program in its own stand alone circuit. When I disconnect the emulator and power up the micro controller, the program does not execute. I have made sure that the micro controller has power, that the ~RST/NMI pin is pulled high, and I have checked to make sure that the address contained at the reset vector location (0xFFFE) is not 0xFFFF. 

Any insight would be greatly appreciated.

Thanks!

  • Are you sure the program was actually uploaded? Or did it run in simulator rather than emulator? If so, it was never put onto the MSP at all. (you'd be surprised how often people fall into this trap).

  • I am not sure how to tell if it is running in simulator or emulator. How can I tell? When the emulator is hooked up, I click the "Debug Launch" button in CCSv4 and the debug window comes up. After the "build complete" notification the following notification says that the program is loading.

  • Zack Bomsta said:
    I am not sure how to tell if it is running in simulator or emulator.

    It's configured in the project settings 'run in simulator' or 'run in emulator' or so.The default is simulator.

  • "It's configured in the project settings 'run in simulator' or 'run in emulator' or so.The default is simulator."

     

    I did not find any settings for running in the simulator or the emulator modes. All I found was an option for an output type (which is set to executable).

    I really appreciate your help!

  • You said earlier: "... and everything is working great in the debug session with the emulator hooked up."

    Have you ever tried to run a debug session without the emulator hooked up? If it is working great too, then you are using the simulator, not the emulator.

     

  • You asked, "Have you ever tried to run a debug session without the emulator hooked up?" 

     

    Yes, and when I do I get an error message saying error initializing emulator, no USB FET was found, so I guess that answers the question about whether or not I am running in simulator or emulator mode. Thanks for the sure way to check! 

  • Okay, one thing that come sin mind is teh reset logic. Just pulling RST high won't do the trick. You'll need a pullup resistor in combination with a pulldown capacitor (e.g. 10k/100nF), so RST won't come up simultaneously with the VCC, or else the MSP tries to start as soon as teh browout voltage is reached, which is too early for the correct operation. With the capacitor, RST will stay low for some time and only reach the high level when the VCC has settled.

    Remember, 'high' is relative to VCC, so if VCC is 1V, 0.5V are still considered 'high' by the analog circuitry.

  • Jens-Michael Gross said:

    ... You'll need a pullup resistor in combination with a pulldown capacitor (e.g. 10k/100nF), so RST won't come up simultaneously with the VCC, or else the MSP tries to start as soon as teh browout voltage is reached, which is too early for the correct operation. ...

    I disagree with that. I think the capacitor there is recommended for noise immunity. MSP430 on-chip POR/BOR circuit will generate a delay to hold internal reset signal without the help of any off-chip RC at the RST/NMI pin.

  • old_cow_yellow said:
    POR/BOR circuit will generate a delay to hold internal reset signal without the help of any off-chip RC at the RST/NMI pin.

    YEs and no. The BOR threshold voltage is far below of what is needed for proper execution. And without the capacitor, RESET is always considered high (as it is alwys VCC) during VCC rising. So there is no delay generated (since there is no RESET signal at all). and the MSP immediately starts running when the BOR threshold is reached (plus a small delay, which is too small for a slowly rising VCC).

    If it is ensured that VCC rises from BOR voltage to operating voltage in a time smaller than the internal BOR reset delay, then you're right. But often this is not the case, especially if you switch the power supply on and off and not the output voltage of the power supply.

  • Jens-Michael Gross said:

    ... If it is ensured that VCC rises from BOR voltage to operating voltage in a time smaller than the internal BOR reset delay, then you're right. But often this is not the case, especially if you switch the power supply on and off and not the output voltage of the power supply.

    It is true that there are situations that BOR cannot provide an adequate internal reset. However, under those situations, any RC combination on the RST/NMI pin would not help.

    The internal BOR delay starts after Vcc reaches a certain level. The external RC on the RST/NMI  pin is connected to Vcc all the time.

    -- OCY

     

  • There's a simulator in CCS4?

  • dilbertclone said:
    There's a simulator in CCS4?

    AFAIK, no. But in the original post, it was not mentioned that CCS4 is used. :)
    I think we overlooked it in the later posts.

     

**Attention** This is a public forum