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.

MSP430F5340: First time power up issue

Part Number: MSP430F5340

The MSP430F5340 is being used in a basic design on a board (drives a couple LED's based on analog input voltage from a Hall Effect sensor). The first time the board is powered up the MSP comes up in an error state. If power is cycled the MSP comes up correctly and works correctly from then on.

This board previously didn't have this problem. One difference I noted was that the die revision code on the MSP430F5340 is changed from I to K.

The older MSP marking is M430F5340 TI 3AI I AYH2 G4.

The newer MSP marking is M430F5340 TI 62I K C2PC G4.

Looking at the Errata sheet for the MSP430F5340 the only issue I noted that can be fixed by power cycling is JTAG 20, but that is common to both I and K die revisions.

I am in the process of getting an MSP430F programmer which should allow me to look at the state of the MSP on first power up versus second power up.

Any advice - maybe this problem has cropped up before - would be appreciated.

  • Hi William,

    I haven't encountered this issue and I hesitate to call it a device revision issue before exploring other options. However, thank you for providing such detailed information.

    I think the best thing to do is get your hands on a debugger and view what the code is doing. It looks like you're already one step ahead there! In the meantime I have a few questions for you:

    1. How do you know the device is in an error state?
      1. What are the symptoms?
    2. Have you monitored the supply during the first startup to check for glitches or proper voltage range?
    3. How many MSP devices have you tested and are experiencing this issue?
      1. Is it only the rev K devices?

    4. Is there a lot of variable initialization at code startup?
      1. Any large arrays?
    5. Are you using the WDT?

    Let's start from here and see where it takes us.

    Best regards, 

    Caleb Overbay

  • Caleb,

    Thanks for the reply - I was just able to get back to this now.

    I'm a neophyte as far as software and code is concerned. My primary experience is hardware.

    The MSP430F5340 is in a simple circuit that takes an analog input from a Hall Effect sensor and drives a couple LEDS based on that. The MSP is flashed with an Elpotronic FlashPro430 on the Spy bi wire interface. The FlashPro430 supplies its own 3.3V. The MSP can be successfully erased and programmed a number of times. I've done it myself.

    The problem occurs the first time the PC board the MSP is on is powered up. The MSP is programmed to flash the LEDS in different patterns for different problems. The problem pattern indicates "general firmware fault". Doing an erase and flash again with the MSP430 Pro gives the result below - for some reason it looks like not all the memory is being erased.

    Turning-ON Vcc
    JTAG communication initialization.... OK
    Verifying Security Fuse .................... OK
    Erasing memory ............................... done
    JTAG communication initialization.... OK
    All memory Blank checking............. failed
    --,,-- without protected area...... OK
    Flash programming .................... done
    Verifying check sum ......................... OK
    -------- D O N E --- ( run time = 4.1 sec.)

    When the PC board power is cycled the LEDS flash normally and the board works normally forever after.

    I've checked the 3.3V supply when the board is powered up. It's a pretty smooth ramp from 0 to 3.3V and takes about 150uS - no glitches or oscillations that I can see.

    Every PC board that I've checked exhibits the same behavior. I'm not sure its a K rev problem - I've found an I version that does the same thing.

    I don't think the MSP430Pro is a debugger - it's just used to flash the MSP430. I can pull the memory content off but it's just a couple zillion lines of hex code.

    I didn't write the code - I have no familiarity with code, just hardware. So when you talk about arrays and WDT I don't follow.

    Any advice you can give would be appreciated.
  • William Platt said:
    The problem pattern indicates "general firmware fault".

    You mean - firmware indicates error with some kind of output like LED (flash) code? This means chip itself is starting, but *firmware* fail to start at first power-on.

    I would say that this is firmware fault - it is likely timing-sensitive and slight changes of timing (reset release time, DCO or VLO frequency, oscillator startup time) causes *firmware* (not chip) fault. You shall contact developer of the code to debug it on new chips/boards. W/o having access to code and debugging, you have very limited options to fix something. Except IMHO one thing - try to increase or decrease reset circuit capacitor value and see how it goes on new revision chips.

    [edit] Other possibility would be - this is intended functionality of copy protection. Hopefully this is not the case :)

  • Caleb,

    Thanks for the response. By "reset circuit capacitor" do you mean the capacitor connected to pin 46 (RST/NMI/SBWTDIO) of the MSP430F5340?
  • William Platt said:
    By "reset circuit capacitor" do you mean the capacitor connected to pin 46 (RST/NMI/SBWTDIO) of the MSP430F5340?

    Yes.

  • Changing the value of the reset capacitor has no effect. Performing the logic sequence detailed in the MSP430F5340 Errata sheet (JTAG20) fixes the problem- is this a problem that is fixable in firmware?
  • Hi William,

    Are you using the Bootstrap Loader (BSL) to program the device? If that's the case then you could be experiencing JTAG20. It looks like you've already tested the workaround of toggling the TEST pin twice when nRST is high and after 50us pulling nRST low and it worked? To me this is a strong indication that this is your issue and the only workaround is either power cycling or performing this logic sequence.

    Best regards,
    Caleb Overbay
  • Hi William,

    Do you still need assistance with this issue?

    Best regards,
    Caleb Overbay

**Attention** This is a public forum