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.

MSP430G2553 Software reset

Other Parts Discussed in Thread: MSP430G2553

 

Hi,

How can I perform a software reset with my MSP430G2553?

I try to apply:

SVSCTL |=  PORON;

But this register and value are not recognized.

Thanks,

Yael

  • Yael Oz said:

    How can I perform a software reset with my MSP430G2553?

    I try to apply:

    SVSCTL |=  PORON;

    But this register and value are not recognized.

    This is not how the PORON bit in the SVSCTL is meant to be used.  As the MSP430x2xx Family User's Guide (SLAU144) indicates in Chapter 9, the PORON bit is an enable for the SVSFG flag to generate a POR.  Figure 9-1 illustrates this.

    To generate a reset from software, one method is to use the Watchdog Timer module.  In Section 10.2, the above document indicates any write to WDTCTL with any value other than 05Ah in the upper byte is a security key violation and triggers a PUC system reset regardless of timer mode.

  • Hi,

    Thank you for your answer! it works!

    I have one more open issue - I need a non-volatile place in the memory in order to save a value after the reset I performed.

    Where can I find the address mapping of the LaunchPad? Which section is non-volatile?

    Yael

  • Hi,

    You can use info memory inside MCU. You can check memory organization section of G2553 datasheet.

    Regards

    Deepak

  • Hi,

    I saw the memory organization in the datasheet. Thanks,

    Can you please tell me which section is non-volatile? This information is not in the datasheet.

    Thanks,

    Yael

  • The flash memory is non-volatile.  The RAM is not.  Look at Table 8 in the datasheet.  The flash is associated with the Memory labeled "Main" and "Information memory".

  • Yael Oz said:
    Thank you for your answer! it works!

    Please notice that a watchdog reset causes a PUC and not a POR. That means, some registers aren't initialized to power-on-defaults. Especially the SVS and timer registers are untouched (to allow timing consistency across a watchdog event).
    So if you had timers active, and maybe interrupts, before the PUC, then the timers are still 'armed' and will continue triggering interrupts (or have already some pending) as soon as you set GIE - even if your code didn't (re-)initialize the timers at this point of execution and therefore doesn't expect interrupts.

**Attention** This is a public forum