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.

MSP430FR5949: System reset flag can not be cleared

Part Number: MSP430FR5949

Hi expert,

My customer met a weird issue. 

they want to distinguish the reset type, in detail

  • SVSHIFG -- stands for battery insert
  • PMMRSTIFG -- stands for external reset
  • WDTIFG -- stands for watchdog reset

but when they monitor the relevant register, they found these scenarios:

  • SVSHIFG and PMMRSTIFG may be 1 at the same time.
  • Once the flag is set, it is always 1, the custoer try to clear it by software, and they will meet the code running away

and I think it does not match the datasheet and TRM:

could you kindly tell me why these two flags are 1 together and could you give a method to clear them,  I need the exact code to make it happen.

BR

Emma

  • Hi Emma,

    The reason the code runs off track is because they are probably not providing the PMM password when trying to clear the flags. A PUC reset is triggered when trying to write to the PMM registers while they are locked:

    In order to properly clear the flags, they will want to do this:

      PMMCTL0_H = PMMPW_H;            // unlock PMM registers
      PMMIFG &= ~PMMRSTIFG;
      //clear any other flags in PMMIFG here
      PMMCTL0_H = 0x00;               // lock PMM registers

    Please give this a try and let me know if there are still issues.

    Thanks!

    -Mitch

**Attention** This is a public forum