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.

Issue with MSP430G2443 Reset

Other Parts Discussed in Thread: MSP430G2433

Hi,

I am having issue with MSP430 reset. micro is getting input from LDO.

For testing purpose we have connected LDO to power supply and i am reducing voltage gradually. what  i am seeing is when VCC is between 2 V and 1.6V micro still not resets and it stops functioning. now even if i inscrease voltage to 4V etc without manually reseting MCU, it still doesn't functions properly. But if i do manual reset it will come back to normal operation. I am using 33k/2.2nF on RESET. 

how can i reset micro when voltage creeps down below 2V?

Thanks,

Abhishek

  • BOR for that device is around 1.20v (under 1us)  to 1.5v (100 us or longer brown outs) 
    As you are not going below the BOR, I guess the software is looking up due to brownout.

    That is maybe were the Watchdog maybe could help out, enable oscillator  error detection.
    or get a LDO with PG out going to reset pin, Or a MSP430 with SVS

  • Thanks for your reply.

    my next question is if i want to use watchdog in watchdog mode with 1 second interval i.e if count is not reset after 1 second it resets micro. how can i use this? what software commands i need to use?

    my clock setting is:

    DCOCTL = 0;
    BCSCTL1= CALBC1_8MHZ; // System Clock Settings
    DCOCTL = CALDCO_8MHZ; // use calibrated 8MHz settings

    thanks

  • You can use:

    WDTCTL = WDT_ARST_1000;  This is the same as:

    WDTCTL = (WDTPW+WDTCNTCL+WDTSSEL) ;, which is also the same as:

    WDTCTL = 0x5A0C; 

    which is basically writing the password, using watchdog mode, clearing the counter, using ACLK (expected to be 32.768Khz) and using an interval of 32768 counts.

    This is explained in the WDT Section of the User's Guide: http://www.ti.com/lit/pdf/slau144

    You can also find many examples for your device in http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/msp430_software_landing.page 

    Regards,

    Luis R

  • Thanks Luis.

    So if i use WDTCTL = WDT_ARST_1000; 

    i need to use same command at different points (kick the dog) in the software before count expires, right?

     

  • That's correct

    LR

  • Thanks Luis.

    one more question. 

    Instead of kicking dog very often how about kicking it in timer interrrupt routine loop which is 0.5 second loop.

    Thanks 

  • abhishek Sabnis said:
    Instead of kicking dog very often how about kicking it in timer interrrupt routine loop which is 0.5 second loop.

    WDT reset in ANY ISR is not good idea. Your main (loop) application code can be totally dead due to data corruption or improper code flow but timer will tick as nothing happened.

    Without doubt Watchdog is needed for robust applications, but it only seemingly solves your freq/VCC violation due to brownouts - because brownout can cause improper operation of microcontroller such a way that data is corrupted, application code does not work as expected but WDT is still cleared and WDT reset never happens.

    To safely run msp430 having no SVS at frequencies higher than 1MHz you need external reset - as already suggested, LDO with PG (Power GOod) signal or supply voltage supervisor/reset IC that release msp430 out of reset only at voltages safe to run desided clock frequency, in your case 8MHz.

  • What is MSP430F2443? In your first post, you said it stopped running when Vcc is lowered to <2V. Was it running at 8MHz? Most F2xx are specified to run at max. 7.5MHz at 2.2V.

  • Sorry for typo.

    Its MSP430G2433. it is running at 8MHz. 

    when we lower VCC to MCU from 1.6V to 1.5V  (~120mV window) MCU seems to be latched. i.e SW locks up.

    even if we increase voltage from this point on it remains latched up. 

    But below 1.5V it gets reset pulse and then it works fine.

  • What you observed are consistent with the specification.

    When Vcc is 1.8V, the specified max. System Frequency is 6 MHz. Thus it is not surprising that the CPU gets itself in trouble at 8 MHz when Vcc is only 1.6V. Once CPU is tangled up, raising Vcc cannot help it to get out.

    The BOR trigger point is specified typ. 1.35V. That is consistent with what you observed too.

  • Thanks Old_Cow.

    What is the solution over it.

    making system freq = 1MHz  will help ?

  • abhishek Sabnis said:
    making system freq = 1MHz  will help ?

    Yes. Apparently you missed my answer having other considerations

  • Ilmars said:
    WDT reset in ANY ISR is not good idea. Your main (loop) application code can be totally dead due to data corruption or improper code flow but timer will tick as nothing happened.

    In some of our projects project, I trigger the WDT inside the 1ms timer ISR. But only if a set of global triggers have been triggered at different points of the main code.

    Basically, the main code sets different global vars to a certain value. The timer ISR counts them all down to zero, and when one of these has reached zero, the timer ISR doesn't trigger the WDT anymore.

    This allows for long (planned) timeout times for different parts of the main code while still ensuring a quick reset if other parts don't answer anymore.

    abhishek Sabnis said:
    what  i am seeing is when VCC is between 2 V and 1.6V micro still not resets and it stops functioning. now even if i inscrease voltage to 4V etc without manually reseting MCU, it still doesn't functions properly. But if i do manual reset it will come back to normal operation. I am using 33k/2.2nF on RESET. 
    how can i reset micro when voltage creeps down below 2V?

    The Brownout reset circuitry is there to ensure the device gets reset if supply is below the required minimum for default operation. If you leave default operation conditions by increasing CPU speed, you're responsible yourself for supervising the proper supply. You may use an external voltage supervisor or the MSPs internal one (if available).

    If the CPU has crashed because voltage was insufficient for a raised CPU speed, then raising voltage won't make it restart. Either you go below minimum voltage to trigger a BOR, or trigger a hardware reset.

    A WDT may help, but before it triggers, the CPU may already have done some destructive erratic work.

  • Thanks Jens for reply.

    I tried using

    WDTCTL = WDT_ARST_1000; in my forever loop and timer. it seems to work quit well atleast revcovering part of it.

    I have two more things to try out as below before i think of external hardware or SVS MCU.  Let me know your take on it.

    1. Changing CPU speed to 1MHZ.

    2. change RESET RC timeing by changing R= 180K with C = 2.2 nF (for spy bi-wire)

  • abhishek Sabnis said:
    1. Changing CPU speed to 1MHZ.

    Definitely this one.  - If your application does not require faster clock.

    abhishek Sabnis said:
    2. change RESET RC timeing by changing R= 180K with C = 2.2 nF (for spy bi-wire)

    This have nothing to do with brownouts.

    If your supply have slow voltage ramp-up - you can include power-on delay in software. Don't change DCO freq right after reset but __delay_cycles() for time needed for VCC to ramp-up into safe range for >1MHz clock operation.

  • 1. Changing CPU speed to 1MHZ.

    Well, the datasheet tells you how fast you can go with which supply voltage.

    If you don't have a voltage supervisor, and experience voltage drops that are not triggering the brownout detector, then stay in the frequency range that is content with the brownout voltage.

    As you can see, required voltage and maximum frequency are linear (datasheet: recommended operating conditions).

    2. change RESET RC timeing by changing R= 180K with C = 2.2 nF (for spy bi-wire)

    The R/C on RST is only for the initial ramp-up of VCC. If VCC slowly creeps over the brownout threshold, the CPU is started. However, it might still not be enough voltage for operating the CPU, or the CPU start causes the voltage to drop a bit again, but within the brownout hysteresis.

    Having an R/C on VCC, it means that RST voltage is slower rising than VCC, keeping the CPU in reset until VCC doesn't rise anymore. It does not help when voltage drops later.

  • Thanks Jens for thorough response.

    One last thing. if i use LPM  will it help insted on frequency reduction.

    i.e let MCU go into LPM when VCC <2V. and wake up with interrupt.

    Thanks,

    Abhi 

  • abhishek Sabnis said:
    One last thing. if i use LPM  will it help insted on frequency reduction.

    Going into LPM0 is virtually the same as reducing MCLK to 0Hz. However, when you wake form LPM0 due to an interrupt, MCLK is at the old value again - and the same restrictions apply. So you may not leave LPM as long as the voltage is too low.

    However, you may reduce MCLK before you enter LPM, then wake up in an ISR (at still reduced MCLK) and check whether voltage is high enough again to go back to normal operation.

  • Hello guys,

    Sorry to come back to this topic again.

    I need clarification from TI MSP430G2433 expert about BOR condition.

    What we observed with MSPs are most of the MCUs are getting locked in that 140mV range below 1.8V and not coming out that condition unless POR is geneated. 

    But in case of very few MCUs if Vcc is increased to 3.33V  (when they are residing in that latch up condition) and kept constant at Vcc = 3.3V for about an hour CPU starts working fine which was unexpected.

    Any comments of this inconsistent behavior where sometimes MCUs are recovering from this latch/lock up condition and somtimes not .

    Thanks,

    Abhishek

  • The MSP requires 1.8V for operation. If you go below, the CPU will start to behave erratically, and finally crash. Raising the voltage afterwards will not ‘cure’ the situation.
    The BOR is triggered somewhat lower. This has a reason: the BOR reference is designed for working on low voltage and with low current consumption (as it cannot be deactivated). So it is not nearly as precise as the band gap reference for the ADC. So to avoid a BOR from triggering even above 1.8V on some devices, the BOR level is significantly lower than 1.8V (1.35V typ). Also the comparator is fairly slow (again due to low power consumption, as it has to stay on all the time). (btw: the 140mV are the hysteresis, so if BOR is triggered at 1.35V, it won’t release the CPU until at least 1.35+0.14V are reached again - it has nothing to do with “140mV below 1.8V”)

    As a result, the brownout will not be suitable to protect against very slow voltage drops. It wouldn’t be of much use anyway, as this kind of voltage drop (unless artificially created) usually happens on a depleting battery. And as soon as the MSP goes into reset, its current consumption drops and the voltage rises again, causing an oscillation.
    If you have problems with an instable supply, most MSPs provide a supply voltage supervisor (SVS), which has a more precise voltage reference and allows raising the trigger level, so it triggers for the voltages needed for >8MHz operation. But unfortunately, the G2x devices do not seem to have it. Well, they are optimized for price :)

**Attention** This is a public forum