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.

MSP430FR4133 Low power delay

Other Parts Discussed in Thread: MSP430FR4133

I have been working with the MSP430FR4133 in a solar system, and have been trying to add a feature wherein after detecting that the system's battery is below a certain voltage, the system enters a low power mode for 30 minutes, before continuing.  I have gotten the system to successfully detect when the voltage is low and will enter an "if" statement when that happens, however most of what I've seen online for low-power mode examples are either serial-based interrupts, and the only time-based one is entering LPM once per second. What is the most simple way to have the MSP enter LPM for a defined period of time, and which low-power mode should I be using for this application (ex: 3, 3.5, 4, 4.5)? Any input would be greatly appreciated.

  • How do u plan to wake up system after 30 min? Timer?

  • >I have been working with the MSP430FR4133 in a solar system
    What is battery type & capacity? Do you know battery self-dischare current?

    >What is the most simple way to have the MSP enter LPM for a defined period of time

    Most simple way is to run software clock with interrupt once per 2 seconds :) There's no need to build hardware solution which is able to wake-up CPU after such a long time like 30 minutes. Count your minutes in software - timer ISR. Anyway you need to familiarize yourself with timers and periodic interrupts.

  • Yes, does that make sense? I would want the system to wake up after a certain amount of time, not after any other event.
    I am imagining something like this:
    if(low voltage detected){
    [enter low power mode]
    delay_min(30);
    [exit low power mode]
    }
    I included the parts that I don't know how to approach within the square brackets.
  • >What is battery type & capacity? Do you know battery self-dischare current?
    6-cell 12v 12ah SLA battery, however I am not having problems with anything regarding the battery, the problem lies only in entering and exiting LPM in the firmware.

    >Most simple way is to run software clock with interrupt once per 2 seconds..
    Thank you for your input, could you point me towards some documentation that is specific to this functionality?
  • >6-cell 12v 12ah SLA battery, however I am not having problems with anything regarding the battery
    I would argue here. Such battery have so much energy even discharged that timer tick rate of msp430 does not matter. You shall just pick easiest solution and that's it.

    >Thank you for your input, could you point me towards some documentation that is specific to this functionality?
    User's guide, timer chapter. You shall run timer from ACLK sourced from 32768Hz quartz oscillator. As timer of msp430 is 16 bits, use just timer overflow interrupt which will happen each 65536 clock pulses meaning each 2 seconds at given clock frequency. There's source code examples covering timer use, too.
  • In fact, u don't need to check voltage. You can put MSP into LPM3 when nothing to do. Then, in timer A or RTC timer ISR , check if 30 min is reached. The ISR will wake up CPU automatically.

**Attention** This is a public forum