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.

MSP430F67791A: Data store in internal flash when power is cut off

Part Number: MSP430F67791A
  • Hello, In our application, when we enable SVM and SVS in PMM block, MCU get stuck on power on off trigger, would you share the working example code for our reference.

    We are referring to PMM Module chapter from the User manual .

  • Hello,

    All available code examples for this device and other can be found within MSP430Ware. There currently isn't an example specific to the PMM module of this part, but it is touched/used in many other code examples. 

    Can you provide more details on what you are trying to do ? What your register settings are?  What is the scenario you are trying to accommodate?

  • Hello,

    We are using init as per the following: 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /////INIT/////////////////////////
    void InitSNMIVector(void)
    {
    // Open PMM registers for write access
    PMMCTL0_H = 0xA5;
    // SVS and SVM high side Reset Release Voltage Level 3
    SVSMHCTL |= SVMHE | (SVSMHRRL_3) | (SVSHRVL_3) |SVSHE | SVSHFP;
    //enable SVM high side interrupt
    PMMRIE = SVMHIE;
    // Lock PMM registers for write access
    PMMCTL0_H = 0x00;
    }
    /////////////ISR/////////////////
    /*#pragma vector=SYSNMI_VECTOR
    __interrupt void sysNmiISR(void)
    {
    if(PMMIFG & SVMHIFG) //SVM high side interrupt flag
    {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

       Still my MCU get stuck in power on and off . This setup is with reference from :  MSP430Ware . Do correct me if I am missing something.

  • Hello,

    When posting code to the forums, please use the code insert option, </> so it will be properly be formatted. I've already edited your post to reflect this change.

    What voltage levels are you trying to set for a warning of power down? 

    What does your voltage curve on DVCC look like when this scenario happens?

    At what voltage level are you seeing the issue?

    Also, from the code snippet provided, it looks as though your ISR is commented out. 

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    void InitSNMIVector(void)
    {
    // Open PMM registers for write access
    PMMCTL0_H = 0xA5;
    // SVS and SVM high side Reset Release Voltage Level 3
    SVSMHCTL |= SVMHE | (SVSMHRRL_3) | (SVSHRVL_3) |SVSHE | SVSHFP;
    //enable SVM high side interrupt
    PMMRIE = SVMHIE;
    // Lock PMM registers for write access
    PMMCTL0_H = 0x00;
    }
    /////////////ISR/////////////////
    #pragma vector=SYSNMI_VECTOR
    __interrupt void sysNmiISR(void)
    {
    if(PMMIFG & SVMHIFG) //SVM high side interrupt flag
    {
    edata = &para.mode;
    Flash_Write(INFO_SEGD,edata,sizeof(para));
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    First of all Comment in the ISR  is just for the testing stuck program due this or not, But we identify stuck problem due to this.

    Here Inside the code monitor the HIGH side mean that DVCC(SVSh and SVMh) .

    Inside the MSP430F67791A suggest me, that SVSMHRRL always greater than or equal to the SVSHRVL.

    Here SVSHMRRL_3 mean voltage level 3, mean 2.4V when voltage goes under this voltage it generate the interrupt.

    So sometimes live data isn't store in flash when power is cut off but this snippet add inside the code stuck issue remain.

    So My question is that the Register setting is ok or not.

    Plz refere this image. Here when set the PMMCORE setting jaccording to this image,Device does not wake up. But when i don't touch the PMMCORE setting that problem stuck remain

    i attach the one image please referre this.

  • Hello,

    You should only be adjusting the Core voltage via the provided functions within our code examples or via DriverLib. These provided functions take into account the proper procedure and several errata around changing core voltage levels. If you are not doing this already, please do so.

    Other adjustments to PMM can be made outside of core voltage changes, which is inline with what you are trying to do. You need to look at your DVCC voltage and its decline slope to figure out how fast your decay is in the scenario where you are losing power and want to save off information in FLASH. Saving to Flash takes a while, so you need to either increase the decay and/or set your SVS Monitor voltage high enough to give yourself enough time to save of your information.

    If you are operating at VCORE Level 3, the min voltage for operation is 2.4V. If you go below this you are operating out of specifications, and thus need to shutdown or adjust vcore level + frequency. If you set the monitor to the 2.4V level, then you will not have any heads up that you will be operating out of spec, and thus won't be able to save off information. If your nominal system is 3.3V DVCC for example, I would set your monitor level to ~3.02V or ~2.70V settings so you get enough warning to do what you need to do. The exact setting will of course be dependent on your system and the time you need for your closing actions as you are losing power. You also may want to consider the behavior of your DVCC line to make sure hitting the level you set is indicative of your power loss scenario. 

  • Hello, 

    According to your instruction store data in the internal flash successfully, but the issue is remain. stuck the device and when fast power on/off. I will send u one vidio.

    Here inside the code SVM voltage level is the ~3.02 voltage PMMCORE voltage is the highest level mean voltage level 3, 1.80 voltage. According to the manual our system frequency is the 16.777 MHZ.. So finally issue is the same. I cant get the exact solution.

  • Saurabh,

    I'm still not sure what your issue is with the description you have given so far and the video you have provided. I'm assuming here the MSP430 is controlling the LCD, and I see the LCD coming on each time. I do not recommend rapidly turning on/off the power if you have a flash routine that executes when power is going down. That could lead to potential flash corruption as the amount of decay on your voltage line will change with rapid charge/discharge versus steady state then discharge. Again, scope plots of your VCC line will help you understand what is going on from a voltage standpoint.

    If your objective is to make your system more robust in the event of unstable power, then I would suggest utilizing the AUX module along with secondary and even tertiary supplies.  These could be as simple as a super caps to keep voltages s table while your power is unstable. We have several examples of different AUX Module configuration that may be of interest to you in the following resource: https://www.ti.com/tool/TIDM-AUX-MODULE 

  • Hello,

        We are using the MCU for some particular product, like Energy meter, APFC. For this application, the main incoming line may switch on and off rapidly according to the Power grid. For the same instance we need to make our meter in stable condition when grid on(power on). Refer the sample code we have tried out. While AC mains(For MCU - DVCC power i/o), cut off and off rapidly(say count 10 times), the MCU get stuck at random location. Requesting you to run this same setup out and generate the scenario.6747.Test.zip

  • Saurabh,

    More than likely with your rapid power on/off, you are not hitting the lower voltage bounds needed for proper reset and/or you are operating the module out of specification due to a frequency vs voltage vs vcore level violation. This is why it is important to look at the actual voltage level of DVCC with a scope when performing your test.

    Without proper care in ensuring stability of DVCC to your device in your scenario, you will into unexpected behavior. To make your design more robust and to account for this scenario, you nee dot utilize the AUX Module and a backup power source. Please see reference above for more details. 

    If you are already utilizing the AUX Module, how are you utilizing the AUX module and what is your backup power source? 

**Attention** This is a public forum