3

I work on a Texas Instruments msp430f2274 with a battery. I want to know, when the supply voltage is low.
I found information about a "Supply Voltage Supervisor" but apparently it is not present in all devices of the msp430x2xx family. My controller has a brownout detection circuit and this triggers a POR (Power on Reset).
Now to the problem. I don't know how to use this POR signal or the BOR circuit. How do I detect low voltage on my controller and trigger specific events to save my data.

Passerby
  • 72,580
  • 7
  • 90
  • 202
  • I suspect you'd have more luck on a forum dedicated to TI processors (assumning that's what a msp43... is). But generally Power On Reset is a hardware signal that resets the circuitry. By that time it's too late. –  May 06 '13 at 18:09
  • Generally you would have to enable these in a config or fuse bit unless they are enabled by default. POR would then happen by itself - though you may be able to check some register on boot to see if that is why you are booting. Brown out may be able to fire an interrupt on which you could save a small amount of state. – Chris Stratton May 06 '13 at 18:16
  • The [data sheet](http://www.ti.com/lit/ds/symlink/msp430f2274.pdf) has a couple of pages on POR/BOR, but doesn't seem too helpful otherwise. –  May 06 '13 at 18:34
  • Assuming your MCU has a ADC, just use that to convert on the supply voltage divided down. This would require a voltage reference, but the MCU *probably* has one built in, so all you'd need would be a few resistors. As a bonus, you could also monitor the battery charge. – Connor Wolf Aug 03 '13 at 01:13

2 Answers2

3

From MSP430x2xx Family User's Guide (slau144):

The brownout reset circuit detects low supply voltages such as when a supply voltage is applied to or removed from the VCC terminal. The brownout reset circuit resets the device by triggering a POR signal when power is applied or removed. The operating levels are shown in Figure 2-2.

This suggests that the brownout detection signal is not available to the firmware. If you want to detect low battery you need a different means. Probably some sort of external circuit triggering an interrupt when battery voltage drops to just above the "brownout" level.

Nick Alexeev
  • 37,739
  • 17
  • 97
  • 230
Hot Licks
  • 752
  • 6
  • 10
  • A little further down it says "Additionally, the watchdog timer, oscillator fault, and flash memory flags can be evaluated to determine the source of the reset." So after a reset there is probably a way to conclude it came from BOR rather than another source. –  May 06 '13 at 19:03
1

A Brown Out Reset will not work well for your situation. The Trigger Voltage V(B_IT-) for Brown Out Reset for the F2274 is listed at 1.71 Volts Max. Other MSP430x2xx chips, like the MSP430G2553 show it as 1.35 Volts Typical. When VCC drops below that trigger voltage, quickly (In the order of micro and nano seconds), the Brown Out circuit triggers a POR/BOR reset, for up to 2 milliseconds after the voltage goes back up past the hysterics voltage (V(B_IT-) + ~ 150 mV), ≤ 1.8V max).

It's intended to protect against quick power drops, that are less than a full power disconnect (A POR happens if VCC drops below 1 ~ 1.19 volts i.e. total power loss). Things like inrush voltage drops or lack of proper decoupling capacitors.

It happens automatically. The only thing you can do is check for a few flags to determine that the mcu reset itself. A Reset means you lost any unsaved ram variables already!

It is not a low voltage supervisor.

It does not stop problems from the voltage dropping below 1.8 V minimum to the trigger voltage. It does not stop clock issues from running the clock at a higher speed than the voltage it requires. For example, 16mHz requires 3.3V or higher. If the voltage drops below that, and you are still at 16 mHz Bad, Undefined things will happen.

Use a Voltage Supervisor, or make your own from the ADC.

Passerby
  • 72,580
  • 7
  • 90
  • 202