Test modules, 6513 ce example, Serial port tests – Maxim Integrated 71M6513H Power Meter IC Family Software User Manual

Page 92: Timer tests, Eeprom tests, Generating dio pulses on reset

Advertising
background image

71M651x Software User’s Guide

144

651X

In rare circumstances, the flag for RTC-1-
sec is not cleared by the interrupt,
causing the code to hang up. A restart
may also fail to clear both flags, causing a
hang up.

146

651X

The divide_1() function in classics.c
calculates an incorrect residue.

147

651X

The default temperature compensation
factor A, used to calculate PPMC in
set_tc1_tc2 () in ce651x.c, is -6680, but it
should be –668.

A fix is straight forward by entering the proper
value for A.

148

651X

The demo code can have priority
inversion

Fixes involve redesigning the code's critical
sections

5.15.TEST MODULES

Various Test Modules are available from TERIDIAN. These Test Modules are small Keil projects that can be used to
test various functions of the 71M6521 IC. The available Test Modules are described in this section.

5.15.1.6513 CE Example

This Test Module builds a simple test code that starts and runs the compute engine, collects meter data in RAM, and
generates pulses for one accumulation interval.

The Keil project file is 6513_ce_example.uv2.

5.15.2.Serial Port Tests

These Test Modules build simple tests of the serial ports. The tests start by sending the ASCII character "E" in a loop,
e.g. for testing with an oscilloscope. As soon as a character is received, the test code begins echoing typed
characters, using polling IO. Sending the period character ( ".") switches the I/O to interrupting I/O.

Note that ser0test.c and ser1test.c use identical text, except for the include file. This is a very convenient technique for
moving serial I/O to a different port when requirements change.

The Keil project files are ser0test.uv2 and ser1test.uv2.

5.15.3.Timer Tests

These Test Modules build simple routines for testing of the interrupting timers, run both once, and periodically. The
routines include an extended 30-second test that can be used with a stop-watch timer to measure accuracy.

Note that tmr0test.c and tmr1test.c use identical text except for the include file. This is a very convenient technique for
moving a timer IO to a different port when requirements change.

The Keil project files are tmr0test.uv2 and tmr1test.uv2.

5.15.4.EEPROM Tests

This routine demonstrates the use and test of the eeprom interface.

The Keil project files is eepromtest.uv2.

5.15.5.Generating DIO Pulses on Reset

This Test Module is written in 8051 assembler and is executed after processor reset. It pulses DIO7 on a meter chip.
This function is useful as a scope loop to discover if the chip resets when expected.

Revision 2.4

TERIDIAN Proprietary

92 of 137

© Copyright 2005-2006 TERIDIAN Semiconductor Corporation

Advertising