By Mike Peters
Since F-RAM memory features high endurance, the system’s data can be read and written to F-RAM as though it is general purpose RAM storage inside the host microcontroller. Traditional on-chip RAM provides only temporary storage, and EEPROM offers a limited number of write cycles. F-RAM memory is not only non-volatile but also offers virtually unlimited endurance, eliminating the need for complex wear levelling software.
F-RAM AND PROCESSOR COMPANIONS FOR METERING
The use of F-RAM in metering has been widely accepted. Ramtron has developed a set of products that integrate F-RAM and processor companion features. All Ramtron processor companion products integrate F-RAM memory with companion features such as system reset, power supply voltage detect, watchdog timer, tamper detection, early power fail, and more. For metering applications, these integrated F-RAM products not only provide a fast non-volatile memory but also keep system parts count down, costs down, and reduce board space by including useful features that complement the system microcontroller. Let’s look at the some of the features found in the Ramtron processor companions. The benefits of integrating these features with F-RAM memory will become apparent.
TAMPER DETECT AND EVENT LOGGING
Event logging and tamper detection are two important features of a meter design. The FM31x devices integrate two 16 bit event counters for tamper detect or other event logging purposes. Each counter has an input pin that is edge triggered and polarity that is user defined. The event counter can be programmed to detect a tamper event, such as the system’s case or access door being opened. The counter is battery backed so that even when power is lost, the device will detect and count tamper events.
In Figure 1, a normally closed switch is shown. The switch is tied to ground, which typically is a system case or chassis. The pull-up resistor provides the rising edge when the case or access door is opened. An improved tamper detect circuit is shown in Figure 2.
The FM33x devices allow the user to invoke a polled mode, which occasionally samples the pin in order to minimise battery drain. It internally tries to pull the CNT pin up. If there is an open circuit (case opened), the pin will be pulled up to a VIH level, which will trip the edge detector and increment the event counter value. The current contribution of the polled PFI pin to the meter design is approximately 5 nA.
The meter design can also take advantage of the ability of the FM33x devices to store these counts in non-volatile F-RAM. If the design either does not have a backup power source or if the backup source fails, then the counts are still recorded. No processor overhead is needed.
EARLY POWER FAIL WARNING
Most electronic systems use voltage regulated power to provide a stable voltage to guarantee circuit operation. An unregulated power supply always precedes the regulator. As the unregulated voltage varies, the regulated voltage remains stable – to a point.
As the unregulated supply voltage drops due to a failure or normal system shutdown, the processor and memory subsystem is better served by knowing well before the regulator drops out and power is lost. An early warning mechanism alerts the host processor to this event. A non-maskable interrupt (NMI) is a means by which the host can prepare for an impending loss of power. A simple voltage divider, tied to the unregulated supply, can be connected to the companion’s on-chip comparator that senses this condition. The comparator output PFO is tied to the processor’s NMI input. This high level interrupt can then invoke a routine that performs a critical task before power is lost.
SYSTEM RESET AND VOLTAGE DETECT
System supervisors typically provide a host processor with the detection of power supply fault conditions and the independent checking of software lockup conditions by using a watchdog timer. The FM31x, FM32x, and FM33x processor companions provide a reset pin (/RST) to drive a processor reset input during power faults, power up, and software lockups. Whenever the VDD supply is below a user settable threshold, the low voltage detect circuit holds the system in reset. The reset pin may be wire OR’d with another active-low reset if the design requires it.
REAL TIME CLOCK
A low power, battery backed real time clock (RTC) is integrated and can be used in time-of-use (TOU) meters to log power usage overtime. The RTC can be used to timestamp a tamper event or other event. The FM313x and FM33x devices also integrate an alarm which could be useful for setting a flag or future event to trip the host processor.
All RTCs automatically switch over to the backup source when the main power is down. The backed up circuits draw no more than 1 µA under this condition. For those designs that cannot use a battery, all processor companion devices are able to operate in backup mode from a super capacitor. An integrated capacitor charging circuit is provided on all companion devices.
Ramtron’s family of processor companions has grown to more than 20 products. The integration of F-RAM memory and companion features make these devices very attractive for the metering market. There are four distinct families: the FM3127x/FM31L27x (I2C), the FM313x (I2C), the FM3227x/ FM32L27x (I2C), and FM33xx (SPI). The ’31 families have an integrated RTC whereas the ’32 family does not. All processor companions operate over the industrial temperature range of -40O C to +85O C. All are available in a 14 pin SOIC except the FM313x devices, which are housed in 8 pin and 20 pin SOIC packages.