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.

all info memory block get erased on power on cycle

Other Parts Discussed in Thread: MSP430F2272, MSP430F1232, MSP430F149

Hi frds

I am working on MSP430F2272 MCU in my metering product, and where i using its info memory for saving energy related and calibration parameter of meter. writing is done once every 5 minites.

i tested 100 units of product by  putting them in loop circuit for 4 days. every thing working fine except in 5 pieces where info memory get erased completly (B&C both block used in meter but not A block). 

after intensive checking i find that it is happened during power on-off-on cycle only and in some pieces only.

as per my knowledge all settings are fine:

  1. System frequency is 16 Mhz by DCO. info memory writing is done on  [16MHz/49] = 325kHz.

  2. All intrrupts are deactivate by _DINT(),

what will be the reason and wht its solution?

Any type of insight  will be great help for me.

 

  • The only situation where I had a complete flash erasure was with the PIC controllers when we accidentally applied 9V VCC (broken 9->4V regulator, detected during QC). The PIC itself was not harmed but the flash content was gone.
    I never had it with an MSP.

    If it would happen on all pieces sooner or later, I would suspect a critical situation where the software triggers a mass erase instead of a segment erase under certain circumstance.

    But if it happens often with some and not at all with all other devices, this is strange. I rather suspect a problem with the power supply on these devices. Maybe an overshoot at power-on, or a spike when the power fades, something like that.

  • Hi Jens-Michael

    It seems me too a supply related problem because there is no problem when we provide power by programmer "elprotronics or FET" and perform a power on -off cycles.

    But there is one more difference in two supply, it is reset pin, programmer handle reset pin differenly than direct power supply (only RC circuit ). so by considreing problem of reset pin we use reset IC  and we tested on 5 pieces (we have only five IC) and work fine. now we will try on more piece.

    My doubt is..Is this possible? and what its reason.

  • If teh supply is done by the FET, adn the device runs under FET control, the FET will usually 1) have hte supply voltage readily available all the time and 2) hold the MSP in reset state and release it by a sharp-edged digital signal on teh RST pin.

    If oyu use an external supply, the RST pin is not controlled by a digital I/O but rathe rfloating or rising with VCC. So when teh supply is activated, RST rises with VCC. And might release the MSP for operation before VCC is stable.

    On MSPs without brownout circuit, this might be fatal. So we also had a reset controller (and external watchdog) attached to the MSP430F1232. But even on MSPs with brownout detection, one should have a capacitor to GND and a pullup toVCC. This ensures that as long as VCC is rising, RST is below VCC and considered digitally low, keeping the MSP in reset state.
    The slower VCC rises after switching on the supply, the larger the capacitor and/or pullup resistor need to be to keep the RST pin low until VCC has settled.

    However, this does not explain why there chip loses its data, unless your start with code that imemdiately after reset starts to write data and then fails because of the still too-low VCC. Remember, a write and especially an erase requires a relatively large current, and if the supply hasn't really settled, this might cause a sudden voltage drop, and additional reset and flash controller malfunction.

  • Hello,

    we are facing same problem as mentioned above.  we are using MSP430f149 controller. In some of our products program get erased. we are trying very hard to solve this issue. Some products come back from field with same issue. Code of MSP is five year old and we have not make any change. we are starting to face this issue from last four months before that all working fine.we have double verify parts quality that are used in production but not found any duplicate part.

     we are using same microcontroller and its basic network in our other products also.  we are not facing any issue in that products. 

    Any help will be appreciated .

  • Do u erase/program flash in the NMI ISR? It is risky since power is no longer stable.
  • Another possibility is, you increased the MCLK frequency from 1 MHz to 16 MHz without waiting for Vcc to reach the necessary level. The CPU may crash and wondered into Flash-Erase code by mistake.
  • i am programming Flash using JTAG FET tool.
  • i am using crystal of 8 Mhz then it is possible to erase flash ? IF it is possible then how can i solve this problem. I am using same controller network in my other products since last five years and never face this type of issue before.
  • If you increased the MCLK from 1 MHz to 8 MHz without waiting for Vcc to reach 2.1 V, the CPU may crash. But there is no guarantee that it must crash. And even when it crashes, it may not erase all the Flash memory -- depending on what the your code.

    To avoid this possibility, you need to wait for Vcc to rise to the required level before you attempt to increase the MCLK frequency.
  • i have put 10ms delay at start up and then go to set BCSCTL register for external 8 Mhz clock. Reset network on VCC pin is 22 Ohm resister and 10 uF || 0.1 uF capacitor.

    but still problem exist.

  • "Code of MSP is five year old and we have not make any change. "

    We had a similar problem: Code and layout were workignfor years and suddenly we had problems with the crystal. It turned out that our supplier had silently switche dto a different brand/model of the crystal which required different capacitors. The change was so subtle that not all devices failed, but only a few every now and then and not necessarily during build and test but some time later.

    So if the problem is new but code and layout are old, check the surrounding parts for changes. Maybe the voltage regulator, maybe the capacitors.
    When working in a big company, sometimes, the engineers aren't asked when the production switches to a cheaper component which might have (on first glance) the same base parameters but is cheaper. Of same part name but form a different manufacturer and with slightly different behavior. (like the lower common-voltage suppression on the RS485 drivers we used, which caused the RS485 communication to fail due to input saturation in some environments).
  • "i am using crystal of 8 Mhz then it is possible to erase flash "

    It seems so. For 1x family 8MHz operation, 3.6V VCC are required. If the suply voltage falls below, this doesn't mean the CPU will instantly crash. It migt or might not work for some time, accessing the flash for its code. Now at a certain point, the flash controller will fail to work properly with 8MHz. This may lead to a situation where it starts to act irregularly and maybe starting an erase cycle. on the currently read page or maybe even a mass erase.
    THis is not a verified situation but it would match the symptoms discussed in similar threads.
    A good idea would be to add an external voltage supervisor (or use th einternal one) to put the CPU into reset as soon as the 3.6V are no longer stable.
    When using the internal SVS, a failing supply will rese tth eCPU and releas eit ass oon as teh supply voltage is at 3.6V again. Howeve,r the internal SVS of the 1x family (if available at all) isn't ery precise, so t needs ot be programmed for a lower voltage (to not keep the CPU in reset forever). Which in turn means it will possibly allow it to continue with a voltage that is too low for 8Mhz.
    Well, much better than nothing. And an individual calibration of the SVS can be done to figure out the best setting for each device.

**Attention** This is a public forum